diff --git a/djangocms_text/contrib/text_ckeditor4/static/ckeditor/CHANGES.md b/djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/CHANGES.md similarity index 100% rename from djangocms_text/contrib/text_ckeditor4/static/ckeditor/CHANGES.md rename to djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/CHANGES.md diff --git a/djangocms_text/contrib/text_ckeditor4/static/ckeditor/LICENSE.md b/djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/LICENSE.md similarity index 100% rename from djangocms_text/contrib/text_ckeditor4/static/ckeditor/LICENSE.md rename to djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/LICENSE.md diff --git a/djangocms_text/contrib/text_ckeditor4/static/ckeditor/README.md b/djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/README.md similarity index 100% rename from djangocms_text/contrib/text_ckeditor4/static/ckeditor/README.md rename to djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/README.md diff --git a/djangocms_text/contrib/text_ckeditor4/static/ckeditor/SECURITY.md b/djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/SECURITY.md similarity index 100% rename from djangocms_text/contrib/text_ckeditor4/static/ckeditor/SECURITY.md rename to djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/SECURITY.md diff --git a/djangocms_text/contrib/text_ckeditor4/static/ckeditor/adapters/jquery.js b/djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/adapters/jquery.js similarity index 100% rename from djangocms_text/contrib/text_ckeditor4/static/ckeditor/adapters/jquery.js rename to djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/adapters/jquery.js diff --git a/djangocms_text/contrib/text_ckeditor4/static/ckeditor/bender-runner.config.json b/djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/bender-runner.config.json similarity index 100% rename from djangocms_text/contrib/text_ckeditor4/static/ckeditor/bender-runner.config.json rename to djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/bender-runner.config.json diff --git a/djangocms_text/contrib/text_ckeditor4/static/ckeditor/build-config.js b/djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/build-config.js similarity index 100% rename from djangocms_text/contrib/text_ckeditor4/static/ckeditor/build-config.js rename to djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/build-config.js diff --git a/djangocms_text/contrib/text_ckeditor4/static/ckeditor/ckeditor.js b/djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/ckeditor.js similarity index 100% rename from djangocms_text/contrib/text_ckeditor4/static/ckeditor/ckeditor.js rename to djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/ckeditor.js diff --git a/djangocms_text/contrib/text_ckeditor4/static/ckeditor/config.js b/djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/config.js similarity index 100% rename from djangocms_text/contrib/text_ckeditor4/static/ckeditor/config.js rename to djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/config.js diff --git a/djangocms_text/contrib/text_ckeditor4/static/ckeditor/contents.css b/djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/contents.css similarity index 100% rename from djangocms_text/contrib/text_ckeditor4/static/ckeditor/contents.css rename to djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/contents.css diff --git a/djangocms_text/contrib/text_ckeditor4/static/ckeditor/lang/af.js b/djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/lang/af.js similarity index 100% rename from djangocms_text/contrib/text_ckeditor4/static/ckeditor/lang/af.js rename to djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/lang/af.js diff --git a/djangocms_text/contrib/text_ckeditor4/static/ckeditor/lang/ar.js b/djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/lang/ar.js similarity index 100% rename from djangocms_text/contrib/text_ckeditor4/static/ckeditor/lang/ar.js rename to djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/lang/ar.js diff --git a/djangocms_text/contrib/text_ckeditor4/static/ckeditor/lang/az.js b/djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/lang/az.js similarity index 100% rename from djangocms_text/contrib/text_ckeditor4/static/ckeditor/lang/az.js rename to djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/lang/az.js diff --git a/djangocms_text/contrib/text_ckeditor4/static/ckeditor/lang/bg.js b/djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/lang/bg.js similarity index 100% rename from djangocms_text/contrib/text_ckeditor4/static/ckeditor/lang/bg.js rename to djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/lang/bg.js diff --git a/djangocms_text/contrib/text_ckeditor4/static/ckeditor/lang/bn.js b/djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/lang/bn.js similarity index 100% rename from djangocms_text/contrib/text_ckeditor4/static/ckeditor/lang/bn.js rename to djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/lang/bn.js diff --git a/djangocms_text/contrib/text_ckeditor4/static/ckeditor/lang/bs.js b/djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/lang/bs.js similarity index 100% rename from djangocms_text/contrib/text_ckeditor4/static/ckeditor/lang/bs.js rename to djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/lang/bs.js diff --git a/djangocms_text/contrib/text_ckeditor4/static/ckeditor/lang/ca.js b/djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/lang/ca.js similarity index 100% rename from djangocms_text/contrib/text_ckeditor4/static/ckeditor/lang/ca.js rename to djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/lang/ca.js diff --git a/djangocms_text/contrib/text_ckeditor4/static/ckeditor/lang/cs.js b/djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/lang/cs.js similarity index 100% rename from djangocms_text/contrib/text_ckeditor4/static/ckeditor/lang/cs.js rename to djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/lang/cs.js diff --git a/djangocms_text/contrib/text_ckeditor4/static/ckeditor/lang/cy.js b/djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/lang/cy.js similarity index 100% rename from djangocms_text/contrib/text_ckeditor4/static/ckeditor/lang/cy.js rename to djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/lang/cy.js diff --git a/djangocms_text/contrib/text_ckeditor4/static/ckeditor/lang/da.js b/djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/lang/da.js similarity index 100% rename from djangocms_text/contrib/text_ckeditor4/static/ckeditor/lang/da.js rename to djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/lang/da.js diff --git a/djangocms_text/contrib/text_ckeditor4/static/ckeditor/lang/de-ch.js b/djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/lang/de-ch.js similarity index 100% rename from djangocms_text/contrib/text_ckeditor4/static/ckeditor/lang/de-ch.js rename to djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/lang/de-ch.js diff --git a/djangocms_text/contrib/text_ckeditor4/static/ckeditor/lang/de.js b/djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/lang/de.js similarity index 100% rename from djangocms_text/contrib/text_ckeditor4/static/ckeditor/lang/de.js rename to djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/lang/de.js diff --git a/djangocms_text/contrib/text_ckeditor4/static/ckeditor/lang/el.js b/djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/lang/el.js similarity index 100% rename from djangocms_text/contrib/text_ckeditor4/static/ckeditor/lang/el.js rename to djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/lang/el.js diff --git a/djangocms_text/contrib/text_ckeditor4/static/ckeditor/lang/en-au.js b/djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/lang/en-au.js similarity index 100% rename from djangocms_text/contrib/text_ckeditor4/static/ckeditor/lang/en-au.js rename to djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/lang/en-au.js diff --git a/djangocms_text/contrib/text_ckeditor4/static/ckeditor/lang/en-ca.js b/djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/lang/en-ca.js similarity index 100% rename from djangocms_text/contrib/text_ckeditor4/static/ckeditor/lang/en-ca.js rename to djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/lang/en-ca.js diff --git a/djangocms_text/contrib/text_ckeditor4/static/ckeditor/lang/en-gb.js b/djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/lang/en-gb.js similarity index 100% rename from djangocms_text/contrib/text_ckeditor4/static/ckeditor/lang/en-gb.js rename to djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/lang/en-gb.js diff --git a/djangocms_text/contrib/text_ckeditor4/static/ckeditor/lang/en.js b/djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/lang/en.js similarity index 100% rename from djangocms_text/contrib/text_ckeditor4/static/ckeditor/lang/en.js rename to djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/lang/en.js diff --git a/djangocms_text/contrib/text_ckeditor4/static/ckeditor/lang/eo.js b/djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/lang/eo.js similarity index 100% rename from djangocms_text/contrib/text_ckeditor4/static/ckeditor/lang/eo.js rename to djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/lang/eo.js diff --git a/djangocms_text/contrib/text_ckeditor4/static/ckeditor/lang/es-mx.js b/djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/lang/es-mx.js similarity index 100% rename from djangocms_text/contrib/text_ckeditor4/static/ckeditor/lang/es-mx.js rename to djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/lang/es-mx.js diff --git a/djangocms_text/contrib/text_ckeditor4/static/ckeditor/lang/es.js b/djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/lang/es.js similarity index 100% rename from djangocms_text/contrib/text_ckeditor4/static/ckeditor/lang/es.js rename to djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/lang/es.js diff --git a/djangocms_text/contrib/text_ckeditor4/static/ckeditor/lang/et.js b/djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/lang/et.js similarity index 100% rename from djangocms_text/contrib/text_ckeditor4/static/ckeditor/lang/et.js rename to djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/lang/et.js diff --git a/djangocms_text/contrib/text_ckeditor4/static/ckeditor/lang/eu.js b/djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/lang/eu.js similarity index 100% rename from djangocms_text/contrib/text_ckeditor4/static/ckeditor/lang/eu.js rename to djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/lang/eu.js diff --git a/djangocms_text/contrib/text_ckeditor4/static/ckeditor/lang/fa.js b/djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/lang/fa.js similarity index 100% rename from djangocms_text/contrib/text_ckeditor4/static/ckeditor/lang/fa.js rename to djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/lang/fa.js diff --git a/djangocms_text/contrib/text_ckeditor4/static/ckeditor/lang/fi.js b/djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/lang/fi.js similarity index 100% rename from djangocms_text/contrib/text_ckeditor4/static/ckeditor/lang/fi.js rename to djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/lang/fi.js diff --git a/djangocms_text/contrib/text_ckeditor4/static/ckeditor/lang/fo.js b/djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/lang/fo.js similarity index 100% rename from djangocms_text/contrib/text_ckeditor4/static/ckeditor/lang/fo.js rename to djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/lang/fo.js diff --git a/djangocms_text/contrib/text_ckeditor4/static/ckeditor/lang/fr-ca.js b/djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/lang/fr-ca.js similarity index 100% rename from djangocms_text/contrib/text_ckeditor4/static/ckeditor/lang/fr-ca.js rename to djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/lang/fr-ca.js diff --git a/djangocms_text/contrib/text_ckeditor4/static/ckeditor/lang/fr.js b/djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/lang/fr.js similarity index 100% rename from djangocms_text/contrib/text_ckeditor4/static/ckeditor/lang/fr.js rename to djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/lang/fr.js diff --git a/djangocms_text/contrib/text_ckeditor4/static/ckeditor/lang/gl.js b/djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/lang/gl.js similarity index 100% rename from djangocms_text/contrib/text_ckeditor4/static/ckeditor/lang/gl.js rename to djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/lang/gl.js diff --git a/djangocms_text/contrib/text_ckeditor4/static/ckeditor/lang/gu.js b/djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/lang/gu.js similarity index 100% rename from djangocms_text/contrib/text_ckeditor4/static/ckeditor/lang/gu.js rename to djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/lang/gu.js diff --git a/djangocms_text/contrib/text_ckeditor4/static/ckeditor/lang/he.js b/djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/lang/he.js similarity index 100% rename from djangocms_text/contrib/text_ckeditor4/static/ckeditor/lang/he.js rename to djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/lang/he.js diff --git a/djangocms_text/contrib/text_ckeditor4/static/ckeditor/lang/hi.js b/djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/lang/hi.js similarity index 100% rename from djangocms_text/contrib/text_ckeditor4/static/ckeditor/lang/hi.js rename to djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/lang/hi.js diff --git a/djangocms_text/contrib/text_ckeditor4/static/ckeditor/lang/hr.js b/djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/lang/hr.js similarity index 100% rename from djangocms_text/contrib/text_ckeditor4/static/ckeditor/lang/hr.js rename to djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/lang/hr.js diff --git a/djangocms_text/contrib/text_ckeditor4/static/ckeditor/lang/hu.js b/djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/lang/hu.js similarity index 100% rename from djangocms_text/contrib/text_ckeditor4/static/ckeditor/lang/hu.js rename to djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/lang/hu.js diff --git a/djangocms_text/contrib/text_ckeditor4/static/ckeditor/lang/id.js b/djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/lang/id.js similarity index 100% rename from djangocms_text/contrib/text_ckeditor4/static/ckeditor/lang/id.js rename to djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/lang/id.js diff --git a/djangocms_text/contrib/text_ckeditor4/static/ckeditor/lang/is.js b/djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/lang/is.js similarity index 100% rename from djangocms_text/contrib/text_ckeditor4/static/ckeditor/lang/is.js rename to djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/lang/is.js diff --git a/djangocms_text/contrib/text_ckeditor4/static/ckeditor/lang/it.js b/djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/lang/it.js similarity index 100% rename from djangocms_text/contrib/text_ckeditor4/static/ckeditor/lang/it.js rename to djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/lang/it.js diff --git a/djangocms_text/contrib/text_ckeditor4/static/ckeditor/lang/ja.js b/djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/lang/ja.js similarity index 100% rename from djangocms_text/contrib/text_ckeditor4/static/ckeditor/lang/ja.js rename to djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/lang/ja.js diff --git a/djangocms_text/contrib/text_ckeditor4/static/ckeditor/lang/ka.js b/djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/lang/ka.js similarity index 100% rename from djangocms_text/contrib/text_ckeditor4/static/ckeditor/lang/ka.js rename to djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/lang/ka.js diff --git a/djangocms_text/contrib/text_ckeditor4/static/ckeditor/lang/km.js b/djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/lang/km.js similarity index 100% rename from djangocms_text/contrib/text_ckeditor4/static/ckeditor/lang/km.js rename to djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/lang/km.js diff --git a/djangocms_text/contrib/text_ckeditor4/static/ckeditor/lang/ko.js b/djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/lang/ko.js similarity index 100% rename from djangocms_text/contrib/text_ckeditor4/static/ckeditor/lang/ko.js rename to djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/lang/ko.js diff --git a/djangocms_text/contrib/text_ckeditor4/static/ckeditor/lang/ku.js b/djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/lang/ku.js similarity index 100% rename from djangocms_text/contrib/text_ckeditor4/static/ckeditor/lang/ku.js rename to djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/lang/ku.js diff --git a/djangocms_text/contrib/text_ckeditor4/static/ckeditor/lang/lt.js b/djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/lang/lt.js similarity index 100% rename from djangocms_text/contrib/text_ckeditor4/static/ckeditor/lang/lt.js rename to djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/lang/lt.js diff --git a/djangocms_text/contrib/text_ckeditor4/static/ckeditor/lang/lv.js b/djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/lang/lv.js similarity index 100% rename from djangocms_text/contrib/text_ckeditor4/static/ckeditor/lang/lv.js rename to djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/lang/lv.js diff --git a/djangocms_text/contrib/text_ckeditor4/static/ckeditor/lang/mk.js b/djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/lang/mk.js similarity index 100% rename from djangocms_text/contrib/text_ckeditor4/static/ckeditor/lang/mk.js rename to djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/lang/mk.js diff --git a/djangocms_text/contrib/text_ckeditor4/static/ckeditor/lang/mn.js b/djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/lang/mn.js similarity index 100% rename from djangocms_text/contrib/text_ckeditor4/static/ckeditor/lang/mn.js rename to djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/lang/mn.js diff --git a/djangocms_text/contrib/text_ckeditor4/static/ckeditor/lang/ms.js b/djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/lang/ms.js similarity index 100% rename from djangocms_text/contrib/text_ckeditor4/static/ckeditor/lang/ms.js rename to djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/lang/ms.js diff --git a/djangocms_text/contrib/text_ckeditor4/static/ckeditor/lang/nb.js b/djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/lang/nb.js similarity index 100% rename from djangocms_text/contrib/text_ckeditor4/static/ckeditor/lang/nb.js rename to djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/lang/nb.js diff --git a/djangocms_text/contrib/text_ckeditor4/static/ckeditor/lang/nl.js b/djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/lang/nl.js similarity index 100% rename from djangocms_text/contrib/text_ckeditor4/static/ckeditor/lang/nl.js rename to djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/lang/nl.js diff --git a/djangocms_text/contrib/text_ckeditor4/static/ckeditor/lang/no.js b/djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/lang/no.js similarity index 100% rename from djangocms_text/contrib/text_ckeditor4/static/ckeditor/lang/no.js rename to djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/lang/no.js diff --git a/djangocms_text/contrib/text_ckeditor4/static/ckeditor/lang/oc.js b/djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/lang/oc.js similarity index 100% rename from djangocms_text/contrib/text_ckeditor4/static/ckeditor/lang/oc.js rename to djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/lang/oc.js diff --git a/djangocms_text/contrib/text_ckeditor4/static/ckeditor/lang/pl.js b/djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/lang/pl.js similarity index 100% rename from djangocms_text/contrib/text_ckeditor4/static/ckeditor/lang/pl.js rename to djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/lang/pl.js diff --git a/djangocms_text/contrib/text_ckeditor4/static/ckeditor/lang/pt-br.js b/djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/lang/pt-br.js similarity index 100% rename from djangocms_text/contrib/text_ckeditor4/static/ckeditor/lang/pt-br.js rename to djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/lang/pt-br.js diff --git a/djangocms_text/contrib/text_ckeditor4/static/ckeditor/lang/pt.js b/djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/lang/pt.js similarity index 100% rename from djangocms_text/contrib/text_ckeditor4/static/ckeditor/lang/pt.js rename to djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/lang/pt.js diff --git a/djangocms_text/contrib/text_ckeditor4/static/ckeditor/lang/ro.js b/djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/lang/ro.js similarity index 100% rename from djangocms_text/contrib/text_ckeditor4/static/ckeditor/lang/ro.js rename to djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/lang/ro.js diff --git a/djangocms_text/contrib/text_ckeditor4/static/ckeditor/lang/ru.js b/djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/lang/ru.js similarity index 100% rename from djangocms_text/contrib/text_ckeditor4/static/ckeditor/lang/ru.js rename to djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/lang/ru.js diff --git a/djangocms_text/contrib/text_ckeditor4/static/ckeditor/lang/si.js b/djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/lang/si.js similarity index 100% rename from djangocms_text/contrib/text_ckeditor4/static/ckeditor/lang/si.js rename to djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/lang/si.js diff --git a/djangocms_text/contrib/text_ckeditor4/static/ckeditor/lang/sk.js b/djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/lang/sk.js similarity index 100% rename from djangocms_text/contrib/text_ckeditor4/static/ckeditor/lang/sk.js rename to djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/lang/sk.js diff --git a/djangocms_text/contrib/text_ckeditor4/static/ckeditor/lang/sl.js b/djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/lang/sl.js similarity index 100% rename from djangocms_text/contrib/text_ckeditor4/static/ckeditor/lang/sl.js rename to djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/lang/sl.js diff --git a/djangocms_text/contrib/text_ckeditor4/static/ckeditor/lang/sq.js b/djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/lang/sq.js similarity index 100% rename from djangocms_text/contrib/text_ckeditor4/static/ckeditor/lang/sq.js rename to djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/lang/sq.js diff --git a/djangocms_text/contrib/text_ckeditor4/static/ckeditor/lang/sr-latn.js b/djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/lang/sr-latn.js similarity index 100% rename from djangocms_text/contrib/text_ckeditor4/static/ckeditor/lang/sr-latn.js rename to djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/lang/sr-latn.js diff --git a/djangocms_text/contrib/text_ckeditor4/static/ckeditor/lang/sr.js b/djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/lang/sr.js similarity index 100% rename from djangocms_text/contrib/text_ckeditor4/static/ckeditor/lang/sr.js rename to djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/lang/sr.js diff --git a/djangocms_text/contrib/text_ckeditor4/static/ckeditor/lang/sv.js b/djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/lang/sv.js similarity index 100% rename from djangocms_text/contrib/text_ckeditor4/static/ckeditor/lang/sv.js rename to djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/lang/sv.js diff --git a/djangocms_text/contrib/text_ckeditor4/static/ckeditor/lang/th.js b/djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/lang/th.js similarity index 100% rename from djangocms_text/contrib/text_ckeditor4/static/ckeditor/lang/th.js rename to djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/lang/th.js diff --git a/djangocms_text/contrib/text_ckeditor4/static/ckeditor/lang/tr.js b/djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/lang/tr.js similarity index 100% rename from djangocms_text/contrib/text_ckeditor4/static/ckeditor/lang/tr.js rename to djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/lang/tr.js diff --git a/djangocms_text/contrib/text_ckeditor4/static/ckeditor/lang/tt.js b/djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/lang/tt.js similarity index 100% rename from djangocms_text/contrib/text_ckeditor4/static/ckeditor/lang/tt.js rename to djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/lang/tt.js diff --git a/djangocms_text/contrib/text_ckeditor4/static/ckeditor/lang/ug.js b/djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/lang/ug.js similarity index 100% rename from djangocms_text/contrib/text_ckeditor4/static/ckeditor/lang/ug.js rename to djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/lang/ug.js diff --git a/djangocms_text/contrib/text_ckeditor4/static/ckeditor/lang/uk.js b/djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/lang/uk.js similarity index 100% rename from djangocms_text/contrib/text_ckeditor4/static/ckeditor/lang/uk.js rename to djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/lang/uk.js diff --git a/djangocms_text/contrib/text_ckeditor4/static/ckeditor/lang/vi.js b/djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/lang/vi.js similarity index 100% rename from djangocms_text/contrib/text_ckeditor4/static/ckeditor/lang/vi.js rename to djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/lang/vi.js diff --git a/djangocms_text/contrib/text_ckeditor4/static/ckeditor/lang/zh-cn.js b/djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/lang/zh-cn.js similarity index 100% rename from djangocms_text/contrib/text_ckeditor4/static/ckeditor/lang/zh-cn.js rename to djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/lang/zh-cn.js diff --git a/djangocms_text/contrib/text_ckeditor4/static/ckeditor/lang/zh.js b/djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/lang/zh.js similarity index 100% rename from djangocms_text/contrib/text_ckeditor4/static/ckeditor/lang/zh.js rename to djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/lang/zh.js diff --git a/djangocms_text/contrib/text_ckeditor4/static/ckeditor/plugins/a11yhelp/dialogs/a11yhelp.js b/djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/plugins/a11yhelp/dialogs/a11yhelp.js similarity index 100% rename from djangocms_text/contrib/text_ckeditor4/static/ckeditor/plugins/a11yhelp/dialogs/a11yhelp.js rename to djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/plugins/a11yhelp/dialogs/a11yhelp.js diff --git a/djangocms_text/contrib/text_ckeditor4/static/ckeditor/plugins/a11yhelp/dialogs/lang/_translationstatus.txt b/djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/plugins/a11yhelp/dialogs/lang/_translationstatus.txt similarity index 100% rename from djangocms_text/contrib/text_ckeditor4/static/ckeditor/plugins/a11yhelp/dialogs/lang/_translationstatus.txt rename to djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/plugins/a11yhelp/dialogs/lang/_translationstatus.txt diff --git a/djangocms_text/contrib/text_ckeditor4/static/ckeditor/plugins/a11yhelp/dialogs/lang/af.js b/djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/plugins/a11yhelp/dialogs/lang/af.js similarity index 100% rename from djangocms_text/contrib/text_ckeditor4/static/ckeditor/plugins/a11yhelp/dialogs/lang/af.js rename to djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/plugins/a11yhelp/dialogs/lang/af.js diff --git a/djangocms_text/contrib/text_ckeditor4/static/ckeditor/plugins/a11yhelp/dialogs/lang/ar.js b/djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/plugins/a11yhelp/dialogs/lang/ar.js similarity index 100% rename from djangocms_text/contrib/text_ckeditor4/static/ckeditor/plugins/a11yhelp/dialogs/lang/ar.js rename to djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/plugins/a11yhelp/dialogs/lang/ar.js diff --git a/djangocms_text/contrib/text_ckeditor4/static/ckeditor/plugins/a11yhelp/dialogs/lang/az.js b/djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/plugins/a11yhelp/dialogs/lang/az.js similarity index 100% rename from djangocms_text/contrib/text_ckeditor4/static/ckeditor/plugins/a11yhelp/dialogs/lang/az.js rename to djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/plugins/a11yhelp/dialogs/lang/az.js diff --git a/djangocms_text/contrib/text_ckeditor4/static/ckeditor/plugins/a11yhelp/dialogs/lang/bg.js b/djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/plugins/a11yhelp/dialogs/lang/bg.js similarity index 100% rename from djangocms_text/contrib/text_ckeditor4/static/ckeditor/plugins/a11yhelp/dialogs/lang/bg.js rename to djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/plugins/a11yhelp/dialogs/lang/bg.js diff --git a/djangocms_text/contrib/text_ckeditor4/static/ckeditor/plugins/a11yhelp/dialogs/lang/ca.js b/djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/plugins/a11yhelp/dialogs/lang/ca.js similarity index 100% rename from djangocms_text/contrib/text_ckeditor4/static/ckeditor/plugins/a11yhelp/dialogs/lang/ca.js rename to djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/plugins/a11yhelp/dialogs/lang/ca.js diff --git a/djangocms_text/contrib/text_ckeditor4/static/ckeditor/plugins/a11yhelp/dialogs/lang/cs.js b/djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/plugins/a11yhelp/dialogs/lang/cs.js similarity index 100% rename from djangocms_text/contrib/text_ckeditor4/static/ckeditor/plugins/a11yhelp/dialogs/lang/cs.js rename to djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/plugins/a11yhelp/dialogs/lang/cs.js diff --git a/djangocms_text/contrib/text_ckeditor4/static/ckeditor/plugins/a11yhelp/dialogs/lang/cy.js b/djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/plugins/a11yhelp/dialogs/lang/cy.js similarity index 100% rename from djangocms_text/contrib/text_ckeditor4/static/ckeditor/plugins/a11yhelp/dialogs/lang/cy.js rename to djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/plugins/a11yhelp/dialogs/lang/cy.js diff --git a/djangocms_text/contrib/text_ckeditor4/static/ckeditor/plugins/a11yhelp/dialogs/lang/da.js b/djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/plugins/a11yhelp/dialogs/lang/da.js similarity index 100% rename from djangocms_text/contrib/text_ckeditor4/static/ckeditor/plugins/a11yhelp/dialogs/lang/da.js rename to djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/plugins/a11yhelp/dialogs/lang/da.js diff --git a/djangocms_text/contrib/text_ckeditor4/static/ckeditor/plugins/a11yhelp/dialogs/lang/de-ch.js b/djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/plugins/a11yhelp/dialogs/lang/de-ch.js similarity index 100% rename from djangocms_text/contrib/text_ckeditor4/static/ckeditor/plugins/a11yhelp/dialogs/lang/de-ch.js rename to djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/plugins/a11yhelp/dialogs/lang/de-ch.js diff --git a/djangocms_text/contrib/text_ckeditor4/static/ckeditor/plugins/a11yhelp/dialogs/lang/de.js b/djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/plugins/a11yhelp/dialogs/lang/de.js similarity index 100% rename from djangocms_text/contrib/text_ckeditor4/static/ckeditor/plugins/a11yhelp/dialogs/lang/de.js rename to djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/plugins/a11yhelp/dialogs/lang/de.js diff --git a/djangocms_text/contrib/text_ckeditor4/static/ckeditor/plugins/a11yhelp/dialogs/lang/el.js b/djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/plugins/a11yhelp/dialogs/lang/el.js similarity index 100% rename from djangocms_text/contrib/text_ckeditor4/static/ckeditor/plugins/a11yhelp/dialogs/lang/el.js rename to djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/plugins/a11yhelp/dialogs/lang/el.js diff --git a/djangocms_text/contrib/text_ckeditor4/static/ckeditor/plugins/a11yhelp/dialogs/lang/en-au.js b/djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/plugins/a11yhelp/dialogs/lang/en-au.js similarity index 100% rename from djangocms_text/contrib/text_ckeditor4/static/ckeditor/plugins/a11yhelp/dialogs/lang/en-au.js rename to djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/plugins/a11yhelp/dialogs/lang/en-au.js diff --git a/djangocms_text/contrib/text_ckeditor4/static/ckeditor/plugins/a11yhelp/dialogs/lang/en-gb.js b/djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/plugins/a11yhelp/dialogs/lang/en-gb.js similarity index 100% rename from djangocms_text/contrib/text_ckeditor4/static/ckeditor/plugins/a11yhelp/dialogs/lang/en-gb.js rename to djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/plugins/a11yhelp/dialogs/lang/en-gb.js diff --git a/djangocms_text/contrib/text_ckeditor4/static/ckeditor/plugins/a11yhelp/dialogs/lang/en.js b/djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/plugins/a11yhelp/dialogs/lang/en.js similarity index 100% rename from djangocms_text/contrib/text_ckeditor4/static/ckeditor/plugins/a11yhelp/dialogs/lang/en.js rename to djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/plugins/a11yhelp/dialogs/lang/en.js diff --git a/djangocms_text/contrib/text_ckeditor4/static/ckeditor/plugins/a11yhelp/dialogs/lang/eo.js b/djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/plugins/a11yhelp/dialogs/lang/eo.js similarity index 100% rename from djangocms_text/contrib/text_ckeditor4/static/ckeditor/plugins/a11yhelp/dialogs/lang/eo.js rename to djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/plugins/a11yhelp/dialogs/lang/eo.js diff --git a/djangocms_text/contrib/text_ckeditor4/static/ckeditor/plugins/a11yhelp/dialogs/lang/es-mx.js b/djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/plugins/a11yhelp/dialogs/lang/es-mx.js similarity index 100% rename from djangocms_text/contrib/text_ckeditor4/static/ckeditor/plugins/a11yhelp/dialogs/lang/es-mx.js rename to djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/plugins/a11yhelp/dialogs/lang/es-mx.js diff --git a/djangocms_text/contrib/text_ckeditor4/static/ckeditor/plugins/a11yhelp/dialogs/lang/es.js b/djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/plugins/a11yhelp/dialogs/lang/es.js similarity index 100% rename from djangocms_text/contrib/text_ckeditor4/static/ckeditor/plugins/a11yhelp/dialogs/lang/es.js rename to djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/plugins/a11yhelp/dialogs/lang/es.js diff --git a/djangocms_text/contrib/text_ckeditor4/static/ckeditor/plugins/a11yhelp/dialogs/lang/et.js b/djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/plugins/a11yhelp/dialogs/lang/et.js similarity index 100% rename from djangocms_text/contrib/text_ckeditor4/static/ckeditor/plugins/a11yhelp/dialogs/lang/et.js rename to djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/plugins/a11yhelp/dialogs/lang/et.js diff --git a/djangocms_text/contrib/text_ckeditor4/static/ckeditor/plugins/a11yhelp/dialogs/lang/eu.js b/djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/plugins/a11yhelp/dialogs/lang/eu.js similarity index 100% rename from djangocms_text/contrib/text_ckeditor4/static/ckeditor/plugins/a11yhelp/dialogs/lang/eu.js rename to djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/plugins/a11yhelp/dialogs/lang/eu.js diff --git a/djangocms_text/contrib/text_ckeditor4/static/ckeditor/plugins/a11yhelp/dialogs/lang/fa.js b/djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/plugins/a11yhelp/dialogs/lang/fa.js similarity index 100% rename from djangocms_text/contrib/text_ckeditor4/static/ckeditor/plugins/a11yhelp/dialogs/lang/fa.js rename to djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/plugins/a11yhelp/dialogs/lang/fa.js diff --git a/djangocms_text/contrib/text_ckeditor4/static/ckeditor/plugins/a11yhelp/dialogs/lang/fi.js b/djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/plugins/a11yhelp/dialogs/lang/fi.js similarity index 100% rename from djangocms_text/contrib/text_ckeditor4/static/ckeditor/plugins/a11yhelp/dialogs/lang/fi.js rename to djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/plugins/a11yhelp/dialogs/lang/fi.js diff --git a/djangocms_text/contrib/text_ckeditor4/static/ckeditor/plugins/a11yhelp/dialogs/lang/fo.js b/djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/plugins/a11yhelp/dialogs/lang/fo.js similarity index 100% rename from djangocms_text/contrib/text_ckeditor4/static/ckeditor/plugins/a11yhelp/dialogs/lang/fo.js rename to djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/plugins/a11yhelp/dialogs/lang/fo.js diff --git a/djangocms_text/contrib/text_ckeditor4/static/ckeditor/plugins/a11yhelp/dialogs/lang/fr-ca.js b/djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/plugins/a11yhelp/dialogs/lang/fr-ca.js similarity index 100% rename from djangocms_text/contrib/text_ckeditor4/static/ckeditor/plugins/a11yhelp/dialogs/lang/fr-ca.js rename to djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/plugins/a11yhelp/dialogs/lang/fr-ca.js diff --git a/djangocms_text/contrib/text_ckeditor4/static/ckeditor/plugins/a11yhelp/dialogs/lang/fr.js b/djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/plugins/a11yhelp/dialogs/lang/fr.js similarity index 100% rename from djangocms_text/contrib/text_ckeditor4/static/ckeditor/plugins/a11yhelp/dialogs/lang/fr.js rename to djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/plugins/a11yhelp/dialogs/lang/fr.js diff --git a/djangocms_text/contrib/text_ckeditor4/static/ckeditor/plugins/a11yhelp/dialogs/lang/gl.js b/djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/plugins/a11yhelp/dialogs/lang/gl.js similarity index 100% rename from djangocms_text/contrib/text_ckeditor4/static/ckeditor/plugins/a11yhelp/dialogs/lang/gl.js rename to djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/plugins/a11yhelp/dialogs/lang/gl.js diff --git a/djangocms_text/contrib/text_ckeditor4/static/ckeditor/plugins/a11yhelp/dialogs/lang/gu.js b/djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/plugins/a11yhelp/dialogs/lang/gu.js similarity index 100% rename from djangocms_text/contrib/text_ckeditor4/static/ckeditor/plugins/a11yhelp/dialogs/lang/gu.js rename to djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/plugins/a11yhelp/dialogs/lang/gu.js diff --git a/djangocms_text/contrib/text_ckeditor4/static/ckeditor/plugins/a11yhelp/dialogs/lang/he.js b/djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/plugins/a11yhelp/dialogs/lang/he.js similarity index 100% rename from djangocms_text/contrib/text_ckeditor4/static/ckeditor/plugins/a11yhelp/dialogs/lang/he.js rename to djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/plugins/a11yhelp/dialogs/lang/he.js diff --git a/djangocms_text/contrib/text_ckeditor4/static/ckeditor/plugins/a11yhelp/dialogs/lang/hi.js b/djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/plugins/a11yhelp/dialogs/lang/hi.js similarity index 100% rename from djangocms_text/contrib/text_ckeditor4/static/ckeditor/plugins/a11yhelp/dialogs/lang/hi.js rename to djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/plugins/a11yhelp/dialogs/lang/hi.js diff --git a/djangocms_text/contrib/text_ckeditor4/static/ckeditor/plugins/a11yhelp/dialogs/lang/hr.js b/djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/plugins/a11yhelp/dialogs/lang/hr.js similarity index 100% rename from djangocms_text/contrib/text_ckeditor4/static/ckeditor/plugins/a11yhelp/dialogs/lang/hr.js rename to djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/plugins/a11yhelp/dialogs/lang/hr.js diff --git a/djangocms_text/contrib/text_ckeditor4/static/ckeditor/plugins/a11yhelp/dialogs/lang/hu.js b/djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/plugins/a11yhelp/dialogs/lang/hu.js similarity index 100% rename from djangocms_text/contrib/text_ckeditor4/static/ckeditor/plugins/a11yhelp/dialogs/lang/hu.js rename to djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/plugins/a11yhelp/dialogs/lang/hu.js diff --git a/djangocms_text/contrib/text_ckeditor4/static/ckeditor/plugins/a11yhelp/dialogs/lang/id.js b/djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/plugins/a11yhelp/dialogs/lang/id.js similarity index 100% rename from djangocms_text/contrib/text_ckeditor4/static/ckeditor/plugins/a11yhelp/dialogs/lang/id.js rename to djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/plugins/a11yhelp/dialogs/lang/id.js diff --git a/djangocms_text/contrib/text_ckeditor4/static/ckeditor/plugins/a11yhelp/dialogs/lang/it.js b/djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/plugins/a11yhelp/dialogs/lang/it.js similarity index 100% rename from djangocms_text/contrib/text_ckeditor4/static/ckeditor/plugins/a11yhelp/dialogs/lang/it.js rename to djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/plugins/a11yhelp/dialogs/lang/it.js diff --git a/djangocms_text/contrib/text_ckeditor4/static/ckeditor/plugins/a11yhelp/dialogs/lang/ja.js b/djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/plugins/a11yhelp/dialogs/lang/ja.js similarity index 100% rename from djangocms_text/contrib/text_ckeditor4/static/ckeditor/plugins/a11yhelp/dialogs/lang/ja.js rename to djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/plugins/a11yhelp/dialogs/lang/ja.js diff --git a/djangocms_text/contrib/text_ckeditor4/static/ckeditor/plugins/a11yhelp/dialogs/lang/km.js b/djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/plugins/a11yhelp/dialogs/lang/km.js similarity index 100% rename from djangocms_text/contrib/text_ckeditor4/static/ckeditor/plugins/a11yhelp/dialogs/lang/km.js rename to djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/plugins/a11yhelp/dialogs/lang/km.js diff --git a/djangocms_text/contrib/text_ckeditor4/static/ckeditor/plugins/a11yhelp/dialogs/lang/ko.js b/djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/plugins/a11yhelp/dialogs/lang/ko.js similarity index 100% rename from djangocms_text/contrib/text_ckeditor4/static/ckeditor/plugins/a11yhelp/dialogs/lang/ko.js rename to djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/plugins/a11yhelp/dialogs/lang/ko.js diff --git a/djangocms_text/contrib/text_ckeditor4/static/ckeditor/plugins/a11yhelp/dialogs/lang/ku.js b/djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/plugins/a11yhelp/dialogs/lang/ku.js similarity index 100% rename from djangocms_text/contrib/text_ckeditor4/static/ckeditor/plugins/a11yhelp/dialogs/lang/ku.js rename to djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/plugins/a11yhelp/dialogs/lang/ku.js diff --git a/djangocms_text/contrib/text_ckeditor4/static/ckeditor/plugins/a11yhelp/dialogs/lang/lt.js b/djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/plugins/a11yhelp/dialogs/lang/lt.js similarity index 100% rename from djangocms_text/contrib/text_ckeditor4/static/ckeditor/plugins/a11yhelp/dialogs/lang/lt.js rename to djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/plugins/a11yhelp/dialogs/lang/lt.js diff --git a/djangocms_text/contrib/text_ckeditor4/static/ckeditor/plugins/a11yhelp/dialogs/lang/lv.js b/djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/plugins/a11yhelp/dialogs/lang/lv.js similarity index 100% rename from djangocms_text/contrib/text_ckeditor4/static/ckeditor/plugins/a11yhelp/dialogs/lang/lv.js rename to djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/plugins/a11yhelp/dialogs/lang/lv.js diff --git a/djangocms_text/contrib/text_ckeditor4/static/ckeditor/plugins/a11yhelp/dialogs/lang/mk.js b/djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/plugins/a11yhelp/dialogs/lang/mk.js similarity index 100% rename from djangocms_text/contrib/text_ckeditor4/static/ckeditor/plugins/a11yhelp/dialogs/lang/mk.js rename to djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/plugins/a11yhelp/dialogs/lang/mk.js diff --git a/djangocms_text/contrib/text_ckeditor4/static/ckeditor/plugins/a11yhelp/dialogs/lang/mn.js b/djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/plugins/a11yhelp/dialogs/lang/mn.js similarity index 100% rename from djangocms_text/contrib/text_ckeditor4/static/ckeditor/plugins/a11yhelp/dialogs/lang/mn.js rename to djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/plugins/a11yhelp/dialogs/lang/mn.js diff --git a/djangocms_text/contrib/text_ckeditor4/static/ckeditor/plugins/a11yhelp/dialogs/lang/nb.js b/djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/plugins/a11yhelp/dialogs/lang/nb.js similarity index 100% rename from djangocms_text/contrib/text_ckeditor4/static/ckeditor/plugins/a11yhelp/dialogs/lang/nb.js rename to djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/plugins/a11yhelp/dialogs/lang/nb.js diff --git a/djangocms_text/contrib/text_ckeditor4/static/ckeditor/plugins/a11yhelp/dialogs/lang/nl.js b/djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/plugins/a11yhelp/dialogs/lang/nl.js similarity index 100% rename from djangocms_text/contrib/text_ckeditor4/static/ckeditor/plugins/a11yhelp/dialogs/lang/nl.js rename to djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/plugins/a11yhelp/dialogs/lang/nl.js diff --git a/djangocms_text/contrib/text_ckeditor4/static/ckeditor/plugins/a11yhelp/dialogs/lang/no.js b/djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/plugins/a11yhelp/dialogs/lang/no.js similarity index 100% rename from djangocms_text/contrib/text_ckeditor4/static/ckeditor/plugins/a11yhelp/dialogs/lang/no.js rename to djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/plugins/a11yhelp/dialogs/lang/no.js diff --git a/djangocms_text/contrib/text_ckeditor4/static/ckeditor/plugins/a11yhelp/dialogs/lang/oc.js b/djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/plugins/a11yhelp/dialogs/lang/oc.js similarity index 100% rename from djangocms_text/contrib/text_ckeditor4/static/ckeditor/plugins/a11yhelp/dialogs/lang/oc.js rename to djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/plugins/a11yhelp/dialogs/lang/oc.js diff --git a/djangocms_text/contrib/text_ckeditor4/static/ckeditor/plugins/a11yhelp/dialogs/lang/pl.js b/djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/plugins/a11yhelp/dialogs/lang/pl.js similarity index 100% rename from djangocms_text/contrib/text_ckeditor4/static/ckeditor/plugins/a11yhelp/dialogs/lang/pl.js rename to djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/plugins/a11yhelp/dialogs/lang/pl.js diff --git a/djangocms_text/contrib/text_ckeditor4/static/ckeditor/plugins/a11yhelp/dialogs/lang/pt-br.js b/djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/plugins/a11yhelp/dialogs/lang/pt-br.js similarity index 100% rename from djangocms_text/contrib/text_ckeditor4/static/ckeditor/plugins/a11yhelp/dialogs/lang/pt-br.js rename to djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/plugins/a11yhelp/dialogs/lang/pt-br.js diff --git a/djangocms_text/contrib/text_ckeditor4/static/ckeditor/plugins/a11yhelp/dialogs/lang/pt.js b/djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/plugins/a11yhelp/dialogs/lang/pt.js similarity index 100% rename from djangocms_text/contrib/text_ckeditor4/static/ckeditor/plugins/a11yhelp/dialogs/lang/pt.js rename to djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/plugins/a11yhelp/dialogs/lang/pt.js diff --git a/djangocms_text/contrib/text_ckeditor4/static/ckeditor/plugins/a11yhelp/dialogs/lang/ro.js b/djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/plugins/a11yhelp/dialogs/lang/ro.js similarity index 100% rename from djangocms_text/contrib/text_ckeditor4/static/ckeditor/plugins/a11yhelp/dialogs/lang/ro.js rename to djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/plugins/a11yhelp/dialogs/lang/ro.js diff --git a/djangocms_text/contrib/text_ckeditor4/static/ckeditor/plugins/a11yhelp/dialogs/lang/ru.js b/djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/plugins/a11yhelp/dialogs/lang/ru.js similarity index 100% rename from djangocms_text/contrib/text_ckeditor4/static/ckeditor/plugins/a11yhelp/dialogs/lang/ru.js rename to djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/plugins/a11yhelp/dialogs/lang/ru.js diff --git a/djangocms_text/contrib/text_ckeditor4/static/ckeditor/plugins/a11yhelp/dialogs/lang/si.js b/djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/plugins/a11yhelp/dialogs/lang/si.js similarity index 100% rename from djangocms_text/contrib/text_ckeditor4/static/ckeditor/plugins/a11yhelp/dialogs/lang/si.js rename to djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/plugins/a11yhelp/dialogs/lang/si.js diff --git a/djangocms_text/contrib/text_ckeditor4/static/ckeditor/plugins/a11yhelp/dialogs/lang/sk.js b/djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/plugins/a11yhelp/dialogs/lang/sk.js similarity index 100% rename from djangocms_text/contrib/text_ckeditor4/static/ckeditor/plugins/a11yhelp/dialogs/lang/sk.js rename to djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/plugins/a11yhelp/dialogs/lang/sk.js diff --git a/djangocms_text/contrib/text_ckeditor4/static/ckeditor/plugins/a11yhelp/dialogs/lang/sl.js b/djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/plugins/a11yhelp/dialogs/lang/sl.js similarity index 100% rename from djangocms_text/contrib/text_ckeditor4/static/ckeditor/plugins/a11yhelp/dialogs/lang/sl.js rename to djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/plugins/a11yhelp/dialogs/lang/sl.js diff --git a/djangocms_text/contrib/text_ckeditor4/static/ckeditor/plugins/a11yhelp/dialogs/lang/sq.js b/djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/plugins/a11yhelp/dialogs/lang/sq.js similarity index 100% rename from djangocms_text/contrib/text_ckeditor4/static/ckeditor/plugins/a11yhelp/dialogs/lang/sq.js rename to djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/plugins/a11yhelp/dialogs/lang/sq.js diff --git a/djangocms_text/contrib/text_ckeditor4/static/ckeditor/plugins/a11yhelp/dialogs/lang/sr-latn.js b/djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/plugins/a11yhelp/dialogs/lang/sr-latn.js similarity index 100% rename from djangocms_text/contrib/text_ckeditor4/static/ckeditor/plugins/a11yhelp/dialogs/lang/sr-latn.js rename to djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/plugins/a11yhelp/dialogs/lang/sr-latn.js diff --git a/djangocms_text/contrib/text_ckeditor4/static/ckeditor/plugins/a11yhelp/dialogs/lang/sr.js b/djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/plugins/a11yhelp/dialogs/lang/sr.js similarity index 100% rename from djangocms_text/contrib/text_ckeditor4/static/ckeditor/plugins/a11yhelp/dialogs/lang/sr.js rename to djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/plugins/a11yhelp/dialogs/lang/sr.js diff --git a/djangocms_text/contrib/text_ckeditor4/static/ckeditor/plugins/a11yhelp/dialogs/lang/sv.js b/djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/plugins/a11yhelp/dialogs/lang/sv.js similarity index 100% rename from djangocms_text/contrib/text_ckeditor4/static/ckeditor/plugins/a11yhelp/dialogs/lang/sv.js rename to djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/plugins/a11yhelp/dialogs/lang/sv.js diff --git a/djangocms_text/contrib/text_ckeditor4/static/ckeditor/plugins/a11yhelp/dialogs/lang/th.js b/djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/plugins/a11yhelp/dialogs/lang/th.js similarity index 100% rename from djangocms_text/contrib/text_ckeditor4/static/ckeditor/plugins/a11yhelp/dialogs/lang/th.js rename to djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/plugins/a11yhelp/dialogs/lang/th.js diff --git a/djangocms_text/contrib/text_ckeditor4/static/ckeditor/plugins/a11yhelp/dialogs/lang/tr.js b/djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/plugins/a11yhelp/dialogs/lang/tr.js similarity index 100% rename from djangocms_text/contrib/text_ckeditor4/static/ckeditor/plugins/a11yhelp/dialogs/lang/tr.js rename to djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/plugins/a11yhelp/dialogs/lang/tr.js diff --git a/djangocms_text/contrib/text_ckeditor4/static/ckeditor/plugins/a11yhelp/dialogs/lang/tt.js b/djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/plugins/a11yhelp/dialogs/lang/tt.js similarity index 100% rename from djangocms_text/contrib/text_ckeditor4/static/ckeditor/plugins/a11yhelp/dialogs/lang/tt.js rename to djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/plugins/a11yhelp/dialogs/lang/tt.js diff --git a/djangocms_text/contrib/text_ckeditor4/static/ckeditor/plugins/a11yhelp/dialogs/lang/ug.js b/djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/plugins/a11yhelp/dialogs/lang/ug.js similarity index 100% rename from djangocms_text/contrib/text_ckeditor4/static/ckeditor/plugins/a11yhelp/dialogs/lang/ug.js rename to djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/plugins/a11yhelp/dialogs/lang/ug.js diff --git a/djangocms_text/contrib/text_ckeditor4/static/ckeditor/plugins/a11yhelp/dialogs/lang/uk.js b/djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/plugins/a11yhelp/dialogs/lang/uk.js similarity index 100% rename from djangocms_text/contrib/text_ckeditor4/static/ckeditor/plugins/a11yhelp/dialogs/lang/uk.js rename to djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/plugins/a11yhelp/dialogs/lang/uk.js diff --git a/djangocms_text/contrib/text_ckeditor4/static/ckeditor/plugins/a11yhelp/dialogs/lang/vi.js b/djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/plugins/a11yhelp/dialogs/lang/vi.js similarity index 100% rename from djangocms_text/contrib/text_ckeditor4/static/ckeditor/plugins/a11yhelp/dialogs/lang/vi.js rename to djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/plugins/a11yhelp/dialogs/lang/vi.js diff --git a/djangocms_text/contrib/text_ckeditor4/static/ckeditor/plugins/a11yhelp/dialogs/lang/zh-cn.js b/djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/plugins/a11yhelp/dialogs/lang/zh-cn.js similarity index 100% rename from djangocms_text/contrib/text_ckeditor4/static/ckeditor/plugins/a11yhelp/dialogs/lang/zh-cn.js rename to djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/plugins/a11yhelp/dialogs/lang/zh-cn.js diff --git a/djangocms_text/contrib/text_ckeditor4/static/ckeditor/plugins/a11yhelp/dialogs/lang/zh.js b/djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/plugins/a11yhelp/dialogs/lang/zh.js similarity index 100% rename from djangocms_text/contrib/text_ckeditor4/static/ckeditor/plugins/a11yhelp/dialogs/lang/zh.js rename to djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/plugins/a11yhelp/dialogs/lang/zh.js diff --git a/djangocms_text/contrib/text_ckeditor4/static/ckeditor/plugins/about/dialogs/about.js b/djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/plugins/about/dialogs/about.js similarity index 100% rename from djangocms_text/contrib/text_ckeditor4/static/ckeditor/plugins/about/dialogs/about.js rename to djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/plugins/about/dialogs/about.js diff --git a/djangocms_text/contrib/text_ckeditor4/static/ckeditor/plugins/about/dialogs/hidpi/logo_ckeditor.png b/djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/plugins/about/dialogs/hidpi/logo_ckeditor.png similarity index 100% rename from djangocms_text/contrib/text_ckeditor4/static/ckeditor/plugins/about/dialogs/hidpi/logo_ckeditor.png rename to djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/plugins/about/dialogs/hidpi/logo_ckeditor.png diff --git a/djangocms_text/contrib/text_ckeditor4/static/ckeditor/plugins/about/dialogs/logo_ckeditor.png b/djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/plugins/about/dialogs/logo_ckeditor.png similarity index 100% rename from djangocms_text/contrib/text_ckeditor4/static/ckeditor/plugins/about/dialogs/logo_ckeditor.png rename to djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/plugins/about/dialogs/logo_ckeditor.png diff --git a/djangocms_text/contrib/text_ckeditor4/static/ckeditor/plugins/clipboard/dialogs/paste.js b/djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/plugins/clipboard/dialogs/paste.js similarity index 100% rename from djangocms_text/contrib/text_ckeditor4/static/ckeditor/plugins/clipboard/dialogs/paste.js rename to djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/plugins/clipboard/dialogs/paste.js diff --git a/djangocms_text/contrib/text_ckeditor4/static/ckeditor/plugins/dialog/dialogDefinition.js b/djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/plugins/dialog/dialogDefinition.js similarity index 100% rename from djangocms_text/contrib/text_ckeditor4/static/ckeditor/plugins/dialog/dialogDefinition.js rename to djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/plugins/dialog/dialogDefinition.js diff --git a/djangocms_text/contrib/text_ckeditor4/static/ckeditor/plugins/dialog/styles/dialog.css b/djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/plugins/dialog/styles/dialog.css similarity index 100% rename from djangocms_text/contrib/text_ckeditor4/static/ckeditor/plugins/dialog/styles/dialog.css rename to djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/plugins/dialog/styles/dialog.css diff --git a/djangocms_text/contrib/text_ckeditor4/static/ckeditor/plugins/icons.png b/djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/plugins/icons.png similarity index 100% rename from djangocms_text/contrib/text_ckeditor4/static/ckeditor/plugins/icons.png rename to djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/plugins/icons.png diff --git a/djangocms_text/contrib/text_ckeditor4/static/ckeditor/plugins/icons_hidpi.png b/djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/plugins/icons_hidpi.png similarity index 100% rename from djangocms_text/contrib/text_ckeditor4/static/ckeditor/plugins/icons_hidpi.png rename to djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/plugins/icons_hidpi.png diff --git a/djangocms_text/contrib/text_ckeditor4/static/ckeditor/plugins/image/dialogs/image.js b/djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/plugins/image/dialogs/image.js similarity index 100% rename from djangocms_text/contrib/text_ckeditor4/static/ckeditor/plugins/image/dialogs/image.js rename to djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/plugins/image/dialogs/image.js diff --git a/djangocms_text/contrib/text_ckeditor4/static/ckeditor/plugins/image/images/noimage.png b/djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/plugins/image/images/noimage.png similarity index 100% rename from djangocms_text/contrib/text_ckeditor4/static/ckeditor/plugins/image/images/noimage.png rename to djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/plugins/image/images/noimage.png diff --git a/djangocms_text/contrib/text_ckeditor4/static/ckeditor/plugins/link/dialogs/anchor.js b/djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/plugins/link/dialogs/anchor.js similarity index 100% rename from djangocms_text/contrib/text_ckeditor4/static/ckeditor/plugins/link/dialogs/anchor.js rename to djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/plugins/link/dialogs/anchor.js diff --git a/djangocms_text/contrib/text_ckeditor4/static/ckeditor/plugins/link/dialogs/link.js b/djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/plugins/link/dialogs/link.js similarity index 100% rename from djangocms_text/contrib/text_ckeditor4/static/ckeditor/plugins/link/dialogs/link.js rename to djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/plugins/link/dialogs/link.js diff --git a/djangocms_text/contrib/text_ckeditor4/static/ckeditor/plugins/link/images/anchor.png b/djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/plugins/link/images/anchor.png similarity index 100% rename from djangocms_text/contrib/text_ckeditor4/static/ckeditor/plugins/link/images/anchor.png rename to djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/plugins/link/images/anchor.png diff --git a/djangocms_text/contrib/text_ckeditor4/static/ckeditor/plugins/link/images/hidpi/anchor.png b/djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/plugins/link/images/hidpi/anchor.png similarity index 100% rename from djangocms_text/contrib/text_ckeditor4/static/ckeditor/plugins/link/images/hidpi/anchor.png rename to djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/plugins/link/images/hidpi/anchor.png diff --git a/djangocms_text/contrib/text_ckeditor4/static/ckeditor/plugins/magicline/images/hidpi/icon-rtl.png b/djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/plugins/magicline/images/hidpi/icon-rtl.png similarity index 100% rename from djangocms_text/contrib/text_ckeditor4/static/ckeditor/plugins/magicline/images/hidpi/icon-rtl.png rename to djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/plugins/magicline/images/hidpi/icon-rtl.png diff --git a/djangocms_text/contrib/text_ckeditor4/static/ckeditor/plugins/magicline/images/hidpi/icon.png b/djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/plugins/magicline/images/hidpi/icon.png similarity index 100% rename from djangocms_text/contrib/text_ckeditor4/static/ckeditor/plugins/magicline/images/hidpi/icon.png rename to djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/plugins/magicline/images/hidpi/icon.png diff --git a/djangocms_text/contrib/text_ckeditor4/static/ckeditor/plugins/magicline/images/icon-rtl.png b/djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/plugins/magicline/images/icon-rtl.png similarity index 100% rename from djangocms_text/contrib/text_ckeditor4/static/ckeditor/plugins/magicline/images/icon-rtl.png rename to djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/plugins/magicline/images/icon-rtl.png diff --git a/djangocms_text/contrib/text_ckeditor4/static/ckeditor/plugins/magicline/images/icon.png b/djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/plugins/magicline/images/icon.png similarity index 100% rename from djangocms_text/contrib/text_ckeditor4/static/ckeditor/plugins/magicline/images/icon.png rename to djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/plugins/magicline/images/icon.png diff --git a/djangocms_text/contrib/text_ckeditor4/static/ckeditor/plugins/pastefromgdocs/filter/default.js b/djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/plugins/pastefromgdocs/filter/default.js similarity index 100% rename from djangocms_text/contrib/text_ckeditor4/static/ckeditor/plugins/pastefromgdocs/filter/default.js rename to djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/plugins/pastefromgdocs/filter/default.js diff --git a/djangocms_text/contrib/text_ckeditor4/static/ckeditor/plugins/pastefromlibreoffice/filter/default.js b/djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/plugins/pastefromlibreoffice/filter/default.js similarity index 100% rename from djangocms_text/contrib/text_ckeditor4/static/ckeditor/plugins/pastefromlibreoffice/filter/default.js rename to djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/plugins/pastefromlibreoffice/filter/default.js diff --git a/djangocms_text/contrib/text_ckeditor4/static/ckeditor/plugins/pastefromword/filter/default.js b/djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/plugins/pastefromword/filter/default.js similarity index 100% rename from djangocms_text/contrib/text_ckeditor4/static/ckeditor/plugins/pastefromword/filter/default.js rename to djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/plugins/pastefromword/filter/default.js diff --git a/djangocms_text/contrib/text_ckeditor4/static/ckeditor/plugins/pastetools/filter/common.js b/djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/plugins/pastetools/filter/common.js similarity index 100% rename from djangocms_text/contrib/text_ckeditor4/static/ckeditor/plugins/pastetools/filter/common.js rename to djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/plugins/pastetools/filter/common.js diff --git a/djangocms_text/contrib/text_ckeditor4/static/ckeditor/plugins/pastetools/filter/image.js b/djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/plugins/pastetools/filter/image.js similarity index 100% rename from djangocms_text/contrib/text_ckeditor4/static/ckeditor/plugins/pastetools/filter/image.js rename to djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/plugins/pastetools/filter/image.js diff --git a/djangocms_text/contrib/text_ckeditor4/static/ckeditor/plugins/scayt/CHANGELOG.md b/djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/plugins/scayt/CHANGELOG.md similarity index 100% rename from djangocms_text/contrib/text_ckeditor4/static/ckeditor/plugins/scayt/CHANGELOG.md rename to djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/plugins/scayt/CHANGELOG.md diff --git a/djangocms_text/contrib/text_ckeditor4/static/ckeditor/plugins/scayt/LICENSE.md b/djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/plugins/scayt/LICENSE.md similarity index 100% rename from djangocms_text/contrib/text_ckeditor4/static/ckeditor/plugins/scayt/LICENSE.md rename to djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/plugins/scayt/LICENSE.md diff --git a/djangocms_text/contrib/text_ckeditor4/static/ckeditor/plugins/scayt/README.md b/djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/plugins/scayt/README.md similarity index 100% rename from djangocms_text/contrib/text_ckeditor4/static/ckeditor/plugins/scayt/README.md rename to djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/plugins/scayt/README.md diff --git a/djangocms_text/contrib/text_ckeditor4/static/ckeditor/plugins/scayt/dialogs/dialog.css b/djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/plugins/scayt/dialogs/dialog.css similarity index 100% rename from djangocms_text/contrib/text_ckeditor4/static/ckeditor/plugins/scayt/dialogs/dialog.css rename to djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/plugins/scayt/dialogs/dialog.css diff --git a/djangocms_text/contrib/text_ckeditor4/static/ckeditor/plugins/scayt/dialogs/options.js b/djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/plugins/scayt/dialogs/options.js similarity index 100% rename from djangocms_text/contrib/text_ckeditor4/static/ckeditor/plugins/scayt/dialogs/options.js rename to djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/plugins/scayt/dialogs/options.js diff --git a/djangocms_text/contrib/text_ckeditor4/static/ckeditor/plugins/scayt/dialogs/toolbar.css b/djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/plugins/scayt/dialogs/toolbar.css similarity index 100% rename from djangocms_text/contrib/text_ckeditor4/static/ckeditor/plugins/scayt/dialogs/toolbar.css rename to djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/plugins/scayt/dialogs/toolbar.css diff --git a/djangocms_text/contrib/text_ckeditor4/static/ckeditor/plugins/scayt/skins/moono-lisa/scayt.css b/djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/plugins/scayt/skins/moono-lisa/scayt.css similarity index 100% rename from djangocms_text/contrib/text_ckeditor4/static/ckeditor/plugins/scayt/skins/moono-lisa/scayt.css rename to djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/plugins/scayt/skins/moono-lisa/scayt.css diff --git a/djangocms_text/contrib/text_ckeditor4/static/ckeditor/plugins/specialchar/dialogs/lang/_translationstatus.txt b/djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/plugins/specialchar/dialogs/lang/_translationstatus.txt similarity index 100% rename from djangocms_text/contrib/text_ckeditor4/static/ckeditor/plugins/specialchar/dialogs/lang/_translationstatus.txt rename to djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/plugins/specialchar/dialogs/lang/_translationstatus.txt diff --git a/djangocms_text/contrib/text_ckeditor4/static/ckeditor/plugins/specialchar/dialogs/lang/af.js b/djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/plugins/specialchar/dialogs/lang/af.js similarity index 100% rename from djangocms_text/contrib/text_ckeditor4/static/ckeditor/plugins/specialchar/dialogs/lang/af.js rename to djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/plugins/specialchar/dialogs/lang/af.js diff --git a/djangocms_text/contrib/text_ckeditor4/static/ckeditor/plugins/specialchar/dialogs/lang/ar.js b/djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/plugins/specialchar/dialogs/lang/ar.js similarity index 100% rename from djangocms_text/contrib/text_ckeditor4/static/ckeditor/plugins/specialchar/dialogs/lang/ar.js rename to djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/plugins/specialchar/dialogs/lang/ar.js diff --git a/djangocms_text/contrib/text_ckeditor4/static/ckeditor/plugins/specialchar/dialogs/lang/az.js b/djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/plugins/specialchar/dialogs/lang/az.js similarity index 100% rename from djangocms_text/contrib/text_ckeditor4/static/ckeditor/plugins/specialchar/dialogs/lang/az.js rename to djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/plugins/specialchar/dialogs/lang/az.js diff --git a/djangocms_text/contrib/text_ckeditor4/static/ckeditor/plugins/specialchar/dialogs/lang/bg.js b/djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/plugins/specialchar/dialogs/lang/bg.js similarity index 100% rename from djangocms_text/contrib/text_ckeditor4/static/ckeditor/plugins/specialchar/dialogs/lang/bg.js rename to djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/plugins/specialchar/dialogs/lang/bg.js diff --git a/djangocms_text/contrib/text_ckeditor4/static/ckeditor/plugins/specialchar/dialogs/lang/ca.js b/djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/plugins/specialchar/dialogs/lang/ca.js similarity index 100% rename from djangocms_text/contrib/text_ckeditor4/static/ckeditor/plugins/specialchar/dialogs/lang/ca.js rename to djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/plugins/specialchar/dialogs/lang/ca.js diff --git a/djangocms_text/contrib/text_ckeditor4/static/ckeditor/plugins/specialchar/dialogs/lang/cs.js b/djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/plugins/specialchar/dialogs/lang/cs.js similarity index 100% rename from djangocms_text/contrib/text_ckeditor4/static/ckeditor/plugins/specialchar/dialogs/lang/cs.js rename to djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/plugins/specialchar/dialogs/lang/cs.js diff --git a/djangocms_text/contrib/text_ckeditor4/static/ckeditor/plugins/specialchar/dialogs/lang/cy.js b/djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/plugins/specialchar/dialogs/lang/cy.js similarity index 100% rename from djangocms_text/contrib/text_ckeditor4/static/ckeditor/plugins/specialchar/dialogs/lang/cy.js rename to djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/plugins/specialchar/dialogs/lang/cy.js diff --git a/djangocms_text/contrib/text_ckeditor4/static/ckeditor/plugins/specialchar/dialogs/lang/da.js b/djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/plugins/specialchar/dialogs/lang/da.js similarity index 100% rename from djangocms_text/contrib/text_ckeditor4/static/ckeditor/plugins/specialchar/dialogs/lang/da.js rename to djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/plugins/specialchar/dialogs/lang/da.js diff --git a/djangocms_text/contrib/text_ckeditor4/static/ckeditor/plugins/specialchar/dialogs/lang/de-ch.js b/djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/plugins/specialchar/dialogs/lang/de-ch.js similarity index 100% rename from djangocms_text/contrib/text_ckeditor4/static/ckeditor/plugins/specialchar/dialogs/lang/de-ch.js rename to djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/plugins/specialchar/dialogs/lang/de-ch.js diff --git a/djangocms_text/contrib/text_ckeditor4/static/ckeditor/plugins/specialchar/dialogs/lang/de.js b/djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/plugins/specialchar/dialogs/lang/de.js similarity index 100% rename from djangocms_text/contrib/text_ckeditor4/static/ckeditor/plugins/specialchar/dialogs/lang/de.js rename to djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/plugins/specialchar/dialogs/lang/de.js diff --git a/djangocms_text/contrib/text_ckeditor4/static/ckeditor/plugins/specialchar/dialogs/lang/el.js b/djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/plugins/specialchar/dialogs/lang/el.js similarity index 100% rename from djangocms_text/contrib/text_ckeditor4/static/ckeditor/plugins/specialchar/dialogs/lang/el.js rename to djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/plugins/specialchar/dialogs/lang/el.js diff --git a/djangocms_text/contrib/text_ckeditor4/static/ckeditor/plugins/specialchar/dialogs/lang/en-au.js b/djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/plugins/specialchar/dialogs/lang/en-au.js similarity index 100% rename from djangocms_text/contrib/text_ckeditor4/static/ckeditor/plugins/specialchar/dialogs/lang/en-au.js rename to djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/plugins/specialchar/dialogs/lang/en-au.js diff --git a/djangocms_text/contrib/text_ckeditor4/static/ckeditor/plugins/specialchar/dialogs/lang/en-ca.js b/djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/plugins/specialchar/dialogs/lang/en-ca.js similarity index 100% rename from djangocms_text/contrib/text_ckeditor4/static/ckeditor/plugins/specialchar/dialogs/lang/en-ca.js rename to djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/plugins/specialchar/dialogs/lang/en-ca.js diff --git a/djangocms_text/contrib/text_ckeditor4/static/ckeditor/plugins/specialchar/dialogs/lang/en-gb.js b/djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/plugins/specialchar/dialogs/lang/en-gb.js similarity index 100% rename from djangocms_text/contrib/text_ckeditor4/static/ckeditor/plugins/specialchar/dialogs/lang/en-gb.js rename to djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/plugins/specialchar/dialogs/lang/en-gb.js diff --git a/djangocms_text/contrib/text_ckeditor4/static/ckeditor/plugins/specialchar/dialogs/lang/en.js b/djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/plugins/specialchar/dialogs/lang/en.js similarity index 100% rename from djangocms_text/contrib/text_ckeditor4/static/ckeditor/plugins/specialchar/dialogs/lang/en.js rename to djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/plugins/specialchar/dialogs/lang/en.js diff --git a/djangocms_text/contrib/text_ckeditor4/static/ckeditor/plugins/specialchar/dialogs/lang/eo.js b/djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/plugins/specialchar/dialogs/lang/eo.js similarity index 100% rename from djangocms_text/contrib/text_ckeditor4/static/ckeditor/plugins/specialchar/dialogs/lang/eo.js rename to djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/plugins/specialchar/dialogs/lang/eo.js diff --git a/djangocms_text/contrib/text_ckeditor4/static/ckeditor/plugins/specialchar/dialogs/lang/es-mx.js b/djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/plugins/specialchar/dialogs/lang/es-mx.js similarity index 100% rename from djangocms_text/contrib/text_ckeditor4/static/ckeditor/plugins/specialchar/dialogs/lang/es-mx.js rename to djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/plugins/specialchar/dialogs/lang/es-mx.js diff --git a/djangocms_text/contrib/text_ckeditor4/static/ckeditor/plugins/specialchar/dialogs/lang/es.js b/djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/plugins/specialchar/dialogs/lang/es.js similarity index 100% rename from djangocms_text/contrib/text_ckeditor4/static/ckeditor/plugins/specialchar/dialogs/lang/es.js rename to djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/plugins/specialchar/dialogs/lang/es.js diff --git a/djangocms_text/contrib/text_ckeditor4/static/ckeditor/plugins/specialchar/dialogs/lang/et.js b/djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/plugins/specialchar/dialogs/lang/et.js similarity index 100% rename from djangocms_text/contrib/text_ckeditor4/static/ckeditor/plugins/specialchar/dialogs/lang/et.js rename to djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/plugins/specialchar/dialogs/lang/et.js diff --git a/djangocms_text/contrib/text_ckeditor4/static/ckeditor/plugins/specialchar/dialogs/lang/eu.js b/djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/plugins/specialchar/dialogs/lang/eu.js similarity index 100% rename from djangocms_text/contrib/text_ckeditor4/static/ckeditor/plugins/specialchar/dialogs/lang/eu.js rename to djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/plugins/specialchar/dialogs/lang/eu.js diff --git a/djangocms_text/contrib/text_ckeditor4/static/ckeditor/plugins/specialchar/dialogs/lang/fa.js b/djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/plugins/specialchar/dialogs/lang/fa.js similarity index 100% rename from djangocms_text/contrib/text_ckeditor4/static/ckeditor/plugins/specialchar/dialogs/lang/fa.js rename to djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/plugins/specialchar/dialogs/lang/fa.js diff --git a/djangocms_text/contrib/text_ckeditor4/static/ckeditor/plugins/specialchar/dialogs/lang/fi.js b/djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/plugins/specialchar/dialogs/lang/fi.js similarity index 100% rename from djangocms_text/contrib/text_ckeditor4/static/ckeditor/plugins/specialchar/dialogs/lang/fi.js rename to djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/plugins/specialchar/dialogs/lang/fi.js diff --git a/djangocms_text/contrib/text_ckeditor4/static/ckeditor/plugins/specialchar/dialogs/lang/fr-ca.js b/djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/plugins/specialchar/dialogs/lang/fr-ca.js similarity index 100% rename from djangocms_text/contrib/text_ckeditor4/static/ckeditor/plugins/specialchar/dialogs/lang/fr-ca.js rename to djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/plugins/specialchar/dialogs/lang/fr-ca.js diff --git a/djangocms_text/contrib/text_ckeditor4/static/ckeditor/plugins/specialchar/dialogs/lang/fr.js b/djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/plugins/specialchar/dialogs/lang/fr.js similarity index 100% rename from djangocms_text/contrib/text_ckeditor4/static/ckeditor/plugins/specialchar/dialogs/lang/fr.js rename to djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/plugins/specialchar/dialogs/lang/fr.js diff --git a/djangocms_text/contrib/text_ckeditor4/static/ckeditor/plugins/specialchar/dialogs/lang/gl.js b/djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/plugins/specialchar/dialogs/lang/gl.js similarity index 100% rename from djangocms_text/contrib/text_ckeditor4/static/ckeditor/plugins/specialchar/dialogs/lang/gl.js rename to djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/plugins/specialchar/dialogs/lang/gl.js diff --git a/djangocms_text/contrib/text_ckeditor4/static/ckeditor/plugins/specialchar/dialogs/lang/he.js b/djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/plugins/specialchar/dialogs/lang/he.js similarity index 100% rename from djangocms_text/contrib/text_ckeditor4/static/ckeditor/plugins/specialchar/dialogs/lang/he.js rename to djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/plugins/specialchar/dialogs/lang/he.js diff --git a/djangocms_text/contrib/text_ckeditor4/static/ckeditor/plugins/specialchar/dialogs/lang/hr.js b/djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/plugins/specialchar/dialogs/lang/hr.js similarity index 100% rename from djangocms_text/contrib/text_ckeditor4/static/ckeditor/plugins/specialchar/dialogs/lang/hr.js rename to djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/plugins/specialchar/dialogs/lang/hr.js diff --git a/djangocms_text/contrib/text_ckeditor4/static/ckeditor/plugins/specialchar/dialogs/lang/hu.js b/djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/plugins/specialchar/dialogs/lang/hu.js similarity index 100% rename from djangocms_text/contrib/text_ckeditor4/static/ckeditor/plugins/specialchar/dialogs/lang/hu.js rename to djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/plugins/specialchar/dialogs/lang/hu.js diff --git a/djangocms_text/contrib/text_ckeditor4/static/ckeditor/plugins/specialchar/dialogs/lang/id.js b/djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/plugins/specialchar/dialogs/lang/id.js similarity index 100% rename from djangocms_text/contrib/text_ckeditor4/static/ckeditor/plugins/specialchar/dialogs/lang/id.js rename to djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/plugins/specialchar/dialogs/lang/id.js diff --git a/djangocms_text/contrib/text_ckeditor4/static/ckeditor/plugins/specialchar/dialogs/lang/it.js b/djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/plugins/specialchar/dialogs/lang/it.js similarity index 100% rename from djangocms_text/contrib/text_ckeditor4/static/ckeditor/plugins/specialchar/dialogs/lang/it.js rename to djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/plugins/specialchar/dialogs/lang/it.js diff --git a/djangocms_text/contrib/text_ckeditor4/static/ckeditor/plugins/specialchar/dialogs/lang/ja.js b/djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/plugins/specialchar/dialogs/lang/ja.js similarity index 100% rename from djangocms_text/contrib/text_ckeditor4/static/ckeditor/plugins/specialchar/dialogs/lang/ja.js rename to djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/plugins/specialchar/dialogs/lang/ja.js diff --git a/djangocms_text/contrib/text_ckeditor4/static/ckeditor/plugins/specialchar/dialogs/lang/km.js b/djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/plugins/specialchar/dialogs/lang/km.js similarity index 100% rename from djangocms_text/contrib/text_ckeditor4/static/ckeditor/plugins/specialchar/dialogs/lang/km.js rename to djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/plugins/specialchar/dialogs/lang/km.js diff --git a/djangocms_text/contrib/text_ckeditor4/static/ckeditor/plugins/specialchar/dialogs/lang/ko.js b/djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/plugins/specialchar/dialogs/lang/ko.js similarity index 100% rename from djangocms_text/contrib/text_ckeditor4/static/ckeditor/plugins/specialchar/dialogs/lang/ko.js rename to djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/plugins/specialchar/dialogs/lang/ko.js diff --git a/djangocms_text/contrib/text_ckeditor4/static/ckeditor/plugins/specialchar/dialogs/lang/ku.js b/djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/plugins/specialchar/dialogs/lang/ku.js similarity index 100% rename from djangocms_text/contrib/text_ckeditor4/static/ckeditor/plugins/specialchar/dialogs/lang/ku.js rename to djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/plugins/specialchar/dialogs/lang/ku.js diff --git a/djangocms_text/contrib/text_ckeditor4/static/ckeditor/plugins/specialchar/dialogs/lang/lt.js b/djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/plugins/specialchar/dialogs/lang/lt.js similarity index 100% rename from djangocms_text/contrib/text_ckeditor4/static/ckeditor/plugins/specialchar/dialogs/lang/lt.js rename to djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/plugins/specialchar/dialogs/lang/lt.js diff --git a/djangocms_text/contrib/text_ckeditor4/static/ckeditor/plugins/specialchar/dialogs/lang/lv.js b/djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/plugins/specialchar/dialogs/lang/lv.js similarity index 100% rename from djangocms_text/contrib/text_ckeditor4/static/ckeditor/plugins/specialchar/dialogs/lang/lv.js rename to djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/plugins/specialchar/dialogs/lang/lv.js diff --git a/djangocms_text/contrib/text_ckeditor4/static/ckeditor/plugins/specialchar/dialogs/lang/nb.js b/djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/plugins/specialchar/dialogs/lang/nb.js similarity index 100% rename from djangocms_text/contrib/text_ckeditor4/static/ckeditor/plugins/specialchar/dialogs/lang/nb.js rename to djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/plugins/specialchar/dialogs/lang/nb.js diff --git a/djangocms_text/contrib/text_ckeditor4/static/ckeditor/plugins/specialchar/dialogs/lang/nl.js b/djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/plugins/specialchar/dialogs/lang/nl.js similarity index 100% rename from djangocms_text/contrib/text_ckeditor4/static/ckeditor/plugins/specialchar/dialogs/lang/nl.js rename to djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/plugins/specialchar/dialogs/lang/nl.js diff --git a/djangocms_text/contrib/text_ckeditor4/static/ckeditor/plugins/specialchar/dialogs/lang/no.js b/djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/plugins/specialchar/dialogs/lang/no.js similarity index 100% rename from djangocms_text/contrib/text_ckeditor4/static/ckeditor/plugins/specialchar/dialogs/lang/no.js rename to djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/plugins/specialchar/dialogs/lang/no.js diff --git a/djangocms_text/contrib/text_ckeditor4/static/ckeditor/plugins/specialchar/dialogs/lang/oc.js b/djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/plugins/specialchar/dialogs/lang/oc.js similarity index 100% rename from djangocms_text/contrib/text_ckeditor4/static/ckeditor/plugins/specialchar/dialogs/lang/oc.js rename to djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/plugins/specialchar/dialogs/lang/oc.js diff --git a/djangocms_text/contrib/text_ckeditor4/static/ckeditor/plugins/specialchar/dialogs/lang/pl.js b/djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/plugins/specialchar/dialogs/lang/pl.js similarity index 100% rename from djangocms_text/contrib/text_ckeditor4/static/ckeditor/plugins/specialchar/dialogs/lang/pl.js rename to djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/plugins/specialchar/dialogs/lang/pl.js diff --git a/djangocms_text/contrib/text_ckeditor4/static/ckeditor/plugins/specialchar/dialogs/lang/pt-br.js b/djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/plugins/specialchar/dialogs/lang/pt-br.js similarity index 100% rename from djangocms_text/contrib/text_ckeditor4/static/ckeditor/plugins/specialchar/dialogs/lang/pt-br.js rename to djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/plugins/specialchar/dialogs/lang/pt-br.js diff --git a/djangocms_text/contrib/text_ckeditor4/static/ckeditor/plugins/specialchar/dialogs/lang/pt.js b/djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/plugins/specialchar/dialogs/lang/pt.js similarity index 100% rename from djangocms_text/contrib/text_ckeditor4/static/ckeditor/plugins/specialchar/dialogs/lang/pt.js rename to djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/plugins/specialchar/dialogs/lang/pt.js diff --git a/djangocms_text/contrib/text_ckeditor4/static/ckeditor/plugins/specialchar/dialogs/lang/ro.js b/djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/plugins/specialchar/dialogs/lang/ro.js similarity index 100% rename from djangocms_text/contrib/text_ckeditor4/static/ckeditor/plugins/specialchar/dialogs/lang/ro.js rename to djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/plugins/specialchar/dialogs/lang/ro.js diff --git a/djangocms_text/contrib/text_ckeditor4/static/ckeditor/plugins/specialchar/dialogs/lang/ru.js b/djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/plugins/specialchar/dialogs/lang/ru.js similarity index 100% rename from djangocms_text/contrib/text_ckeditor4/static/ckeditor/plugins/specialchar/dialogs/lang/ru.js rename to djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/plugins/specialchar/dialogs/lang/ru.js diff --git a/djangocms_text/contrib/text_ckeditor4/static/ckeditor/plugins/specialchar/dialogs/lang/si.js b/djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/plugins/specialchar/dialogs/lang/si.js similarity index 100% rename from djangocms_text/contrib/text_ckeditor4/static/ckeditor/plugins/specialchar/dialogs/lang/si.js rename to djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/plugins/specialchar/dialogs/lang/si.js diff --git a/djangocms_text/contrib/text_ckeditor4/static/ckeditor/plugins/specialchar/dialogs/lang/sk.js b/djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/plugins/specialchar/dialogs/lang/sk.js similarity index 100% rename from djangocms_text/contrib/text_ckeditor4/static/ckeditor/plugins/specialchar/dialogs/lang/sk.js rename to djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/plugins/specialchar/dialogs/lang/sk.js diff --git a/djangocms_text/contrib/text_ckeditor4/static/ckeditor/plugins/specialchar/dialogs/lang/sl.js b/djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/plugins/specialchar/dialogs/lang/sl.js similarity index 100% rename from djangocms_text/contrib/text_ckeditor4/static/ckeditor/plugins/specialchar/dialogs/lang/sl.js rename to djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/plugins/specialchar/dialogs/lang/sl.js diff --git a/djangocms_text/contrib/text_ckeditor4/static/ckeditor/plugins/specialchar/dialogs/lang/sq.js b/djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/plugins/specialchar/dialogs/lang/sq.js similarity index 100% rename from djangocms_text/contrib/text_ckeditor4/static/ckeditor/plugins/specialchar/dialogs/lang/sq.js rename to djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/plugins/specialchar/dialogs/lang/sq.js diff --git a/djangocms_text/contrib/text_ckeditor4/static/ckeditor/plugins/specialchar/dialogs/lang/sr-latn.js b/djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/plugins/specialchar/dialogs/lang/sr-latn.js similarity index 100% rename from djangocms_text/contrib/text_ckeditor4/static/ckeditor/plugins/specialchar/dialogs/lang/sr-latn.js rename to djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/plugins/specialchar/dialogs/lang/sr-latn.js diff --git a/djangocms_text/contrib/text_ckeditor4/static/ckeditor/plugins/specialchar/dialogs/lang/sr.js b/djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/plugins/specialchar/dialogs/lang/sr.js similarity index 100% rename from djangocms_text/contrib/text_ckeditor4/static/ckeditor/plugins/specialchar/dialogs/lang/sr.js rename to djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/plugins/specialchar/dialogs/lang/sr.js diff --git a/djangocms_text/contrib/text_ckeditor4/static/ckeditor/plugins/specialchar/dialogs/lang/sv.js b/djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/plugins/specialchar/dialogs/lang/sv.js similarity index 100% rename from djangocms_text/contrib/text_ckeditor4/static/ckeditor/plugins/specialchar/dialogs/lang/sv.js rename to djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/plugins/specialchar/dialogs/lang/sv.js diff --git a/djangocms_text/contrib/text_ckeditor4/static/ckeditor/plugins/specialchar/dialogs/lang/th.js b/djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/plugins/specialchar/dialogs/lang/th.js similarity index 100% rename from djangocms_text/contrib/text_ckeditor4/static/ckeditor/plugins/specialchar/dialogs/lang/th.js rename to djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/plugins/specialchar/dialogs/lang/th.js diff --git a/djangocms_text/contrib/text_ckeditor4/static/ckeditor/plugins/specialchar/dialogs/lang/tr.js b/djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/plugins/specialchar/dialogs/lang/tr.js similarity index 100% rename from djangocms_text/contrib/text_ckeditor4/static/ckeditor/plugins/specialchar/dialogs/lang/tr.js rename to djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/plugins/specialchar/dialogs/lang/tr.js diff --git a/djangocms_text/contrib/text_ckeditor4/static/ckeditor/plugins/specialchar/dialogs/lang/tt.js b/djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/plugins/specialchar/dialogs/lang/tt.js similarity index 100% rename from djangocms_text/contrib/text_ckeditor4/static/ckeditor/plugins/specialchar/dialogs/lang/tt.js rename to djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/plugins/specialchar/dialogs/lang/tt.js diff --git a/djangocms_text/contrib/text_ckeditor4/static/ckeditor/plugins/specialchar/dialogs/lang/ug.js b/djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/plugins/specialchar/dialogs/lang/ug.js similarity index 100% rename from djangocms_text/contrib/text_ckeditor4/static/ckeditor/plugins/specialchar/dialogs/lang/ug.js rename to djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/plugins/specialchar/dialogs/lang/ug.js diff --git a/djangocms_text/contrib/text_ckeditor4/static/ckeditor/plugins/specialchar/dialogs/lang/uk.js b/djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/plugins/specialchar/dialogs/lang/uk.js similarity index 100% rename from djangocms_text/contrib/text_ckeditor4/static/ckeditor/plugins/specialchar/dialogs/lang/uk.js rename to djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/plugins/specialchar/dialogs/lang/uk.js diff --git a/djangocms_text/contrib/text_ckeditor4/static/ckeditor/plugins/specialchar/dialogs/lang/vi.js b/djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/plugins/specialchar/dialogs/lang/vi.js similarity index 100% rename from djangocms_text/contrib/text_ckeditor4/static/ckeditor/plugins/specialchar/dialogs/lang/vi.js rename to djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/plugins/specialchar/dialogs/lang/vi.js diff --git a/djangocms_text/contrib/text_ckeditor4/static/ckeditor/plugins/specialchar/dialogs/lang/zh-cn.js b/djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/plugins/specialchar/dialogs/lang/zh-cn.js similarity index 100% rename from djangocms_text/contrib/text_ckeditor4/static/ckeditor/plugins/specialchar/dialogs/lang/zh-cn.js rename to djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/plugins/specialchar/dialogs/lang/zh-cn.js diff --git a/djangocms_text/contrib/text_ckeditor4/static/ckeditor/plugins/specialchar/dialogs/lang/zh.js b/djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/plugins/specialchar/dialogs/lang/zh.js similarity index 100% rename from djangocms_text/contrib/text_ckeditor4/static/ckeditor/plugins/specialchar/dialogs/lang/zh.js rename to djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/plugins/specialchar/dialogs/lang/zh.js diff --git a/djangocms_text/contrib/text_ckeditor4/static/ckeditor/plugins/specialchar/dialogs/specialchar.js b/djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/plugins/specialchar/dialogs/specialchar.js similarity index 100% rename from djangocms_text/contrib/text_ckeditor4/static/ckeditor/plugins/specialchar/dialogs/specialchar.js rename to djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/plugins/specialchar/dialogs/specialchar.js diff --git a/djangocms_text/contrib/text_ckeditor4/static/ckeditor/plugins/table/dialogs/table.js b/djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/plugins/table/dialogs/table.js similarity index 100% rename from djangocms_text/contrib/text_ckeditor4/static/ckeditor/plugins/table/dialogs/table.js rename to djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/plugins/table/dialogs/table.js diff --git a/djangocms_text/contrib/text_ckeditor4/static/ckeditor/plugins/tableselection/styles/tableselection.css b/djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/plugins/tableselection/styles/tableselection.css similarity index 100% rename from djangocms_text/contrib/text_ckeditor4/static/ckeditor/plugins/tableselection/styles/tableselection.css rename to djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/plugins/tableselection/styles/tableselection.css diff --git a/djangocms_text/contrib/text_ckeditor4/static/ckeditor/plugins/tabletools/dialogs/tableCell.js b/djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/plugins/tabletools/dialogs/tableCell.js similarity index 100% rename from djangocms_text/contrib/text_ckeditor4/static/ckeditor/plugins/tabletools/dialogs/tableCell.js rename to djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/plugins/tabletools/dialogs/tableCell.js diff --git a/djangocms_text/contrib/text_ckeditor4/static/ckeditor/plugins/widget/images/handle.png b/djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/plugins/widget/images/handle.png similarity index 100% rename from djangocms_text/contrib/text_ckeditor4/static/ckeditor/plugins/widget/images/handle.png rename to djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/plugins/widget/images/handle.png diff --git a/djangocms_text/contrib/text_ckeditor4/static/ckeditor/samples/css/samples.css b/djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/samples/css/samples.css similarity index 100% rename from djangocms_text/contrib/text_ckeditor4/static/ckeditor/samples/css/samples.css rename to djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/samples/css/samples.css diff --git a/djangocms_text/contrib/text_ckeditor4/static/ckeditor/samples/img/github-top.png b/djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/samples/img/github-top.png similarity index 100% rename from djangocms_text/contrib/text_ckeditor4/static/ckeditor/samples/img/github-top.png rename to djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/samples/img/github-top.png diff --git a/djangocms_text/contrib/text_ckeditor4/static/ckeditor/samples/img/header-bg.png b/djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/samples/img/header-bg.png similarity index 100% rename from djangocms_text/contrib/text_ckeditor4/static/ckeditor/samples/img/header-bg.png rename to djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/samples/img/header-bg.png diff --git a/djangocms_text/contrib/text_ckeditor4/static/ckeditor/samples/img/header-separator.png b/djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/samples/img/header-separator.png similarity index 100% rename from djangocms_text/contrib/text_ckeditor4/static/ckeditor/samples/img/header-separator.png rename to djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/samples/img/header-separator.png diff --git a/djangocms_text/contrib/text_ckeditor4/static/ckeditor/samples/img/logo.png b/djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/samples/img/logo.png similarity index 100% rename from djangocms_text/contrib/text_ckeditor4/static/ckeditor/samples/img/logo.png rename to djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/samples/img/logo.png diff --git a/djangocms_text/contrib/text_ckeditor4/static/ckeditor/samples/img/logo.svg b/djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/samples/img/logo.svg similarity index 100% rename from djangocms_text/contrib/text_ckeditor4/static/ckeditor/samples/img/logo.svg rename to djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/samples/img/logo.svg diff --git a/djangocms_text/contrib/text_ckeditor4/static/ckeditor/samples/img/navigation-tip.png b/djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/samples/img/navigation-tip.png similarity index 100% rename from djangocms_text/contrib/text_ckeditor4/static/ckeditor/samples/img/navigation-tip.png rename to djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/samples/img/navigation-tip.png diff --git a/djangocms_text/contrib/text_ckeditor4/static/ckeditor/samples/index.html b/djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/samples/index.html similarity index 100% rename from djangocms_text/contrib/text_ckeditor4/static/ckeditor/samples/index.html rename to djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/samples/index.html diff --git a/djangocms_text/contrib/text_ckeditor4/static/ckeditor/samples/js/sample.js b/djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/samples/js/sample.js similarity index 100% rename from djangocms_text/contrib/text_ckeditor4/static/ckeditor/samples/js/sample.js rename to djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/samples/js/sample.js diff --git a/djangocms_text/contrib/text_ckeditor4/static/ckeditor/samples/js/sf.js b/djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/samples/js/sf.js similarity index 100% rename from djangocms_text/contrib/text_ckeditor4/static/ckeditor/samples/js/sf.js rename to djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/samples/js/sf.js diff --git a/djangocms_text/contrib/text_ckeditor4/static/ckeditor/samples/old/ajax.html b/djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/samples/old/ajax.html similarity index 100% rename from djangocms_text/contrib/text_ckeditor4/static/ckeditor/samples/old/ajax.html rename to djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/samples/old/ajax.html diff --git a/djangocms_text/contrib/text_ckeditor4/static/ckeditor/samples/old/api.html b/djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/samples/old/api.html similarity index 100% rename from djangocms_text/contrib/text_ckeditor4/static/ckeditor/samples/old/api.html rename to djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/samples/old/api.html diff --git a/djangocms_text/contrib/text_ckeditor4/static/ckeditor/samples/old/appendto.html b/djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/samples/old/appendto.html similarity index 100% rename from djangocms_text/contrib/text_ckeditor4/static/ckeditor/samples/old/appendto.html rename to djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/samples/old/appendto.html diff --git a/djangocms_text/contrib/text_ckeditor4/static/ckeditor/samples/old/assets/inlineall/logo.png b/djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/samples/old/assets/inlineall/logo.png similarity index 100% rename from djangocms_text/contrib/text_ckeditor4/static/ckeditor/samples/old/assets/inlineall/logo.png rename to djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/samples/old/assets/inlineall/logo.png diff --git a/djangocms_text/contrib/text_ckeditor4/static/ckeditor/samples/old/assets/outputxhtml/outputxhtml.css b/djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/samples/old/assets/outputxhtml/outputxhtml.css similarity index 100% rename from djangocms_text/contrib/text_ckeditor4/static/ckeditor/samples/old/assets/outputxhtml/outputxhtml.css rename to djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/samples/old/assets/outputxhtml/outputxhtml.css diff --git a/djangocms_text/contrib/text_ckeditor4/static/ckeditor/samples/old/assets/posteddata.php b/djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/samples/old/assets/posteddata.php similarity index 100% rename from djangocms_text/contrib/text_ckeditor4/static/ckeditor/samples/old/assets/posteddata.php rename to djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/samples/old/assets/posteddata.php diff --git a/djangocms_text/contrib/text_ckeditor4/static/ckeditor/samples/old/assets/sample.jpg b/djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/samples/old/assets/sample.jpg similarity index 100% rename from djangocms_text/contrib/text_ckeditor4/static/ckeditor/samples/old/assets/sample.jpg rename to djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/samples/old/assets/sample.jpg diff --git a/djangocms_text/contrib/text_ckeditor4/static/ckeditor/samples/old/assets/uilanguages/languages.js b/djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/samples/old/assets/uilanguages/languages.js similarity index 100% rename from djangocms_text/contrib/text_ckeditor4/static/ckeditor/samples/old/assets/uilanguages/languages.js rename to djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/samples/old/assets/uilanguages/languages.js diff --git a/djangocms_text/contrib/text_ckeditor4/static/ckeditor/samples/old/datafiltering.html b/djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/samples/old/datafiltering.html similarity index 100% rename from djangocms_text/contrib/text_ckeditor4/static/ckeditor/samples/old/datafiltering.html rename to djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/samples/old/datafiltering.html diff --git a/djangocms_text/contrib/text_ckeditor4/static/ckeditor/samples/old/dialog/assets/my_dialog.js b/djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/samples/old/dialog/assets/my_dialog.js similarity index 100% rename from djangocms_text/contrib/text_ckeditor4/static/ckeditor/samples/old/dialog/assets/my_dialog.js rename to djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/samples/old/dialog/assets/my_dialog.js diff --git a/djangocms_text/contrib/text_ckeditor4/static/ckeditor/samples/old/dialog/dialog.html b/djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/samples/old/dialog/dialog.html similarity index 100% rename from djangocms_text/contrib/text_ckeditor4/static/ckeditor/samples/old/dialog/dialog.html rename to djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/samples/old/dialog/dialog.html diff --git a/djangocms_text/contrib/text_ckeditor4/static/ckeditor/samples/old/divreplace.html b/djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/samples/old/divreplace.html similarity index 100% rename from djangocms_text/contrib/text_ckeditor4/static/ckeditor/samples/old/divreplace.html rename to djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/samples/old/divreplace.html diff --git a/djangocms_text/contrib/text_ckeditor4/static/ckeditor/samples/old/enterkey/enterkey.html b/djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/samples/old/enterkey/enterkey.html similarity index 100% rename from djangocms_text/contrib/text_ckeditor4/static/ckeditor/samples/old/enterkey/enterkey.html rename to djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/samples/old/enterkey/enterkey.html diff --git a/djangocms_text/contrib/text_ckeditor4/static/ckeditor/samples/old/htmlwriter/outputhtml.html b/djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/samples/old/htmlwriter/outputhtml.html similarity index 100% rename from djangocms_text/contrib/text_ckeditor4/static/ckeditor/samples/old/htmlwriter/outputhtml.html rename to djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/samples/old/htmlwriter/outputhtml.html diff --git a/djangocms_text/contrib/text_ckeditor4/static/ckeditor/samples/old/index.html b/djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/samples/old/index.html similarity index 100% rename from djangocms_text/contrib/text_ckeditor4/static/ckeditor/samples/old/index.html rename to djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/samples/old/index.html diff --git a/djangocms_text/contrib/text_ckeditor4/static/ckeditor/samples/old/inlineall.html b/djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/samples/old/inlineall.html similarity index 100% rename from djangocms_text/contrib/text_ckeditor4/static/ckeditor/samples/old/inlineall.html rename to djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/samples/old/inlineall.html diff --git a/djangocms_text/contrib/text_ckeditor4/static/ckeditor/samples/old/inlinebycode.html b/djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/samples/old/inlinebycode.html similarity index 100% rename from djangocms_text/contrib/text_ckeditor4/static/ckeditor/samples/old/inlinebycode.html rename to djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/samples/old/inlinebycode.html diff --git a/djangocms_text/contrib/text_ckeditor4/static/ckeditor/samples/old/inlinetextarea.html b/djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/samples/old/inlinetextarea.html similarity index 100% rename from djangocms_text/contrib/text_ckeditor4/static/ckeditor/samples/old/inlinetextarea.html rename to djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/samples/old/inlinetextarea.html diff --git a/djangocms_text/contrib/text_ckeditor4/static/ckeditor/samples/old/jquery.html b/djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/samples/old/jquery.html similarity index 100% rename from djangocms_text/contrib/text_ckeditor4/static/ckeditor/samples/old/jquery.html rename to djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/samples/old/jquery.html diff --git a/djangocms_text/contrib/text_ckeditor4/static/ckeditor/samples/old/magicline/magicline.html b/djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/samples/old/magicline/magicline.html similarity index 100% rename from djangocms_text/contrib/text_ckeditor4/static/ckeditor/samples/old/magicline/magicline.html rename to djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/samples/old/magicline/magicline.html diff --git a/djangocms_text/contrib/text_ckeditor4/static/ckeditor/samples/old/readonly.html b/djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/samples/old/readonly.html similarity index 100% rename from djangocms_text/contrib/text_ckeditor4/static/ckeditor/samples/old/readonly.html rename to djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/samples/old/readonly.html diff --git a/djangocms_text/contrib/text_ckeditor4/static/ckeditor/samples/old/replacebyclass.html b/djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/samples/old/replacebyclass.html similarity index 100% rename from djangocms_text/contrib/text_ckeditor4/static/ckeditor/samples/old/replacebyclass.html rename to djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/samples/old/replacebyclass.html diff --git a/djangocms_text/contrib/text_ckeditor4/static/ckeditor/samples/old/replacebycode.html b/djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/samples/old/replacebycode.html similarity index 100% rename from djangocms_text/contrib/text_ckeditor4/static/ckeditor/samples/old/replacebycode.html rename to djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/samples/old/replacebycode.html diff --git a/djangocms_text/contrib/text_ckeditor4/static/ckeditor/samples/old/sample.css b/djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/samples/old/sample.css similarity index 100% rename from djangocms_text/contrib/text_ckeditor4/static/ckeditor/samples/old/sample.css rename to djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/samples/old/sample.css diff --git a/djangocms_text/contrib/text_ckeditor4/static/ckeditor/samples/old/sample.js b/djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/samples/old/sample.js similarity index 100% rename from djangocms_text/contrib/text_ckeditor4/static/ckeditor/samples/old/sample.js rename to djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/samples/old/sample.js diff --git a/djangocms_text/contrib/text_ckeditor4/static/ckeditor/samples/old/sample_posteddata.php b/djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/samples/old/sample_posteddata.php similarity index 100% rename from djangocms_text/contrib/text_ckeditor4/static/ckeditor/samples/old/sample_posteddata.php rename to djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/samples/old/sample_posteddata.php diff --git a/djangocms_text/contrib/text_ckeditor4/static/ckeditor/samples/old/tabindex.html b/djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/samples/old/tabindex.html similarity index 100% rename from djangocms_text/contrib/text_ckeditor4/static/ckeditor/samples/old/tabindex.html rename to djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/samples/old/tabindex.html diff --git a/djangocms_text/contrib/text_ckeditor4/static/ckeditor/samples/old/toolbar/toolbar.html b/djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/samples/old/toolbar/toolbar.html similarity index 100% rename from djangocms_text/contrib/text_ckeditor4/static/ckeditor/samples/old/toolbar/toolbar.html rename to djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/samples/old/toolbar/toolbar.html diff --git a/djangocms_text/contrib/text_ckeditor4/static/ckeditor/samples/old/uicolor.html b/djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/samples/old/uicolor.html similarity index 100% rename from djangocms_text/contrib/text_ckeditor4/static/ckeditor/samples/old/uicolor.html rename to djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/samples/old/uicolor.html diff --git a/djangocms_text/contrib/text_ckeditor4/static/ckeditor/samples/old/uilanguages.html b/djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/samples/old/uilanguages.html similarity index 100% rename from djangocms_text/contrib/text_ckeditor4/static/ckeditor/samples/old/uilanguages.html rename to djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/samples/old/uilanguages.html diff --git a/djangocms_text/contrib/text_ckeditor4/static/ckeditor/samples/old/wysiwygarea/fullpage.html b/djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/samples/old/wysiwygarea/fullpage.html similarity index 100% rename from djangocms_text/contrib/text_ckeditor4/static/ckeditor/samples/old/wysiwygarea/fullpage.html rename to djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/samples/old/wysiwygarea/fullpage.html diff --git a/djangocms_text/contrib/text_ckeditor4/static/ckeditor/samples/old/xhtmlstyle.html b/djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/samples/old/xhtmlstyle.html similarity index 100% rename from djangocms_text/contrib/text_ckeditor4/static/ckeditor/samples/old/xhtmlstyle.html rename to djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/samples/old/xhtmlstyle.html diff --git a/djangocms_text/contrib/text_ckeditor4/static/ckeditor/samples/toolbarconfigurator/css/fontello.css b/djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/samples/toolbarconfigurator/css/fontello.css similarity index 100% rename from djangocms_text/contrib/text_ckeditor4/static/ckeditor/samples/toolbarconfigurator/css/fontello.css rename to djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/samples/toolbarconfigurator/css/fontello.css diff --git a/djangocms_text/contrib/text_ckeditor4/static/ckeditor/samples/toolbarconfigurator/font/LICENSE.txt b/djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/samples/toolbarconfigurator/font/LICENSE.txt similarity index 100% rename from djangocms_text/contrib/text_ckeditor4/static/ckeditor/samples/toolbarconfigurator/font/LICENSE.txt rename to djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/samples/toolbarconfigurator/font/LICENSE.txt diff --git a/djangocms_text/contrib/text_ckeditor4/static/ckeditor/samples/toolbarconfigurator/font/config.json b/djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/samples/toolbarconfigurator/font/config.json similarity index 100% rename from djangocms_text/contrib/text_ckeditor4/static/ckeditor/samples/toolbarconfigurator/font/config.json rename to djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/samples/toolbarconfigurator/font/config.json diff --git a/djangocms_text/contrib/text_ckeditor4/static/ckeditor/samples/toolbarconfigurator/font/fontello.eot b/djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/samples/toolbarconfigurator/font/fontello.eot similarity index 100% rename from djangocms_text/contrib/text_ckeditor4/static/ckeditor/samples/toolbarconfigurator/font/fontello.eot rename to djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/samples/toolbarconfigurator/font/fontello.eot diff --git a/djangocms_text/contrib/text_ckeditor4/static/ckeditor/samples/toolbarconfigurator/font/fontello.svg b/djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/samples/toolbarconfigurator/font/fontello.svg similarity index 100% rename from djangocms_text/contrib/text_ckeditor4/static/ckeditor/samples/toolbarconfigurator/font/fontello.svg rename to djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/samples/toolbarconfigurator/font/fontello.svg diff --git a/djangocms_text/contrib/text_ckeditor4/static/ckeditor/samples/toolbarconfigurator/font/fontello.ttf b/djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/samples/toolbarconfigurator/font/fontello.ttf similarity index 100% rename from djangocms_text/contrib/text_ckeditor4/static/ckeditor/samples/toolbarconfigurator/font/fontello.ttf rename to djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/samples/toolbarconfigurator/font/fontello.ttf diff --git a/djangocms_text/contrib/text_ckeditor4/static/ckeditor/samples/toolbarconfigurator/font/fontello.woff b/djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/samples/toolbarconfigurator/font/fontello.woff similarity index 100% rename from djangocms_text/contrib/text_ckeditor4/static/ckeditor/samples/toolbarconfigurator/font/fontello.woff rename to djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/samples/toolbarconfigurator/font/fontello.woff diff --git a/djangocms_text/contrib/text_ckeditor4/static/ckeditor/samples/toolbarconfigurator/index.html b/djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/samples/toolbarconfigurator/index.html similarity index 100% rename from djangocms_text/contrib/text_ckeditor4/static/ckeditor/samples/toolbarconfigurator/index.html rename to djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/samples/toolbarconfigurator/index.html diff --git a/djangocms_text/contrib/text_ckeditor4/static/ckeditor/samples/toolbarconfigurator/js/abstracttoolbarmodifier.js b/djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/samples/toolbarconfigurator/js/abstracttoolbarmodifier.js similarity index 100% rename from djangocms_text/contrib/text_ckeditor4/static/ckeditor/samples/toolbarconfigurator/js/abstracttoolbarmodifier.js rename to djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/samples/toolbarconfigurator/js/abstracttoolbarmodifier.js diff --git a/djangocms_text/contrib/text_ckeditor4/static/ckeditor/samples/toolbarconfigurator/js/fulltoolbareditor.js b/djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/samples/toolbarconfigurator/js/fulltoolbareditor.js similarity index 100% rename from djangocms_text/contrib/text_ckeditor4/static/ckeditor/samples/toolbarconfigurator/js/fulltoolbareditor.js rename to djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/samples/toolbarconfigurator/js/fulltoolbareditor.js diff --git a/djangocms_text/contrib/text_ckeditor4/static/ckeditor/samples/toolbarconfigurator/js/toolbarmodifier.js b/djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/samples/toolbarconfigurator/js/toolbarmodifier.js similarity index 100% rename from djangocms_text/contrib/text_ckeditor4/static/ckeditor/samples/toolbarconfigurator/js/toolbarmodifier.js rename to djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/samples/toolbarconfigurator/js/toolbarmodifier.js diff --git a/djangocms_text/contrib/text_ckeditor4/static/ckeditor/samples/toolbarconfigurator/js/toolbartextmodifier.js b/djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/samples/toolbarconfigurator/js/toolbartextmodifier.js similarity index 100% rename from djangocms_text/contrib/text_ckeditor4/static/ckeditor/samples/toolbarconfigurator/js/toolbartextmodifier.js rename to djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/samples/toolbarconfigurator/js/toolbartextmodifier.js diff --git a/djangocms_text/contrib/text_ckeditor4/static/ckeditor/skins/moono-lisa/dialog.css b/djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/skins/moono-lisa/dialog.css similarity index 100% rename from djangocms_text/contrib/text_ckeditor4/static/ckeditor/skins/moono-lisa/dialog.css rename to djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/skins/moono-lisa/dialog.css diff --git a/djangocms_text/contrib/text_ckeditor4/static/ckeditor/skins/moono-lisa/dialog_ie.css b/djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/skins/moono-lisa/dialog_ie.css similarity index 100% rename from djangocms_text/contrib/text_ckeditor4/static/ckeditor/skins/moono-lisa/dialog_ie.css rename to djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/skins/moono-lisa/dialog_ie.css diff --git a/djangocms_text/contrib/text_ckeditor4/static/ckeditor/skins/moono-lisa/dialog_ie8.css b/djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/skins/moono-lisa/dialog_ie8.css similarity index 100% rename from djangocms_text/contrib/text_ckeditor4/static/ckeditor/skins/moono-lisa/dialog_ie8.css rename to djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/skins/moono-lisa/dialog_ie8.css diff --git a/djangocms_text/contrib/text_ckeditor4/static/ckeditor/skins/moono-lisa/dialog_iequirks.css b/djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/skins/moono-lisa/dialog_iequirks.css similarity index 100% rename from djangocms_text/contrib/text_ckeditor4/static/ckeditor/skins/moono-lisa/dialog_iequirks.css rename to djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/skins/moono-lisa/dialog_iequirks.css diff --git a/djangocms_text/contrib/text_ckeditor4/static/ckeditor/skins/moono-lisa/editor.css b/djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/skins/moono-lisa/editor.css similarity index 100% rename from djangocms_text/contrib/text_ckeditor4/static/ckeditor/skins/moono-lisa/editor.css rename to djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/skins/moono-lisa/editor.css diff --git a/djangocms_text/contrib/text_ckeditor4/static/ckeditor/skins/moono-lisa/editor_gecko.css b/djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/skins/moono-lisa/editor_gecko.css similarity index 100% rename from djangocms_text/contrib/text_ckeditor4/static/ckeditor/skins/moono-lisa/editor_gecko.css rename to djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/skins/moono-lisa/editor_gecko.css diff --git a/djangocms_text/contrib/text_ckeditor4/static/ckeditor/skins/moono-lisa/editor_ie.css b/djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/skins/moono-lisa/editor_ie.css similarity index 100% rename from djangocms_text/contrib/text_ckeditor4/static/ckeditor/skins/moono-lisa/editor_ie.css rename to djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/skins/moono-lisa/editor_ie.css diff --git a/djangocms_text/contrib/text_ckeditor4/static/ckeditor/skins/moono-lisa/editor_ie8.css b/djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/skins/moono-lisa/editor_ie8.css similarity index 100% rename from djangocms_text/contrib/text_ckeditor4/static/ckeditor/skins/moono-lisa/editor_ie8.css rename to djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/skins/moono-lisa/editor_ie8.css diff --git a/djangocms_text/contrib/text_ckeditor4/static/ckeditor/skins/moono-lisa/editor_iequirks.css b/djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/skins/moono-lisa/editor_iequirks.css similarity index 100% rename from djangocms_text/contrib/text_ckeditor4/static/ckeditor/skins/moono-lisa/editor_iequirks.css rename to djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/skins/moono-lisa/editor_iequirks.css diff --git a/djangocms_text/contrib/text_ckeditor4/static/ckeditor/skins/moono-lisa/icons.png b/djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/skins/moono-lisa/icons.png similarity index 100% rename from djangocms_text/contrib/text_ckeditor4/static/ckeditor/skins/moono-lisa/icons.png rename to djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/skins/moono-lisa/icons.png diff --git a/djangocms_text/contrib/text_ckeditor4/static/ckeditor/skins/moono-lisa/icons_hidpi.png b/djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/skins/moono-lisa/icons_hidpi.png similarity index 100% rename from djangocms_text/contrib/text_ckeditor4/static/ckeditor/skins/moono-lisa/icons_hidpi.png rename to djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/skins/moono-lisa/icons_hidpi.png diff --git a/djangocms_text/contrib/text_ckeditor4/static/ckeditor/skins/moono-lisa/images/arrow.png b/djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/skins/moono-lisa/images/arrow.png similarity index 100% rename from djangocms_text/contrib/text_ckeditor4/static/ckeditor/skins/moono-lisa/images/arrow.png rename to djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/skins/moono-lisa/images/arrow.png diff --git a/djangocms_text/contrib/text_ckeditor4/static/ckeditor/skins/moono-lisa/images/close.png b/djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/skins/moono-lisa/images/close.png similarity index 100% rename from djangocms_text/contrib/text_ckeditor4/static/ckeditor/skins/moono-lisa/images/close.png rename to djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/skins/moono-lisa/images/close.png diff --git a/djangocms_text/contrib/text_ckeditor4/static/ckeditor/skins/moono-lisa/images/hidpi/close.png b/djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/skins/moono-lisa/images/hidpi/close.png similarity index 100% rename from djangocms_text/contrib/text_ckeditor4/static/ckeditor/skins/moono-lisa/images/hidpi/close.png rename to djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/skins/moono-lisa/images/hidpi/close.png diff --git a/djangocms_text/contrib/text_ckeditor4/static/ckeditor/skins/moono-lisa/images/hidpi/lock-open.png b/djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/skins/moono-lisa/images/hidpi/lock-open.png similarity index 100% rename from djangocms_text/contrib/text_ckeditor4/static/ckeditor/skins/moono-lisa/images/hidpi/lock-open.png rename to djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/skins/moono-lisa/images/hidpi/lock-open.png diff --git a/djangocms_text/contrib/text_ckeditor4/static/ckeditor/skins/moono-lisa/images/hidpi/lock.png b/djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/skins/moono-lisa/images/hidpi/lock.png similarity index 100% rename from djangocms_text/contrib/text_ckeditor4/static/ckeditor/skins/moono-lisa/images/hidpi/lock.png rename to djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/skins/moono-lisa/images/hidpi/lock.png diff --git a/djangocms_text/contrib/text_ckeditor4/static/ckeditor/skins/moono-lisa/images/hidpi/refresh.png b/djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/skins/moono-lisa/images/hidpi/refresh.png similarity index 100% rename from djangocms_text/contrib/text_ckeditor4/static/ckeditor/skins/moono-lisa/images/hidpi/refresh.png rename to djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/skins/moono-lisa/images/hidpi/refresh.png diff --git a/djangocms_text/contrib/text_ckeditor4/static/ckeditor/skins/moono-lisa/images/lock-open.png b/djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/skins/moono-lisa/images/lock-open.png similarity index 100% rename from djangocms_text/contrib/text_ckeditor4/static/ckeditor/skins/moono-lisa/images/lock-open.png rename to djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/skins/moono-lisa/images/lock-open.png diff --git a/djangocms_text/contrib/text_ckeditor4/static/ckeditor/skins/moono-lisa/images/lock.png b/djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/skins/moono-lisa/images/lock.png similarity index 100% rename from djangocms_text/contrib/text_ckeditor4/static/ckeditor/skins/moono-lisa/images/lock.png rename to djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/skins/moono-lisa/images/lock.png diff --git a/djangocms_text/contrib/text_ckeditor4/static/ckeditor/skins/moono-lisa/images/refresh.png b/djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/skins/moono-lisa/images/refresh.png similarity index 100% rename from djangocms_text/contrib/text_ckeditor4/static/ckeditor/skins/moono-lisa/images/refresh.png rename to djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/skins/moono-lisa/images/refresh.png diff --git a/djangocms_text/contrib/text_ckeditor4/static/ckeditor/skins/moono-lisa/images/spinner.gif b/djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/skins/moono-lisa/images/spinner.gif similarity index 100% rename from djangocms_text/contrib/text_ckeditor4/static/ckeditor/skins/moono-lisa/images/spinner.gif rename to djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/skins/moono-lisa/images/spinner.gif diff --git a/djangocms_text/contrib/text_ckeditor4/static/ckeditor/skins/moono-lisa/readme.md b/djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/skins/moono-lisa/readme.md similarity index 100% rename from djangocms_text/contrib/text_ckeditor4/static/ckeditor/skins/moono-lisa/readme.md rename to djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/skins/moono-lisa/readme.md diff --git a/djangocms_text/contrib/text_ckeditor4/static/ckeditor/styles.js b/djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/styles.js similarity index 100% rename from djangocms_text/contrib/text_ckeditor4/static/ckeditor/styles.js rename to djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/styles.js diff --git a/djangocms_text/contrib/text_ckeditor4/static/ckeditor/vendor/promise.js b/djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/vendor/promise.js similarity index 100% rename from djangocms_text/contrib/text_ckeditor4/static/ckeditor/vendor/promise.js rename to djangocms_text/contrib/text_ckeditor4/static/djangocms_text/vendor/ckeditor4/vendor/promise.js diff --git a/private/js/ckeditor4/CHANGES.md b/djangocms_text/static/djangocms_text/ckeditor4/CHANGES.md similarity index 100% rename from private/js/ckeditor4/CHANGES.md rename to djangocms_text/static/djangocms_text/ckeditor4/CHANGES.md diff --git a/private/js/ckeditor4/LICENSE.md b/djangocms_text/static/djangocms_text/ckeditor4/LICENSE.md similarity index 100% rename from private/js/ckeditor4/LICENSE.md rename to djangocms_text/static/djangocms_text/ckeditor4/LICENSE.md diff --git a/private/js/ckeditor4/README.md b/djangocms_text/static/djangocms_text/ckeditor4/README.md similarity index 100% rename from private/js/ckeditor4/README.md rename to djangocms_text/static/djangocms_text/ckeditor4/README.md diff --git a/private/js/ckeditor4/SECURITY.md b/djangocms_text/static/djangocms_text/ckeditor4/SECURITY.md similarity index 100% rename from private/js/ckeditor4/SECURITY.md rename to djangocms_text/static/djangocms_text/ckeditor4/SECURITY.md diff --git a/private/js/ckeditor4/bender-runner.config.json b/djangocms_text/static/djangocms_text/ckeditor4/bender-runner.config.json similarity index 100% rename from private/js/ckeditor4/bender-runner.config.json rename to djangocms_text/static/djangocms_text/ckeditor4/bender-runner.config.json diff --git a/private/js/ckeditor4/build-config.js b/djangocms_text/static/djangocms_text/ckeditor4/build-config.js similarity index 100% rename from private/js/ckeditor4/build-config.js rename to djangocms_text/static/djangocms_text/ckeditor4/build-config.js diff --git a/private/js/ckeditor4/ckeditor.js b/djangocms_text/static/djangocms_text/ckeditor4/ckeditor.js similarity index 100% rename from private/js/ckeditor4/ckeditor.js rename to djangocms_text/static/djangocms_text/ckeditor4/ckeditor.js diff --git a/private/js/ckeditor4/contents.css b/djangocms_text/static/djangocms_text/ckeditor4/contents.css similarity index 100% rename from private/js/ckeditor4/contents.css rename to djangocms_text/static/djangocms_text/ckeditor4/contents.css diff --git a/private/js/ckeditor4/samples/css/samples.css b/djangocms_text/static/djangocms_text/ckeditor4/samples/css/samples.css similarity index 100% rename from private/js/ckeditor4/samples/css/samples.css rename to djangocms_text/static/djangocms_text/ckeditor4/samples/css/samples.css diff --git a/private/js/ckeditor4/samples/img/github-top.png b/djangocms_text/static/djangocms_text/ckeditor4/samples/img/github-top.png similarity index 100% rename from private/js/ckeditor4/samples/img/github-top.png rename to djangocms_text/static/djangocms_text/ckeditor4/samples/img/github-top.png diff --git a/private/js/ckeditor4/samples/img/header-bg.png b/djangocms_text/static/djangocms_text/ckeditor4/samples/img/header-bg.png similarity index 100% rename from private/js/ckeditor4/samples/img/header-bg.png rename to djangocms_text/static/djangocms_text/ckeditor4/samples/img/header-bg.png diff --git a/private/js/ckeditor4/samples/img/header-separator.png b/djangocms_text/static/djangocms_text/ckeditor4/samples/img/header-separator.png similarity index 100% rename from private/js/ckeditor4/samples/img/header-separator.png rename to djangocms_text/static/djangocms_text/ckeditor4/samples/img/header-separator.png diff --git a/private/js/ckeditor4/samples/img/logo.png b/djangocms_text/static/djangocms_text/ckeditor4/samples/img/logo.png similarity index 100% rename from private/js/ckeditor4/samples/img/logo.png rename to djangocms_text/static/djangocms_text/ckeditor4/samples/img/logo.png diff --git a/private/js/ckeditor4/samples/img/logo.svg b/djangocms_text/static/djangocms_text/ckeditor4/samples/img/logo.svg similarity index 100% rename from private/js/ckeditor4/samples/img/logo.svg rename to djangocms_text/static/djangocms_text/ckeditor4/samples/img/logo.svg diff --git a/private/js/ckeditor4/samples/img/navigation-tip.png b/djangocms_text/static/djangocms_text/ckeditor4/samples/img/navigation-tip.png similarity index 100% rename from private/js/ckeditor4/samples/img/navigation-tip.png rename to djangocms_text/static/djangocms_text/ckeditor4/samples/img/navigation-tip.png diff --git a/private/js/ckeditor4/samples/index.html b/djangocms_text/static/djangocms_text/ckeditor4/samples/index.html similarity index 100% rename from private/js/ckeditor4/samples/index.html rename to djangocms_text/static/djangocms_text/ckeditor4/samples/index.html diff --git a/private/js/ckeditor4/samples/js/sample.js b/djangocms_text/static/djangocms_text/ckeditor4/samples/js/sample.js similarity index 100% rename from private/js/ckeditor4/samples/js/sample.js rename to djangocms_text/static/djangocms_text/ckeditor4/samples/js/sample.js diff --git a/private/js/ckeditor4/samples/js/sf.js b/djangocms_text/static/djangocms_text/ckeditor4/samples/js/sf.js similarity index 100% rename from private/js/ckeditor4/samples/js/sf.js rename to djangocms_text/static/djangocms_text/ckeditor4/samples/js/sf.js diff --git a/private/js/ckeditor4/samples/old/ajax.html b/djangocms_text/static/djangocms_text/ckeditor4/samples/old/ajax.html similarity index 100% rename from private/js/ckeditor4/samples/old/ajax.html rename to djangocms_text/static/djangocms_text/ckeditor4/samples/old/ajax.html diff --git a/private/js/ckeditor4/samples/old/api.html b/djangocms_text/static/djangocms_text/ckeditor4/samples/old/api.html similarity index 100% rename from private/js/ckeditor4/samples/old/api.html rename to djangocms_text/static/djangocms_text/ckeditor4/samples/old/api.html diff --git a/private/js/ckeditor4/samples/old/appendto.html b/djangocms_text/static/djangocms_text/ckeditor4/samples/old/appendto.html similarity index 100% rename from private/js/ckeditor4/samples/old/appendto.html rename to djangocms_text/static/djangocms_text/ckeditor4/samples/old/appendto.html diff --git a/private/js/ckeditor4/samples/old/assets/inlineall/logo.png b/djangocms_text/static/djangocms_text/ckeditor4/samples/old/assets/inlineall/logo.png similarity index 100% rename from private/js/ckeditor4/samples/old/assets/inlineall/logo.png rename to djangocms_text/static/djangocms_text/ckeditor4/samples/old/assets/inlineall/logo.png diff --git a/private/js/ckeditor4/samples/old/assets/outputxhtml/outputxhtml.css b/djangocms_text/static/djangocms_text/ckeditor4/samples/old/assets/outputxhtml/outputxhtml.css similarity index 100% rename from private/js/ckeditor4/samples/old/assets/outputxhtml/outputxhtml.css rename to djangocms_text/static/djangocms_text/ckeditor4/samples/old/assets/outputxhtml/outputxhtml.css diff --git a/private/js/ckeditor4/samples/old/assets/posteddata.php b/djangocms_text/static/djangocms_text/ckeditor4/samples/old/assets/posteddata.php similarity index 100% rename from private/js/ckeditor4/samples/old/assets/posteddata.php rename to djangocms_text/static/djangocms_text/ckeditor4/samples/old/assets/posteddata.php diff --git a/private/js/ckeditor4/samples/old/assets/sample.jpg b/djangocms_text/static/djangocms_text/ckeditor4/samples/old/assets/sample.jpg similarity index 100% rename from private/js/ckeditor4/samples/old/assets/sample.jpg rename to djangocms_text/static/djangocms_text/ckeditor4/samples/old/assets/sample.jpg diff --git a/private/js/ckeditor4/samples/old/assets/uilanguages/languages.js b/djangocms_text/static/djangocms_text/ckeditor4/samples/old/assets/uilanguages/languages.js similarity index 100% rename from private/js/ckeditor4/samples/old/assets/uilanguages/languages.js rename to djangocms_text/static/djangocms_text/ckeditor4/samples/old/assets/uilanguages/languages.js diff --git a/private/js/ckeditor4/samples/old/datafiltering.html b/djangocms_text/static/djangocms_text/ckeditor4/samples/old/datafiltering.html similarity index 100% rename from private/js/ckeditor4/samples/old/datafiltering.html rename to djangocms_text/static/djangocms_text/ckeditor4/samples/old/datafiltering.html diff --git a/private/js/ckeditor4/samples/old/dialog/assets/my_dialog.js b/djangocms_text/static/djangocms_text/ckeditor4/samples/old/dialog/assets/my_dialog.js similarity index 100% rename from private/js/ckeditor4/samples/old/dialog/assets/my_dialog.js rename to djangocms_text/static/djangocms_text/ckeditor4/samples/old/dialog/assets/my_dialog.js diff --git a/private/js/ckeditor4/samples/old/dialog/dialog.html b/djangocms_text/static/djangocms_text/ckeditor4/samples/old/dialog/dialog.html similarity index 100% rename from private/js/ckeditor4/samples/old/dialog/dialog.html rename to djangocms_text/static/djangocms_text/ckeditor4/samples/old/dialog/dialog.html diff --git a/private/js/ckeditor4/samples/old/divreplace.html b/djangocms_text/static/djangocms_text/ckeditor4/samples/old/divreplace.html similarity index 100% rename from private/js/ckeditor4/samples/old/divreplace.html rename to djangocms_text/static/djangocms_text/ckeditor4/samples/old/divreplace.html diff --git a/private/js/ckeditor4/samples/old/enterkey/enterkey.html b/djangocms_text/static/djangocms_text/ckeditor4/samples/old/enterkey/enterkey.html similarity index 100% rename from private/js/ckeditor4/samples/old/enterkey/enterkey.html rename to djangocms_text/static/djangocms_text/ckeditor4/samples/old/enterkey/enterkey.html diff --git a/private/js/ckeditor4/samples/old/htmlwriter/outputhtml.html b/djangocms_text/static/djangocms_text/ckeditor4/samples/old/htmlwriter/outputhtml.html similarity index 100% rename from private/js/ckeditor4/samples/old/htmlwriter/outputhtml.html rename to djangocms_text/static/djangocms_text/ckeditor4/samples/old/htmlwriter/outputhtml.html diff --git a/private/js/ckeditor4/samples/old/index.html b/djangocms_text/static/djangocms_text/ckeditor4/samples/old/index.html similarity index 100% rename from private/js/ckeditor4/samples/old/index.html rename to djangocms_text/static/djangocms_text/ckeditor4/samples/old/index.html diff --git a/private/js/ckeditor4/samples/old/inlineall.html b/djangocms_text/static/djangocms_text/ckeditor4/samples/old/inlineall.html similarity index 100% rename from private/js/ckeditor4/samples/old/inlineall.html rename to djangocms_text/static/djangocms_text/ckeditor4/samples/old/inlineall.html diff --git a/private/js/ckeditor4/samples/old/inlinebycode.html b/djangocms_text/static/djangocms_text/ckeditor4/samples/old/inlinebycode.html similarity index 100% rename from private/js/ckeditor4/samples/old/inlinebycode.html rename to djangocms_text/static/djangocms_text/ckeditor4/samples/old/inlinebycode.html diff --git a/private/js/ckeditor4/samples/old/inlinetextarea.html b/djangocms_text/static/djangocms_text/ckeditor4/samples/old/inlinetextarea.html similarity index 100% rename from private/js/ckeditor4/samples/old/inlinetextarea.html rename to djangocms_text/static/djangocms_text/ckeditor4/samples/old/inlinetextarea.html diff --git a/private/js/ckeditor4/samples/old/jquery.html b/djangocms_text/static/djangocms_text/ckeditor4/samples/old/jquery.html similarity index 100% rename from private/js/ckeditor4/samples/old/jquery.html rename to djangocms_text/static/djangocms_text/ckeditor4/samples/old/jquery.html diff --git a/private/js/ckeditor4/samples/old/magicline/magicline.html b/djangocms_text/static/djangocms_text/ckeditor4/samples/old/magicline/magicline.html similarity index 100% rename from private/js/ckeditor4/samples/old/magicline/magicline.html rename to djangocms_text/static/djangocms_text/ckeditor4/samples/old/magicline/magicline.html diff --git a/private/js/ckeditor4/samples/old/readonly.html b/djangocms_text/static/djangocms_text/ckeditor4/samples/old/readonly.html similarity index 100% rename from private/js/ckeditor4/samples/old/readonly.html rename to djangocms_text/static/djangocms_text/ckeditor4/samples/old/readonly.html diff --git a/private/js/ckeditor4/samples/old/replacebyclass.html b/djangocms_text/static/djangocms_text/ckeditor4/samples/old/replacebyclass.html similarity index 100% rename from private/js/ckeditor4/samples/old/replacebyclass.html rename to djangocms_text/static/djangocms_text/ckeditor4/samples/old/replacebyclass.html diff --git a/private/js/ckeditor4/samples/old/replacebycode.html b/djangocms_text/static/djangocms_text/ckeditor4/samples/old/replacebycode.html similarity index 100% rename from private/js/ckeditor4/samples/old/replacebycode.html rename to djangocms_text/static/djangocms_text/ckeditor4/samples/old/replacebycode.html diff --git a/private/js/ckeditor4/samples/old/sample.css b/djangocms_text/static/djangocms_text/ckeditor4/samples/old/sample.css similarity index 100% rename from private/js/ckeditor4/samples/old/sample.css rename to djangocms_text/static/djangocms_text/ckeditor4/samples/old/sample.css diff --git a/private/js/ckeditor4/samples/old/sample.js b/djangocms_text/static/djangocms_text/ckeditor4/samples/old/sample.js similarity index 100% rename from private/js/ckeditor4/samples/old/sample.js rename to djangocms_text/static/djangocms_text/ckeditor4/samples/old/sample.js diff --git a/private/js/ckeditor4/samples/old/sample_posteddata.php b/djangocms_text/static/djangocms_text/ckeditor4/samples/old/sample_posteddata.php similarity index 100% rename from private/js/ckeditor4/samples/old/sample_posteddata.php rename to djangocms_text/static/djangocms_text/ckeditor4/samples/old/sample_posteddata.php diff --git a/private/js/ckeditor4/samples/old/tabindex.html b/djangocms_text/static/djangocms_text/ckeditor4/samples/old/tabindex.html similarity index 100% rename from private/js/ckeditor4/samples/old/tabindex.html rename to djangocms_text/static/djangocms_text/ckeditor4/samples/old/tabindex.html diff --git a/private/js/ckeditor4/samples/old/toolbar/toolbar.html b/djangocms_text/static/djangocms_text/ckeditor4/samples/old/toolbar/toolbar.html similarity index 100% rename from private/js/ckeditor4/samples/old/toolbar/toolbar.html rename to djangocms_text/static/djangocms_text/ckeditor4/samples/old/toolbar/toolbar.html diff --git a/private/js/ckeditor4/samples/old/uicolor.html b/djangocms_text/static/djangocms_text/ckeditor4/samples/old/uicolor.html similarity index 100% rename from private/js/ckeditor4/samples/old/uicolor.html rename to djangocms_text/static/djangocms_text/ckeditor4/samples/old/uicolor.html diff --git a/private/js/ckeditor4/samples/old/uilanguages.html b/djangocms_text/static/djangocms_text/ckeditor4/samples/old/uilanguages.html similarity index 100% rename from private/js/ckeditor4/samples/old/uilanguages.html rename to djangocms_text/static/djangocms_text/ckeditor4/samples/old/uilanguages.html diff --git a/private/js/ckeditor4/samples/old/wysiwygarea/fullpage.html b/djangocms_text/static/djangocms_text/ckeditor4/samples/old/wysiwygarea/fullpage.html similarity index 100% rename from private/js/ckeditor4/samples/old/wysiwygarea/fullpage.html rename to djangocms_text/static/djangocms_text/ckeditor4/samples/old/wysiwygarea/fullpage.html diff --git a/private/js/ckeditor4/samples/old/xhtmlstyle.html b/djangocms_text/static/djangocms_text/ckeditor4/samples/old/xhtmlstyle.html similarity index 100% rename from private/js/ckeditor4/samples/old/xhtmlstyle.html rename to djangocms_text/static/djangocms_text/ckeditor4/samples/old/xhtmlstyle.html diff --git a/private/js/ckeditor4/samples/toolbarconfigurator/css/fontello.css b/djangocms_text/static/djangocms_text/ckeditor4/samples/toolbarconfigurator/css/fontello.css similarity index 100% rename from private/js/ckeditor4/samples/toolbarconfigurator/css/fontello.css rename to djangocms_text/static/djangocms_text/ckeditor4/samples/toolbarconfigurator/css/fontello.css diff --git a/private/js/ckeditor4/samples/toolbarconfigurator/font/LICENSE.txt b/djangocms_text/static/djangocms_text/ckeditor4/samples/toolbarconfigurator/font/LICENSE.txt similarity index 100% rename from private/js/ckeditor4/samples/toolbarconfigurator/font/LICENSE.txt rename to djangocms_text/static/djangocms_text/ckeditor4/samples/toolbarconfigurator/font/LICENSE.txt diff --git a/private/js/ckeditor4/samples/toolbarconfigurator/font/config.json b/djangocms_text/static/djangocms_text/ckeditor4/samples/toolbarconfigurator/font/config.json similarity index 100% rename from private/js/ckeditor4/samples/toolbarconfigurator/font/config.json rename to djangocms_text/static/djangocms_text/ckeditor4/samples/toolbarconfigurator/font/config.json diff --git a/private/js/ckeditor4/samples/toolbarconfigurator/font/fontello.eot b/djangocms_text/static/djangocms_text/ckeditor4/samples/toolbarconfigurator/font/fontello.eot similarity index 100% rename from private/js/ckeditor4/samples/toolbarconfigurator/font/fontello.eot rename to djangocms_text/static/djangocms_text/ckeditor4/samples/toolbarconfigurator/font/fontello.eot diff --git a/private/js/ckeditor4/samples/toolbarconfigurator/font/fontello.svg b/djangocms_text/static/djangocms_text/ckeditor4/samples/toolbarconfigurator/font/fontello.svg similarity index 100% rename from private/js/ckeditor4/samples/toolbarconfigurator/font/fontello.svg rename to djangocms_text/static/djangocms_text/ckeditor4/samples/toolbarconfigurator/font/fontello.svg diff --git a/private/js/ckeditor4/samples/toolbarconfigurator/font/fontello.ttf b/djangocms_text/static/djangocms_text/ckeditor4/samples/toolbarconfigurator/font/fontello.ttf similarity index 100% rename from private/js/ckeditor4/samples/toolbarconfigurator/font/fontello.ttf rename to djangocms_text/static/djangocms_text/ckeditor4/samples/toolbarconfigurator/font/fontello.ttf diff --git a/private/js/ckeditor4/samples/toolbarconfigurator/font/fontello.woff b/djangocms_text/static/djangocms_text/ckeditor4/samples/toolbarconfigurator/font/fontello.woff similarity index 100% rename from private/js/ckeditor4/samples/toolbarconfigurator/font/fontello.woff rename to djangocms_text/static/djangocms_text/ckeditor4/samples/toolbarconfigurator/font/fontello.woff diff --git a/private/js/ckeditor4/samples/toolbarconfigurator/index.html b/djangocms_text/static/djangocms_text/ckeditor4/samples/toolbarconfigurator/index.html similarity index 100% rename from private/js/ckeditor4/samples/toolbarconfigurator/index.html rename to djangocms_text/static/djangocms_text/ckeditor4/samples/toolbarconfigurator/index.html diff --git a/private/js/ckeditor4/samples/toolbarconfigurator/js/abstracttoolbarmodifier.js b/djangocms_text/static/djangocms_text/ckeditor4/samples/toolbarconfigurator/js/abstracttoolbarmodifier.js similarity index 100% rename from private/js/ckeditor4/samples/toolbarconfigurator/js/abstracttoolbarmodifier.js rename to djangocms_text/static/djangocms_text/ckeditor4/samples/toolbarconfigurator/js/abstracttoolbarmodifier.js diff --git a/private/js/ckeditor4/samples/toolbarconfigurator/js/fulltoolbareditor.js b/djangocms_text/static/djangocms_text/ckeditor4/samples/toolbarconfigurator/js/fulltoolbareditor.js similarity index 100% rename from private/js/ckeditor4/samples/toolbarconfigurator/js/fulltoolbareditor.js rename to djangocms_text/static/djangocms_text/ckeditor4/samples/toolbarconfigurator/js/fulltoolbareditor.js diff --git a/private/js/ckeditor4/samples/toolbarconfigurator/js/toolbarmodifier.js b/djangocms_text/static/djangocms_text/ckeditor4/samples/toolbarconfigurator/js/toolbarmodifier.js similarity index 100% rename from private/js/ckeditor4/samples/toolbarconfigurator/js/toolbarmodifier.js rename to djangocms_text/static/djangocms_text/ckeditor4/samples/toolbarconfigurator/js/toolbarmodifier.js diff --git a/private/js/ckeditor4/samples/toolbarconfigurator/js/toolbartextmodifier.js b/djangocms_text/static/djangocms_text/ckeditor4/samples/toolbarconfigurator/js/toolbartextmodifier.js similarity index 100% rename from private/js/ckeditor4/samples/toolbarconfigurator/js/toolbartextmodifier.js rename to djangocms_text/static/djangocms_text/ckeditor4/samples/toolbarconfigurator/js/toolbartextmodifier.js diff --git a/private/js/ckeditor4/vendor/promise.js b/djangocms_text/static/djangocms_text/ckeditor4/vendor/promise.js similarity index 100% rename from private/js/ckeditor4/vendor/promise.js rename to djangocms_text/static/djangocms_text/ckeditor4/vendor/promise.js diff --git a/djangocms_text/static/djangocms_text/js/ckeditor4.js b/djangocms_text/static/djangocms_text/js/ckeditor4.js deleted file mode 100644 index 3d29c044..00000000 --- a/djangocms_text/static/djangocms_text/js/ckeditor4.js +++ /dev/null @@ -1,6361 +0,0 @@ -/******/ (() => { // webpackBootstrap -/******/ var __webpack_modules__ = ({ - -/***/ "./private/js/ckeditor4/ckeditor.js": -/*!******************************************!*\ - !*** ./private/js/ckeditor4/ckeditor.js ***! - \******************************************/ -/***/ (() => { - -/* -Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved. -For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license/ -*/ -(function(){if(window.CKEDITOR&&window.CKEDITOR.dom)return;window.CKEDITOR||(window.CKEDITOR=function(){var a=/(^|.*[\\\/])ckeditor\.js(?:\?.*|;.*)?$/i,d={timestamp:"N2M9",version:"4.21.0",revision:"d529d176d7",rnd:Math.floor(900*Math.random())+100,_:{pending:[],basePathSrcPattern:a},status:"unloaded",basePath:function(){var b=window.CKEDITOR_BASEPATH||"";if(!b)for(var c=document.getElementsByTagName("script"),d=0;dy.getListenerIndex(c)){y=y.listeners;k||(k=this);isNaN(p)&&(p=10);m.fn=c;m.priority=p;for(var A=y.length-1;0<=A;A--)if(y[A].priority<=p)return y.splice(A+1,0,m),{removeListener:g}; -y.unshift(m)}return{removeListener:g}},once:function(){var a=Array.prototype.slice.call(arguments),b=a[1];a[1]=function(a){a.removeListener();return b.apply(this,arguments)};return this.on.apply(this,a)},capture:function(){CKEDITOR.event.useCapture=1;var a=this.on.apply(this,arguments);CKEDITOR.event.useCapture=0;return a},fire:function(){var c=0,e=function(){c=1},d=0,h=function(){d=1};return function(p,m,g){var x=b(this)[p];p=c;var y=d;c=d=0;if(x){var A=x.listeners;if(A.length)for(var A=A.slice(0), -F,v=0;vdocument.documentMode),mobile:-1c||b.quirks);b.gecko&&(d=a.match(/rv:([\d\.]+)/))&&(d=d[1].split("."),c=1E4*d[0]+100*(d[1]||0)+1*(d[2]||0));b.air&&(c=parseFloat(a.match(/ adobeair\/(\d+)/)[1])); -b.webkit&&(c=parseFloat(a.match(/ applewebkit\/(\d+)/)[1]));b.version=c;b.isCompatible=!(b.ie&&7>c)&&!(b.gecko&&4E4>c)&&!(b.webkit&&534>c);b.hidpi=2<=window.devicePixelRatio;b.needsBrFiller=b.gecko||b.webkit||b.ie&&10c;b.cssClass="cke_browser_"+(b.ie?"ie":b.gecko?"gecko":b.webkit?"webkit":"unknown");b.quirks&&(b.cssClass+=" cke_browser_quirks");b.ie&&(b.cssClass+=" cke_browser_ie"+(b.quirks?"6 cke_browser_iequirks":b.version));b.air&&(b.cssClass+=" cke_browser_air"); -b.iOS&&(b.cssClass+=" cke_browser_ios");b.hidpi&&(b.cssClass+=" cke_hidpi");return b}()); -"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 a=document.createElement("script");a.type="text/javascript";a.src=CKEDITOR.basePath+"ckeditor.js";document.getElementsByTagName("head")[0].appendChild(a)}};CKEDITOR.loadFullCoreTimeout=0;CKEDITOR.add=function(a){(this._.pending||(this._.pending=[])).push(a)};(function(){CKEDITOR.domReady(function(){var a= -CKEDITOR.loadFullCore,d=CKEDITOR.loadFullCoreTimeout;a&&(CKEDITOR.status="basic_ready",a&&a._load?a():d&&setTimeout(function(){CKEDITOR.loadFullCore&&CKEDITOR.loadFullCore()},1E3*d))})})();CKEDITOR.status="basic_loaded"}();"use strict";CKEDITOR.VERBOSITY_WARN=1;CKEDITOR.VERBOSITY_ERROR=2;CKEDITOR.verbosity=CKEDITOR.VERBOSITY_WARN|CKEDITOR.VERBOSITY_ERROR;CKEDITOR.warn=function(a,d){CKEDITOR.verbosity&CKEDITOR.VERBOSITY_WARN&&CKEDITOR.fire("log",{type:"warn",errorCode:a,additionalData:d})}; -CKEDITOR.error=function(a,d){CKEDITOR.verbosity&CKEDITOR.VERBOSITY_ERROR&&CKEDITOR.fire("log",{type:"error",errorCode:a,additionalData:d})}; -CKEDITOR.on("log",function(a){if(window.console&&window.console.log){var d=console[a.data.type]?a.data.type:"log",b=a.data.errorCode;if(a=a.data.additionalData)console[d]("[CKEDITOR] Error code: "+b+".",a);else console[d]("[CKEDITOR] Error code: "+b+".");console[d]("[CKEDITOR] For more information about this error go to https://ckeditor.com/docs/ckeditor4/latest/guide/dev_errors.html#"+b)}},null,null,999);CKEDITOR.dom={}; -(function(){function a(a,y,b){this._minInterval=a;this._context=b;this._lastOutput=this._scheduledTimer=0;this._output=CKEDITOR.tools.bind(y,b||{});var c=this;this.input=function(){function a(){c._lastOutput=(new Date).getTime();c._scheduledTimer=0;c._call()}if(!c._scheduledTimer||!1!==c._reschedule()){var x=(new Date).getTime()-c._lastOutput;x/g,k=/|\s) /g,function(a,b){return b+"\x26nbsp;"}).replace(/ (?=<)/g,"\x26nbsp;")},getNextNumber:function(){var a=0;return function(){return++a}}(),getNextId:function(){return"cke_"+this.getNextNumber()},getUniqueId:function(){for(var a="e",b=0;8>b;b++)a+=Math.floor(65536*(1+Math.random())).toString(16).substring(1); -return a},override:function(a,b){var c=b(a);c.prototype=a.prototype;return c},setTimeout:function(a,b,c,g,h){h||(h=window);c||(c=h);return h.setTimeout(function(){g?a.apply(c,[].concat(g)):a.apply(c)},b||0)},debounce:function(a,b){var c;return function(){var g=this,h=arguments;clearTimeout(c);c=setTimeout(function(){c=null;a.apply(g,h)},b)}},throttle:function(a,b,c){return new this.buffers.throttle(a,b,c)},trim:function(){var a=/(?:^[ \t\n\r]+)|(?:[ \t\n\r]+$)/g;return function(b){return b.replace(a, -"")}}(),ltrim:function(){var a=/^[ \t\n\r]+/g;return function(b){return b.replace(a,"")}}(),rtrim:function(){var a=/[ \t\n\r]+$/g;return function(b){return b.replace(a,"")}}(),indexOf:function(a,b){if("function"==typeof b)for(var c=0,g=a.length;cparseFloat(c);g&&(c=c.replace("-",""));a.setStyle("width",c);b=a.getClientRect();c=Math.round(b.width);return g?-c:c}return c}}(),repeat:function(a,b){return Array(b+1).join(a)},tryThese:function(){for(var a, -b=0,c=arguments.length;bb;b++)a[b]=("0"+parseInt(a[b],10).toString(16)).slice(-2);return"#"+a.join("")})},normalizeHex:function(a){return a.replace(/#(([0-9a-f]{3}){1,2})($|;|\s+)/gi,function(a,b,c,g){a=b.toLowerCase();3==a.length&&(a=a.split(""),a=[a[0],a[0],a[1],a[1],a[2],a[2]].join(""));return"#"+a+g})},_isValidColorFormat:function(a){if(!a)return!1;a=a.replace(/\s+/g,"");return/^[a-z0-9()#%,./]+$/i.test(a)},parseCssText:function(a,b,c){var g={};c&&(a=(new CKEDITOR.dom.element("span")).setAttribute("style", -a).getAttribute("style")||"");a&&(a=CKEDITOR.tools.normalizeHex(CKEDITOR.tools.convertRgbToHex(a)));if(!a||";"==a)return g;a.replace(/"/g,'"').replace(/\s*([^:;\s]+)\s*:\s*([^;]+)\s*(?=;|$)/g,function(a,c,x){b&&(c=c.toLowerCase(),"font-family"==c&&(x=x.replace(/\s*,\s*/g,",")),x=CKEDITOR.tools.trim(x));g[c]=x});return g},writeCssText:function(a,b){var c,g=[];for(c in a)g.push(c+":"+a[c]);b&&g.sort();return g.join("; ")},objectCompare:function(a,b,c){var g;if(!a&&!b)return!0;if(!a||!b)return!1; -for(g in a)if(a[g]!=b[g])return!1;if(!c)for(g in b)if(a[g]!=b[g])return!1;return!0},objectKeys:function(a){return CKEDITOR.tools.object.keys(a)},convertArrayToObject:function(a,b){var c={};1==arguments.length&&(b=!0);for(var g=0,h=a.length;gc;c++)a.push(Math.floor(256*Math.random()));for(c=0;c=g||0==c&&48<=g&&57>=g||1==c&&48<=g&&57>=g&&45==l?h+("\\"+g.toString(16)+" "):0==c&&1==b&&45==g?h+("\\"+a.charAt(c)):128<=g||45==g||95==g||48<=g&&57>=g||65<=g&&90>=g||97<=g&&122>=g?h+a.charAt(c):h+("\\"+a.charAt(c));a=h}else a="";return a}, -getMouseButton:function(a){return(a=a&&a.data?a.data.$:a)?CKEDITOR.tools.normalizeMouseButton(a.button):!1},normalizeMouseButton:function(a,b){if(!CKEDITOR.env.ie||9<=CKEDITOR.env.version&&!CKEDITOR.env.ie6Compat)return a;for(var c=[[CKEDITOR.MOUSE_BUTTON_LEFT,1],[CKEDITOR.MOUSE_BUTTON_MIDDLE,4],[CKEDITOR.MOUSE_BUTTON_RIGHT,2]],g=0;gl)for(d=l;3>d;d++)h[d]=0;e[0]=(h[0]&252)>>2;e[1]=(h[0]&3)<<4|h[1]>>4;e[2]=(h[1]&15)<<2|(h[2]&192)>>6;e[3]=h[2]&63;for(d=0;4>d;d++)b=d<=l?b+"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(e[d]):b+"\x3d"}return b},style:{parse:{_borderStyle:"none hidden dotted dashed solid double groove ridge inset outset".split(" "),_widthRegExp:/^(thin|medium|thick|[\+-]?\d+(\.\d+)?[a-z%]+|[\+-]?0+(\.0+)?|\.\d+[a-z%]+)$/, -_rgbaRegExp:/rgba?\(\s*\d+%?\s*,\s*\d+%?\s*,\s*\d+%?\s*(?:,\s*[0-9.]+\s*)?\)/gi,_hslaRegExp:/hsla?\(\s*[0-9.]+\s*,\s*\d+%\s*,\s*\d+%\s*(?:,\s*[0-9.]+\s*)?\)/gi,background:function(a){var b={},c=this._findColor(a);c.length&&(b.color=c[0],CKEDITOR.tools.array.forEach(c,function(b){a=a.replace(b,"")}));if(a=CKEDITOR.tools.trim(a))b.unprocessed=a;return b},margin:function(a){return CKEDITOR.tools.style.parse.sideShorthand(a,function(a){return a.match(/(?:\-?[\.\d]+(?:%|\w*)|auto|inherit|initial|unset|revert)/g)|| -["0px"]})},sideShorthand:function(a,b){function c(a){g.top=h[a[0]];g.right=h[a[1]];g.bottom=h[a[2]];g.left=h[a[3]]}var g={},h=b?b(a):a.split(/\s+/);switch(h.length){case 1:c([0,0,0,0]);break;case 2:c([0,1,0,1]);break;case 3:c([0,1,2,1]);break;case 4:c([0,1,2,3])}return g},border:function(a){return CKEDITOR.tools.style.border.fromCssRule(a)},_findColor:function(a){var b=[],c=CKEDITOR.tools.array,b=b.concat(a.match(this._rgbaRegExp)||[]),b=b.concat(a.match(this._hslaRegExp)||[]);return b=b.concat(c.filter(a.split(/\s+/), -function(a){return a.match(/^\#[a-f0-9]{3}(?:[a-f0-9]{3})?$/gi)?!0:a.toLowerCase()in CKEDITOR.tools.style.parse._colors}))}}},array:{filter:function(a,b,c){var g=[];this.forEach(a,function(h,l){b.call(c,h,l,a)&&g.push(h)});return g},find:function(a,b,c){for(var g=a.length,h=0;hCKEDITOR.env.version&&(!a||"object"!==typeof a)){b=[];if("string"===typeof a)for(c=0;cCKEDITOR.env.version)for(h=0;hCKEDITOR.env.version&&(this.type==CKEDITOR.NODE_ELEMENT||this.type==CKEDITOR.NODE_DOCUMENT_FRAGMENT)&&c(f);return f},hasPrevious:function(){return!!this.$.previousSibling},hasNext:function(){return!!this.$.nextSibling},insertAfter:function(a){a.$.parentNode.insertBefore(this.$,a.$.nextSibling);return a},insertBefore:function(a){a.$.parentNode.insertBefore(this.$, -a.$);return a},insertBeforeMe:function(a){this.$.parentNode.insertBefore(a.$,this.$);return a},getAddress:function(a){for(var d=[],b=this.getDocument().$.documentElement,c=this;c&&c!=b;){var f=c.getParent();f&&d.unshift(this.getIndex.call(c,a));c=f}return d},getDocument:function(){return new CKEDITOR.dom.document(this.$.ownerDocument||this.$.parentNode.ownerDocument)},getIndex:function(a){function d(a,b){var c=b?a.getNext():a.getPrevious();return c&&c.type==CKEDITOR.NODE_TEXT?c.isEmpty()?d(c,b):c: -null}var b=this,c=-1,f;if(!this.getParent()||a&&b.type==CKEDITOR.NODE_TEXT&&b.isEmpty()&&!d(b)&&!d(b,!0))return-1;do if(!a||b.equals(this)||b.type!=CKEDITOR.NODE_TEXT||!f&&!b.isEmpty())c++,f=b.type==CKEDITOR.NODE_TEXT;while(b=b.getPrevious());return c},getNextSourceNode:function(a,d,b){if(b&&!b.call){var c=b;b=function(a){return!a.equals(c)}}a=!a&&this.getFirst&&this.getFirst();var f;if(!a){if(this.type==CKEDITOR.NODE_ELEMENT&&b&&!1===b(this,!0))return null;a=this.getNext()}for(;!a&&(f=(f||this).getParent());){if(b&& -!1===b(f,!0))return null;a=f.getNext()}return!a||b&&!1===b(a)?null:d&&d!=a.type?a.getNextSourceNode(!1,d,b):a},getPreviousSourceNode:function(a,d,b){if(b&&!b.call){var c=b;b=function(a){return!a.equals(c)}}a=!a&&this.getLast&&this.getLast();var f;if(!a){if(this.type==CKEDITOR.NODE_ELEMENT&&b&&!1===b(this,!0))return null;a=this.getPrevious()}for(;!a&&(f=(f||this).getParent());){if(b&&!1===b(f,!0))return null;a=f.getPrevious()}return!a||b&&!1===b(a)?null:d&&a.type!=d?a.getPreviousSourceNode(!1,d,b): -a},getPrevious:function(a){var d=this.$,b;do b=(d=d.previousSibling)&&10!=d.nodeType&&new CKEDITOR.dom.node(d);while(b&&a&&!a(b));return b},getNext:function(a){var d=this.$,b;do b=(d=d.nextSibling)&&new CKEDITOR.dom.node(d);while(b&&a&&!a(b));return b},getParent:function(a){var d=this.$.parentNode;return d&&(d.nodeType==CKEDITOR.NODE_ELEMENT||a&&d.nodeType==CKEDITOR.NODE_DOCUMENT_FRAGMENT)?new CKEDITOR.dom.node(d):null},getParents:function(a){var d=this,b=[];do b[a?"push":"unshift"](d);while(d=d.getParent()); -return b},getCommonAncestor:function(a){if(a.equals(this))return this;if(a.contains&&a.contains(this))return a;var d=this.contains?this:this.getParent();do if(d.contains(a))return d;while(d=d.getParent());return null},getPosition:function(a){var d=this.$,b=a.$;if(d.compareDocumentPosition)return d.compareDocumentPosition(b);if(d==b)return CKEDITOR.POSITION_IDENTICAL;if(this.type==CKEDITOR.NODE_ELEMENT&&a.type==CKEDITOR.NODE_ELEMENT){if(d.contains){if(d.contains(b))return CKEDITOR.POSITION_CONTAINS+ -CKEDITOR.POSITION_PRECEDING;if(b.contains(d))return CKEDITOR.POSITION_IS_CONTAINED+CKEDITOR.POSITION_FOLLOWING}if("sourceIndex"in d)return 0>d.sourceIndex||0>b.sourceIndex?CKEDITOR.POSITION_DISCONNECTED:d.sourceIndex=document.documentMode||!d||(a=d+":"+a);return new CKEDITOR.dom.nodeList(this.$.getElementsByTagName(a))},getHead:function(){var a= -this.$.getElementsByTagName("head")[0];return a=a?new CKEDITOR.dom.element(a):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(a){this.$.open("text/html","replace");CKEDITOR.env.ie&&(a=a.replace(/(?:^\s*]*?>)|^/i, -'$\x26\n\x3cscript data-cke-temp\x3d"1"\x3e('+CKEDITOR.tools.fixDomain+")();\x3c/script\x3e"));this.$.write(a);this.$.close()},find:function(a){return new CKEDITOR.dom.nodeList(this.$.querySelectorAll(a))},findOne:function(a){return(a=this.$.querySelector(a))?new CKEDITOR.dom.element(a):null},_getHtml5ShivFrag:function(){var a=this.getCustomData("html5ShivFrag");a||(a=this.$.createDocumentFragment(),CKEDITOR.tools.enableHtml5Elements(a,!0),this.setCustomData("html5ShivFrag",a));return a}}); -CKEDITOR.dom.nodeList=function(a){this.$=a};CKEDITOR.dom.nodeList.prototype={count:function(){return this.$.length},getItem:function(a){return 0>a||a>=this.$.length?null:(a=this.$[a])?new CKEDITOR.dom.node(a):null},toArray:function(){return CKEDITOR.tools.array.map(this.$,function(a){return new CKEDITOR.dom.node(a)})}};CKEDITOR.dom.element=function(a,d){"string"==typeof a&&(a=(d?d.$:document).createElement(a));CKEDITOR.dom.domObject.call(this,a)}; -CKEDITOR.dom.element.get=function(a){return(a="string"==typeof a?document.getElementById(a)||document.getElementsByName(a)[0]:a)&&(a.$?a:new CKEDITOR.dom.element(a))};CKEDITOR.dom.element.prototype=new CKEDITOR.dom.node;CKEDITOR.dom.element.createFromHtml=function(a,d){var b=new CKEDITOR.dom.element("div",d);b.setHtml(a);return b.getFirst().remove()}; -CKEDITOR.dom.element.setMarker=function(a,d,b,c){var f=d.getCustomData("list_marker_id")||d.setCustomData("list_marker_id",CKEDITOR.tools.getNextNumber()).getCustomData("list_marker_id"),e=d.getCustomData("list_marker_names")||d.setCustomData("list_marker_names",{}).getCustomData("list_marker_names");a[f]=d;e[b]=1;return d.setCustomData(b,c)};CKEDITOR.dom.element.clearAllMarkers=function(a){for(var d in a)CKEDITOR.dom.element.clearMarkers(a,a[d],1)}; -CKEDITOR.dom.element.clearMarkers=function(a,d,b){var c=d.getCustomData("list_marker_names"),f=d.getCustomData("list_marker_id"),e;for(e in c)d.removeCustomData(e);d.removeCustomData("list_marker_names");b&&(d.removeCustomData("list_marker_id"),delete a[f])}; -(function(){function a(a,b){return-1<(" "+a+" ").replace(e," ").indexOf(" "+b+" ")}function d(a){var b=!0;a.$.id||(a.$.id="cke_tmp_"+CKEDITOR.tools.getNextNumber(),b=!1);return function(){b||a.removeAttribute("id")}}function b(a,b){var c=CKEDITOR.tools.escapeCss(a.$.id);return"#"+c+" "+b.split(/,\s*/).join(", #"+c+" ")}function c(a){for(var b=0,c=0,g=k[a].length;cCKEDITOR.env.version?this.$.text+=a:this.append(new CKEDITOR.dom.text(a))},appendBogus:function(a){if(a||CKEDITOR.env.needsBrFiller){for(a=this.getLast();a&&a.type==CKEDITOR.NODE_TEXT&&!CKEDITOR.tools.rtrim(a.getText());)a=a.getPrevious();a&&a.is&&a.is("br")||(a=this.getDocument().createElement("br"),CKEDITOR.env.gecko&&a.setAttribute("type","_moz"),this.append(a))}},breakParent:function(a,b){var c=new CKEDITOR.dom.range(this.getDocument());c.setStartAfter(this);c.setEndAfter(a); -var g=c.extractContents(!1,b||!1),d;c.insertNode(this.remove());if(CKEDITOR.env.ie&&!CKEDITOR.env.edge){for(c=new CKEDITOR.dom.element("div");d=g.getFirst();)d.$.style.backgroundColor&&(d.$.style.backgroundColor=d.$.style.backgroundColor),c.append(d);c.insertAfter(this);c.remove(!0)}else g.insertAfterNode(this)},contains:document.compareDocumentPosition?function(a){return!!(this.$.compareDocumentPosition(a.$)&16)}:function(a){var b=this.$;return a.type!=CKEDITOR.NODE_ELEMENT?b.contains(a.getParent().$): -b!=a.$&&b.contains(a.$)},focus:function(){function a(){try{this.$.focus()}catch(b){}}return function(b){b?CKEDITOR.tools.setTimeout(a,100,this):a.call(this)}}(),getHtml:function(){var a=this.$.innerHTML;return CKEDITOR.env.ie?a.replace(/<\?[^>]*>/g,""):a},getOuterHtml:function(){if(this.$.outerHTML)return this.$.outerHTML.replace(/<\?[^>]*>/,"");var a=this.$.ownerDocument.createElement("div");a.appendChild(this.$.cloneNode(!0));return a.innerHTML},getClientRect:function(a){var b=CKEDITOR.tools.extend({}, -this.$.getBoundingClientRect());!b.width&&(b.width=b.right-b.left);!b.height&&(b.height=b.bottom-b.top);return a?CKEDITOR.tools.getAbsoluteRectPosition(this.getWindow(),b):b},setHtml:CKEDITOR.env.ie&&9>CKEDITOR.env.version?function(a){try{var b=this.$;if(this.getParent())return b.innerHTML=a;var c=this.getDocument()._getHtml5ShivFrag();c.appendChild(b);b.innerHTML=a;c.removeChild(b);return a}catch(g){this.$.innerHTML="";b=new CKEDITOR.dom.element("body",this.getDocument());b.$.innerHTML=a;for(b=b.getChildren();b.count();)this.append(b.getItem(0)); -return a}}:function(a){return this.$.innerHTML=a},setText:function(){var a=document.createElement("p");a.innerHTML="x";a=a.textContent;return function(b){this.$[a?"textContent":"innerText"]=b}}(),getAttribute:function(){var a=function(a){return this.$.getAttribute(a,2)};return CKEDITOR.env.ie&&(CKEDITOR.env.ie7Compat||CKEDITOR.env.quirks)?function(a){switch(a){case "class":a="className";break;case "http-equiv":a="httpEquiv";break;case "name":return this.$.name;case "tabindex":return a=this.$.getAttribute(a, -2),0!==a&&0===this.$.tabIndex&&(a=null),a;case "checked":return a=this.$.attributes.getNamedItem(a),(a.specified?a.nodeValue:this.$.checked)?"checked":null;case "hspace":case "value":return this.$[a];case "style":return this.$.style.cssText;case "contenteditable":case "contentEditable":return this.$.attributes.getNamedItem("contentEditable").specified?this.$.getAttribute("contentEditable"):null}return this.$.getAttribute(a,2)}:a}(),getAttributes:function(a){var b={},c=this.$.attributes,g;a=CKEDITOR.tools.isArray(a)? -a:[];for(g=0;g=document.documentMode){var b=this.$.scopeName;"HTML"!=b&&(a=b.toLowerCase()+":"+a)}this.getName=function(){return a};return this.getName()},getValue:function(){return this.$.value},getFirst:function(a){var b=this.$.firstChild;(b=b&&new CKEDITOR.dom.node(b))&&a&&!a(b)&&(b=b.getNext(a));return b},getLast:function(a){var b=this.$.lastChild;(b=b&&new CKEDITOR.dom.node(b))&&a&&!a(b)&&(b=b.getPrevious(a));return b},getStyle:function(a){return this.$.style[CKEDITOR.tools.cssStyleToDomStyle(a)]}, -is:function(){var a=this.getName();if("object"==typeof arguments[0])return!!arguments[0][a];for(var b=0;bCKEDITOR.env.version&&this.is("a")){var c=this.getParent();c.type==CKEDITOR.NODE_ELEMENT&&(c=c.clone(),c.setHtml(b),b=c.getHtml(),c.setHtml(a),a=c.getHtml())}return b==a},isVisible:function(){var a=(this.$.offsetHeight||this.$.offsetWidth)&&"hidden"!=this.getComputedStyle("visibility"),b,c;a&&CKEDITOR.env.webkit&&(b=this.getWindow(),!b.equals(CKEDITOR.document.getWindow())&&(c=b.$.frameElement)&&(a=(new CKEDITOR.dom.element(c)).isVisible()));return!!a},isEmptyInlineRemoveable:function(){if(!CKEDITOR.dtd.$removeEmpty[this.getName()])return!1; -for(var a=this.getChildren(),b=0,c=a.count();bCKEDITOR.env.version?function(b){return"name"==b?!!this.$.name:a.call(this,b)}:a:function(a){return!!this.$.attributes.getNamedItem(a)}}(),hide:function(){this.setStyle("display","none")},moveChildren:function(a,b){var c=this.$;a=a.$;if(c!=a){var g;if(b)for(;g=c.lastChild;)a.insertBefore(c.removeChild(g),a.firstChild);else for(;g=c.firstChild;)a.appendChild(c.removeChild(g))}},mergeSiblings:function(){function a(b,c,g){if(c&&c.type==CKEDITOR.NODE_ELEMENT){for(var d= -[];c.data("cke-bookmark")||c.isEmptyInlineRemoveable();)if(d.push(c),c=g?c.getNext():c.getPrevious(),!c||c.type!=CKEDITOR.NODE_ELEMENT)return;if(b.isIdentical(c)){for(var e=g?b.getLast():b.getFirst();d.length;)d.shift().move(b,!g);c.moveChildren(b,!g);c.remove();e&&e.type==CKEDITOR.NODE_ELEMENT&&e.mergeSiblings()}}}return function(b){if(!1===b||CKEDITOR.dtd.$removeEmpty[this.getName()]||this.is("a"))a(this,this.getNext(),!0),a(this,this.getPrevious())}}(),show:function(){this.setStyles({display:"", -visibility:""})},setAttribute:function(){var a=function(a,b){this.$.setAttribute(a,b);return this};return CKEDITOR.env.ie&&(CKEDITOR.env.ie7Compat||CKEDITOR.env.quirks)?function(b,c){"class"==b?this.$.className=c:"style"==b?this.$.style.cssText=c:"tabindex"==b?this.$.tabIndex=c:"checked"==b?this.$.checked=c:"contenteditable"==b?a.call(this,"contentEditable",c):a.apply(this,arguments);return this}:CKEDITOR.env.ie8Compat&&CKEDITOR.env.secure?function(b,c){if("src"==b&&c.match(/^http:\/\//))try{a.apply(this, -arguments)}catch(g){}else a.apply(this,arguments);return this}:a}(),setAttributes:function(a){for(var b in a)this.setAttribute(b,a[b]);return this},setValue:function(a){this.$.value=a;return this},removeAttribute:function(){var a=function(a){this.$.removeAttribute(a)};return CKEDITOR.env.ie&&(CKEDITOR.env.ie7Compat||CKEDITOR.env.quirks)?function(a){"class"==a?a="className":"tabindex"==a?a="tabIndex":"contenteditable"==a&&(a="contentEditable");this.$.removeAttribute(a)}:a}(),removeAttributes:function(a){if(CKEDITOR.tools.isArray(a))for(var b= -0;bCKEDITOR.env.version?(a=Math.round(100*a),this.setStyle("filter",100<=a?"":"progid:DXImageTransform.Microsoft.Alpha(opacity\x3d"+a+")")):this.setStyle("opacity",a)},unselectable:function(){this.setStyles(CKEDITOR.tools.cssVendorPrefix("user-select", -"none"));if(CKEDITOR.env.ie){this.setAttribute("unselectable","on");for(var a,b=this.getElementsByTag("*"),c=0,g=b.count();cf||0f?f:d);c&&(0>e||0e?e:g,0)},setState:function(a,b,c){b=b||"cke";switch(a){case CKEDITOR.TRISTATE_ON:this.addClass(b+"_on");this.removeClass(b+ -"_off");this.removeClass(b+"_disabled");c&&this.setAttribute("aria-pressed",!0);c&&this.removeAttribute("aria-disabled");break;case CKEDITOR.TRISTATE_DISABLED:this.addClass(b+"_disabled");this.removeClass(b+"_off");this.removeClass(b+"_on");c&&this.setAttribute("aria-disabled",!0);c&&this.removeAttribute("aria-pressed");break;default:this.addClass(b+"_off"),this.removeClass(b+"_on"),this.removeClass(b+"_disabled"),c&&this.removeAttribute("aria-pressed"),c&&this.removeAttribute("aria-disabled")}}, -getFrameDocument:function(){var a=this.$;try{a.contentWindow.document}catch(b){a.src=a.src}return a&&new CKEDITOR.dom.document(a.contentWindow.document)},copyAttributes:function(a,b){var c=this.$.attributes;b=b||{};for(var g=0;gCKEDITOR.env.version){var d=g.ownerDocument.createEventObject(),e;for(e in b)d[e]=b[e];g.fireEvent(c, -d)}else g[g[a]?a:c](b)},isDetached:function(){var a=this.getDocument(),b=a.getDocumentElement();return b.equals(this)||b.contains(this)?!CKEDITOR.env.ie||8=u.getChildCount()?(u=u.getChild(E-1),t=!0):u=u.getChild(E):z=t=!0;q.type==CKEDITOR.NODE_TEXT?p?H=!0:q.split(K):0ea)for(;X;)X=f(X,D,!0);D=R}p|| -h()}}function b(){var a=!1,b=CKEDITOR.dom.walker.whitespaces(),c=CKEDITOR.dom.walker.bookmark(!0),d=CKEDITOR.dom.walker.bogus();return function(f){return c(f)||b(f)?!0:d(f)&&!a?a=!0:f.type==CKEDITOR.NODE_TEXT&&(f.hasAscendant("pre")||CKEDITOR.tools.trim(f.getText()).length)||f.type==CKEDITOR.NODE_ELEMENT&&!f.is(e)?!1:!0}}function c(a){var b=CKEDITOR.dom.walker.whitespaces(),c=CKEDITOR.dom.walker.bookmark(1);return function(d){return c(d)||b(d)?!0:!a&&k(d)||d.type==CKEDITOR.NODE_ELEMENT&&d.is(CKEDITOR.dtd.$removeEmpty)}} -function f(a){return function(){var b;return this[a?"getPreviousNode":"getNextNode"](function(a){!b&&m(a)&&(b=a);return p(a)&&!(k(a)&&a.equals(b))})}}var e={abbr:1,acronym:1,b: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,q:1,samp:1,small:1,span:1,strike:1,strong:1,sub:1,sup:1,tt:1,u:1,"var":1},k=CKEDITOR.dom.walker.bogus(),h=/^[\t\r\n ]*(?: |\xa0)$/,p=CKEDITOR.dom.walker.editable(),m=CKEDITOR.dom.walker.ignored(!0);CKEDITOR.dom.range.prototype={clone:function(){var a= -new CKEDITOR.dom.range(this.root);a._setStartContainer(this.startContainer);a.startOffset=this.startOffset;a._setEndContainer(this.endContainer);a.endOffset=this.endOffset;a.collapsed=this.collapsed;return a},collapse:function(a){a?(this._setEndContainer(this.startContainer),this.endOffset=this.startOffset):(this._setStartContainer(this.endContainer),this.startOffset=this.endOffset);this.collapsed=!0},cloneContents:function(a){var b=new CKEDITOR.dom.documentFragment(this.document);this.collapsed|| -d(this,2,b,!1,"undefined"==typeof a?!0:a);return b},deleteContents:function(a){this.collapsed||d(this,0,null,a)},extractContents:function(a,b){var c=new CKEDITOR.dom.documentFragment(this.document);this.collapsed||d(this,1,c,a,"undefined"==typeof b?!0:b);return c},equals:function(a){return this.startOffset===a.startOffset&&this.endOffset===a.endOffset&&this.startContainer.equals(a.startContainer)&&this.endContainer.equals(a.endContainer)},createBookmark:function(a){function b(a){return a.getAscendant(function(a){var b; -if(b=a.data&&a.data("cke-temp"))b=-1===CKEDITOR.tools.array.indexOf(["cke_copybin","cke_pastebin"],a.getAttribute("id"));return b},!0)}var c=this.startContainer,d=this.endContainer,e=this.collapsed,f,l,h,k;f=this.document.createElement("span");f.data("cke-bookmark",1);f.setStyle("display","none");f.setHtml("\x26nbsp;");a&&(h="cke_bm_"+CKEDITOR.tools.getNextNumber(),f.setAttribute("id",h+(e?"C":"S")));e||(l=f.clone(),l.setHtml("\x26nbsp;"),a&&l.setAttribute("id",h+"E"),k=this.clone(),b(d)&&(d=b(d), -k.moveToPosition(d,CKEDITOR.POSITION_AFTER_END)),k.collapse(),k.insertNode(l));k=this.clone();b(c)&&(d=b(c),k.moveToPosition(d,CKEDITOR.POSITION_BEFORE_START));k.collapse(!0);k.insertNode(f);l?(this.setStartAfter(f),this.setEndBefore(l)):this.moveToPosition(f,CKEDITOR.POSITION_AFTER_END);return{startNode:a?h+(e?"C":"S"):f,endNode:a?h+"E":l,serializable:a,collapsed:e}},createBookmark2:function(){function a(b){var g=b.container,d=b.offset,e;e=g;var f=d;e=e.type!=CKEDITOR.NODE_ELEMENT||0===f||f==e.getChildCount()? -0:e.getChild(f-1).type==CKEDITOR.NODE_TEXT&&e.getChild(f).type==CKEDITOR.NODE_TEXT;e&&(g=g.getChild(d-1),d=g.getLength());if(g.type==CKEDITOR.NODE_ELEMENT&&0=a.offset&&(a.offset=d.getIndex(),a.container=d.getParent()))}}var c=CKEDITOR.dom.walker.nodeType(CKEDITOR.NODE_TEXT,!0);return function(c){var d=this.collapsed,e={container:this.startContainer,offset:this.startOffset},l={container:this.endContainer,offset:this.endOffset};c&&(a(e),b(e,this.root), -d||(a(l),b(l,this.root)));return{start:e.container.getAddress(c),end:d?null:l.container.getAddress(c),startOffset:e.offset,endOffset:l.offset,normalized:c,collapsed:d,is2:!0}}}(),moveToBookmark:function(a){if(a.is2){var b=this.document.getByAddress(a.start,a.normalized),c=a.startOffset,d=a.end&&this.document.getByAddress(a.end,a.normalized);a=a.endOffset;this.setStart(b,c);d?this.setEnd(d,a):this.collapse(!0)}else b=(c=a.serializable)?this.document.getById(a.startNode):a.startNode,a=c?this.document.getById(a.endNode): -a.endNode,this.setStartBefore(b),b.remove(),a?(this.setEndBefore(a),a.remove()):this.collapse(!0)},getBoundaryNodes:function(){var a=this.startContainer,b=this.endContainer,c=this.startOffset,d=this.endOffset,e;if(a.type==CKEDITOR.NODE_ELEMENT)if(e=a.getChildCount(),e>c)a=a.getChild(c);else if(1>e)a=a.getPreviousSourceNode();else{for(a=a.$;a.lastChild;)a=a.lastChild;a=new CKEDITOR.dom.node(a);a=a.getNextSourceNode()||a}if(b.type==CKEDITOR.NODE_ELEMENT)if(e=b.getChildCount(),e>d)b=b.getChild(d).getPreviousSourceNode(!0); -else if(1>e)b=b.getPreviousSourceNode();else{for(b=b.$;b.lastChild;)b=b.lastChild;b=new CKEDITOR.dom.node(b)}a.getPosition(b)&CKEDITOR.POSITION_FOLLOWING&&(a=b);return{startNode:a,endNode:b}},getCommonAncestor:function(a,b){var c=this.startContainer,d=this.endContainer,c=c.equals(d)?a&&c.type==CKEDITOR.NODE_ELEMENT&&this.startOffset==this.endOffset-1?c.getChild(this.startOffset):c:c.getCommonAncestor(d);return b&&!c.is?c.getParent():c},optimize:function(){var a=this.startContainer,b=this.startOffset; -a.type!=CKEDITOR.NODE_ELEMENT&&(b?b>=a.getLength()&&this.setStartAfter(a):this.setStartBefore(a));a=this.endContainer;b=this.endOffset;a.type!=CKEDITOR.NODE_ELEMENT&&(b?b>=a.getLength()&&this.setEndAfter(a):this.setEndBefore(a))},optimizeBookmark:function(){var a=this.startContainer,b=this.endContainer;a.is&&a.is("span")&&a.data("cke-bookmark")&&this.setStartAt(a,CKEDITOR.POSITION_BEFORE_START);b&&b.is&&b.is("span")&&b.data("cke-bookmark")&&this.setEndAt(b,CKEDITOR.POSITION_AFTER_END)},trim:function(a, -b){var c=this.startContainer,d=this.startOffset,e=this.collapsed;if((!a||e)&&c&&c.type==CKEDITOR.NODE_TEXT){if(d)if(d>=c.getLength())d=c.getIndex()+1,c=c.getParent();else{var f=c.split(d),d=c.getIndex()+1,c=c.getParent();this.startContainer.equals(this.endContainer)?this.setEnd(f,this.endOffset-this.startOffset):c.equals(this.endContainer)&&(this.endOffset+=1)}else d=c.getIndex(),c=c.getParent();this.setStart(c,d);if(e){this.collapse(!0);return}}c=this.endContainer;d=this.endOffset;b||e||!c||c.type!= -CKEDITOR.NODE_TEXT||(d?(d>=c.getLength()||c.split(d),d=c.getIndex()+1):d=c.getIndex(),c=c.getParent(),this.setEnd(c,d))},enlarge:function(a,b){function c(a){return a&&a.type==CKEDITOR.NODE_ELEMENT&&a.hasAttribute("contenteditable")?null:a}function d(a,b,c){var g=new CKEDITOR.dom.range(c);g.setStart(a,b);g.setEndAt(c,CKEDITOR.POSITION_BEFORE_END);c=new CKEDITOR.dom.walker(g);for(c.guard=function(a){return!(a.type==CKEDITOR.NODE_ELEMENT&&a.isBlockBoundary())};g=c.next();){if(g.type!=CKEDITOR.NODE_TEXT)return!1; -f=g!=a?g.getText():g.substring(b);if(e.test(f))return!1}return!0}var e=new RegExp(/[^\s\ufeff]/),f,l;switch(a){case CKEDITOR.ENLARGE_INLINE:var h=1;case CKEDITOR.ENLARGE_ELEMENT:if(this.collapsed)break;var k=this.getCommonAncestor();l=this.root;var m,p,q,u,K,E=!1,C;C=this.startContainer;var t=this.startOffset;C.type==CKEDITOR.NODE_TEXT?(t&&(C=!CKEDITOR.tools.trim(C.substring(0,t)).length&&C,E=!!C),C&&((u=C.getPrevious())||(q=C.getParent()))):(t&&(u=C.getChild(t-1)||C.getLast()),u||(q=C));for(q=c(q);q|| -u;){if(q&&!u){!K&&q.equals(k)&&(K=!0);if(h?q.isBlockBoundary():!l.contains(q))break;E&&"inline"==q.getComputedStyle("display")||(E=!1,K?m=q:this.setStartBefore(q));u=q.getPrevious()}for(;u;)if(C=!1,u.type==CKEDITOR.NODE_COMMENT)u=u.getPrevious();else{if(u.type==CKEDITOR.NODE_TEXT)f=u.getText(),e.test(f)&&(u=null),C=/[\s\ufeff]$/.test(f);else if((u.$.offsetWidth>(CKEDITOR.env.webkit?1:0)||b&&u.is("br"))&&!u.data("cke-bookmark"))if(E&&CKEDITOR.dtd.$removeEmpty[u.getName()]){f=u.getText();if(e.test(f))u= -null;else for(var t=u.$.getElementsByTagName("*"),B=0,z;z=t[B++];)if(!CKEDITOR.dtd.$removeEmpty[z.nodeName.toLowerCase()]){u=null;break}u&&(C=!!f.length)}else u=null;C&&(E?K?m=q:q&&this.setStartBefore(q):E=!0);if(u){C=u.getPrevious();if(!q&&!C){q=u;u=null;break}u=C}else q=null}q&&(q=c(q.getParent()))}C=this.endContainer;t=this.endOffset;q=u=null;K=E=!1;C.type==CKEDITOR.NODE_TEXT?CKEDITOR.tools.trim(C.substring(t)).length?E=!0:(E=!C.getLength(),t==C.getLength()?(u=C.getNext())||(q=C.getParent()):d(C, -t,l)&&(q=C.getParent())):(u=C.getChild(t))||(q=C);for(;q||u;){if(q&&!u){!K&&q.equals(k)&&(K=!0);if(h?q.isBlockBoundary():!l.contains(q))break;E&&"inline"==q.getComputedStyle("display")||(E=!1,K?p=q:q&&this.setEndAfter(q));u=q.getNext()}for(;u;){C=!1;if(u.type==CKEDITOR.NODE_TEXT)f=u.getText(),d(u,0,l)||(u=null),C=/^[\s\ufeff]/.test(f);else if(u.type==CKEDITOR.NODE_ELEMENT){if((0=l.getLength()?f.setStartAfter(l):(f.setStartBefore(l),c=0):f.setStartBefore(l));h&&h.type==CKEDITOR.NODE_TEXT&&(m?m>=h.getLength()?f.setEndAfter(h):(f.setEndAfter(h),p=0):f.setEndBefore(h));var f=new CKEDITOR.dom.walker(f),q=CKEDITOR.dom.walker.bookmark(),u=CKEDITOR.dom.walker.bogus();f.evaluator=function(b){return b.type==(a==CKEDITOR.SHRINK_ELEMENT?CKEDITOR.NODE_ELEMENT:CKEDITOR.NODE_TEXT)};var K;f.guard=function(b,c){if(e&&u(b)||q(b))return!0;if(a==CKEDITOR.SHRINK_ELEMENT&& -b.type==CKEDITOR.NODE_TEXT||c&&b.equals(K)||!1===d&&b.type==CKEDITOR.NODE_ELEMENT&&b.isBlockBoundary()||b.type==CKEDITOR.NODE_ELEMENT&&b.hasAttribute("contenteditable"))return!1;c||b.type!=CKEDITOR.NODE_ELEMENT||(K=b);return!0};c&&(l=f[a==CKEDITOR.SHRINK_ELEMENT?"lastForward":"next"]())&&this.setStartAt(l,b?CKEDITOR.POSITION_AFTER_START:CKEDITOR.POSITION_BEFORE_START);p&&(f.reset(),(f=f[a==CKEDITOR.SHRINK_ELEMENT?"lastBackward":"previous"]())&&this.setEndAt(f,b?CKEDITOR.POSITION_BEFORE_END:CKEDITOR.POSITION_AFTER_END)); -return!(!c&&!p)}},insertNode:function(a){this.optimizeBookmark();this.trim(!1,!0);var b=this.startContainer,c=b.getChild(this.startOffset);c?a.insertBefore(c):b.append(a);a.getParent()&&a.getParent().equals(this.endContainer)&&this.endOffset++;this.setStartBefore(a)},moveToPosition:function(a,b){this.setStartAt(a,b);this.collapse(!0)},moveToRange:function(a){this.setStart(a.startContainer,a.startOffset);this.setEnd(a.endContainer,a.endOffset)},selectNodeContents:function(a){this.setStart(a,0);this.setEnd(a, -a.type==CKEDITOR.NODE_TEXT?a.getLength():a.getChildCount())},setStart:function(b,c){b.type==CKEDITOR.NODE_ELEMENT&&CKEDITOR.dtd.$empty[b.getName()]&&(c=b.getIndex(),b=b.getParent());this._setStartContainer(b);this.startOffset=c;this.endContainer||(this._setEndContainer(b),this.endOffset=c);a(this)},setEnd:function(b,c){b.type==CKEDITOR.NODE_ELEMENT&&CKEDITOR.dtd.$empty[b.getName()]&&(c=b.getIndex()+1,b=b.getParent());this._setEndContainer(b);this.endOffset=c;this.startContainer||(this._setStartContainer(b), -this.startOffset=c);a(this)},setStartAfter:function(a){this.setStart(a.getParent(),a.getIndex()+1)},setStartBefore:function(a){this.setStart(a.getParent(),a.getIndex())},setEndAfter:function(a){this.setEnd(a.getParent(),a.getIndex()+1)},setEndBefore:function(a){this.setEnd(a.getParent(),a.getIndex())},setStartAt:function(b,c){switch(c){case CKEDITOR.POSITION_AFTER_START:this.setStart(b,0);break;case CKEDITOR.POSITION_BEFORE_END:b.type==CKEDITOR.NODE_TEXT?this.setStart(b,b.getLength()):this.setStart(b, -b.getChildCount());break;case CKEDITOR.POSITION_BEFORE_START:this.setStartBefore(b);break;case CKEDITOR.POSITION_AFTER_END:this.setStartAfter(b)}a(this)},setEndAt:function(b,c){switch(c){case CKEDITOR.POSITION_AFTER_START:this.setEnd(b,0);break;case CKEDITOR.POSITION_BEFORE_END:b.type==CKEDITOR.NODE_TEXT?this.setEnd(b,b.getLength()):this.setEnd(b,b.getChildCount());break;case CKEDITOR.POSITION_BEFORE_START:this.setEndBefore(b);break;case CKEDITOR.POSITION_AFTER_END:this.setEndAfter(b)}a(this)},fixBlock:function(a, -b){var c=this.createBookmark(),d=this.document.createElement(b);this.collapse(a);this.enlarge(CKEDITOR.ENLARGE_BLOCK_CONTENTS);this.extractContents().appendTo(d);d.trim();this.insertNode(d);var e=d.getBogus();e&&e.remove();d.appendBogus();this.moveToBookmark(c);return d},splitBlock:function(a,b){var c=new CKEDITOR.dom.elementPath(this.startContainer,this.root),d=new CKEDITOR.dom.elementPath(this.endContainer,this.root),e=c.block,f=d.block,l=null;if(!c.blockLimit.equals(d.blockLimit))return null;"br"!= -a&&(e||(e=this.fixBlock(!0,a),f=(new CKEDITOR.dom.elementPath(this.endContainer,this.root)).block),f||(f=this.fixBlock(!1,a)));c=e&&this.checkStartOfBlock();d=f&&this.checkEndOfBlock();this.deleteContents();e&&e.equals(f)&&(d?(l=new CKEDITOR.dom.elementPath(this.startContainer,this.root),this.moveToPosition(f,CKEDITOR.POSITION_AFTER_END),f=null):c?(l=new CKEDITOR.dom.elementPath(this.startContainer,this.root),this.moveToPosition(e,CKEDITOR.POSITION_BEFORE_START),e=null):(f=this.splitElement(e,b|| -!1),e.is("ul","ol")||e.appendBogus()));return{previousBlock:e,nextBlock:f,wasStartOfBlock:c,wasEndOfBlock:d,elementPath:l}},splitElement:function(a,b){if(!this.collapsed)return null;this.setEndAt(a,CKEDITOR.POSITION_BEFORE_END);var c=this.extractContents(!1,b||!1),d=a.clone(!1,b||!1);c.appendTo(d);d.insertAfter(a);this.moveToPosition(a,CKEDITOR.POSITION_AFTER_END);return d},removeEmptyBlocksAtEnd:function(){function a(g){return function(a){return b(a)||c(a)||a.type==CKEDITOR.NODE_ELEMENT&&a.isEmptyInlineRemoveable()|| -g.is("table")&&a.is("caption")?!1:!0}}var b=CKEDITOR.dom.walker.whitespaces(),c=CKEDITOR.dom.walker.bookmark(!1);return function(b){for(var c=this.createBookmark(),d=this[b?"endPath":"startPath"](),e=d.block||d.blockLimit,f;e&&!e.equals(d.root)&&!e.getFirst(a(e));)f=e.getParent(),this[b?"setEndAt":"setStartAt"](e,CKEDITOR.POSITION_AFTER_END),e.remove(1),e=f;this.moveToBookmark(c)}}(),startPath:function(){return new CKEDITOR.dom.elementPath(this.startContainer,this.root)},endPath:function(){return new CKEDITOR.dom.elementPath(this.endContainer, -this.root)},checkBoundaryOfElement:function(a,b){var d=b==CKEDITOR.START,e=this.clone();e.collapse(d);e[d?"setStartAt":"setEndAt"](a,d?CKEDITOR.POSITION_AFTER_START:CKEDITOR.POSITION_BEFORE_END);e=new CKEDITOR.dom.walker(e);e.evaluator=c(d);return e[d?"checkBackward":"checkForward"]()},checkStartOfBlock:function(a){var c=this.startContainer,d=this.startOffset;CKEDITOR.env.ie&&d&&c.type==CKEDITOR.NODE_TEXT&&(c=CKEDITOR.tools.ltrim(c.substring(0,d)),h.test(c)&&this.trim(0,1));a||this.trim();a=new CKEDITOR.dom.elementPath(this.startContainer, -this.root);c=this.clone();c.collapse(!0);c.setStartAt(a.block||a.blockLimit,CKEDITOR.POSITION_AFTER_START);a=new CKEDITOR.dom.walker(c);a.evaluator=b();return a.checkBackward()},checkEndOfBlock:function(a){var c=this.endContainer,d=this.endOffset;CKEDITOR.env.ie&&c.type==CKEDITOR.NODE_TEXT&&(c=CKEDITOR.tools.rtrim(c.substring(d)),h.test(c)&&this.trim(1,0));a||this.trim();a=new CKEDITOR.dom.elementPath(this.endContainer,this.root);c=this.clone();c.collapse(!1);c.setEndAt(a.block||a.blockLimit,CKEDITOR.POSITION_BEFORE_END); -a=new CKEDITOR.dom.walker(c);a.evaluator=b();return a.checkForward()},getPreviousNode:function(a,b,c){var d=this.clone();d.collapse(1);d.setStartAt(c||this.root,CKEDITOR.POSITION_AFTER_START);c=new CKEDITOR.dom.walker(d);c.evaluator=a;c.guard=b;return c.previous()},getNextNode:function(a,b,c){var d=this.clone();d.collapse();d.setEndAt(c||this.root,CKEDITOR.POSITION_BEFORE_END);c=new CKEDITOR.dom.walker(d);c.evaluator=a;c.guard=b;return c.next()},checkReadOnly:function(){function a(b,c){for(;b;){if(b.type== -CKEDITOR.NODE_ELEMENT){if("false"==b.getAttribute("contentEditable")&&!b.data("cke-editable"))return 0;if(b.is("html")||"true"==b.getAttribute("contentEditable")&&(b.contains(c)||b.equals(c)))break}b=b.getParent()}return 1}return function(){var b=this.startContainer,c=this.endContainer;return!(a(b,c)&&a(c,b))}}(),moveToElementEditablePosition:function(a,b){if(a.type==CKEDITOR.NODE_ELEMENT&&!a.isEditable(!1))return this.moveToPosition(a,b?CKEDITOR.POSITION_AFTER_END:CKEDITOR.POSITION_BEFORE_START), -!0;for(var c=0;a;){if(a.type==CKEDITOR.NODE_TEXT){b&&this.endContainer&&this.checkEndOfBlock()&&h.test(a.getText())?this.moveToPosition(a,CKEDITOR.POSITION_BEFORE_START):this.moveToPosition(a,b?CKEDITOR.POSITION_AFTER_END:CKEDITOR.POSITION_BEFORE_START);c=1;break}if(a.type==CKEDITOR.NODE_ELEMENT)if(a.isEditable())this.moveToPosition(a,b?CKEDITOR.POSITION_BEFORE_END:CKEDITOR.POSITION_AFTER_START),c=1;else if(b&&a.is("br")&&this.endContainer&&this.checkEndOfBlock())this.moveToPosition(a,CKEDITOR.POSITION_BEFORE_START); -else if("false"==a.getAttribute("contenteditable")&&a.is(CKEDITOR.dtd.$block))return this.setStartBefore(a),this.setEndAfter(a),!0;var d=a,e=c,f=void 0;d.type==CKEDITOR.NODE_ELEMENT&&d.isEditable(!1)&&(f=d[b?"getLast":"getFirst"](m));e||f||(f=d[b?"getPrevious":"getNext"](m));a=f}return!!c},moveToClosestEditablePosition:function(a,b){var c,d=0,e,f,l=[CKEDITOR.POSITION_AFTER_END,CKEDITOR.POSITION_BEFORE_START];a?(c=new CKEDITOR.dom.range(this.root),c.moveToPosition(a,l[b?0:1])):c=this.clone();if(a&& -!a.is(CKEDITOR.dtd.$block))d=1;else if(e=c[b?"getNextEditableNode":"getPreviousEditableNode"]())d=1,(f=e.type==CKEDITOR.NODE_ELEMENT)&&e.is(CKEDITOR.dtd.$block)&&"false"==e.getAttribute("contenteditable")?(c.setStartAt(e,CKEDITOR.POSITION_BEFORE_START),c.setEndAt(e,CKEDITOR.POSITION_AFTER_END)):!CKEDITOR.env.needsBrFiller&&f&&e.is(CKEDITOR.dom.walker.validEmptyBlockContainers)?(c.setEnd(e,0),c.collapse()):c.moveToPosition(e,l[b?1:0]);d&&this.moveToRange(c);return!!d},moveToElementEditStart:function(a){return this.moveToElementEditablePosition(a)}, -moveToElementEditEnd:function(a){return this.moveToElementEditablePosition(a,!0)},getEnclosedNode:function(){var a=this.clone();a.optimize();if(a.startContainer.type!=CKEDITOR.NODE_ELEMENT||a.endContainer.type!=CKEDITOR.NODE_ELEMENT)return null;var a=new CKEDITOR.dom.walker(a),b=CKEDITOR.dom.walker.bookmark(!1,!0),c=CKEDITOR.dom.walker.whitespaces(!0);a.evaluator=function(a){return c(a)&&b(a)};var d=a.next();a.reset();return d&&d.equals(a.previous())?d:null},getTouchedStartNode:function(){var a=this.startContainer; -return this.collapsed||a.type!=CKEDITOR.NODE_ELEMENT?a:a.getChild(this.startOffset)||a},getTouchedEndNode:function(){var a=this.endContainer;return this.collapsed||a.type!=CKEDITOR.NODE_ELEMENT?a:a.getChild(this.endOffset-1)||a},getNextEditableNode:f(),getPreviousEditableNode:f(1),_getTableElement:function(a){a=a||{td:1,th:1,tr:1,tbody:1,thead:1,tfoot:1,table:1};var b=this.getTouchedStartNode(),c=this.getTouchedEndNode(),d=b.getAscendant("table",!0),c=c.getAscendant("table",!0);return d&&!this.root.contains(d)? -null:this.getEnclosedNode()?this.getEnclosedNode().getAscendant(a,!0):d&&c&&(d.equals(c)||d.contains(c)||c.contains(d))?b.getAscendant(a,!0):null},scrollIntoView:function(){var a=new CKEDITOR.dom.element.createFromHtml("\x3cspan\x3e\x26nbsp;\x3c/span\x3e",this.document),b,c,d,e=this.clone();e.optimize();(d=e.startContainer.type==CKEDITOR.NODE_TEXT)?(c=e.startContainer.getText(),b=e.startContainer.split(e.startOffset),a.insertAfter(e.startContainer)):e.insertNode(a);a.scrollIntoView();d&&(e.startContainer.setText(c), -b.remove());a.remove()},getClientRects:function(){function a(b,c){var d=CKEDITOR.tools.array.map(b,function(a){return a}),e=new CKEDITOR.dom.range(c.root),g,f,h;c.startContainer instanceof CKEDITOR.dom.element&&(f=0===c.startOffset&&c.startContainer.hasAttribute("data-widget"));c.endContainer instanceof CKEDITOR.dom.element&&(h=(h=c.endOffset===(c.endContainer.getChildCount?c.endContainer.getChildCount():c.endContainer.length))&&c.endContainer.hasAttribute("data-widget"));f&&e.setStart(c.startContainer.getParent(), -c.startContainer.getIndex());h&&e.setEnd(c.endContainer.getParent(),c.endContainer.getIndex()+1);if(f||h)c=e;e=c.cloneContents().find("[data-cke-widget-id]").toArray();if(e=CKEDITOR.tools.array.map(e,function(a){var b=c.root.editor;a=a.getAttribute("data-cke-widget-id");return b.widgets.instances[a].element}))return e=CKEDITOR.tools.array.map(e,function(a){var b;b=a.getParent().hasClass("cke_widget_wrapper")?a.getParent():a;g=this.root.getDocument().$.createRange();g.setStart(b.getParent().$,b.getIndex()); -g.setEnd(b.getParent().$,b.getIndex()+1);b=g.getClientRects();b.widgetRect=a.getClientRect();return b},c),CKEDITOR.tools.array.forEach(e,function(a){function b(e){CKEDITOR.tools.array.forEach(d,function(b,g){var f=CKEDITOR.tools.objectCompare(a[e],b);f||(f=CKEDITOR.tools.objectCompare(a.widgetRect,b));f&&(Array.prototype.splice.call(d,g,a.length-e,a.widgetRect),c=!0)});c||(earguments.length||(this.range=a,this.forceBrBreak=0,this.enlargeBr=1,this.enforceRealBlocks=0,this._||(this._={}))}function d(a){var b=[];a.forEach(function(a){if("true"==a.getAttribute("contenteditable"))return b.push(a),!1},CKEDITOR.NODE_ELEMENT,!0);return b}function b(a,c,e,f){a:{null==f&&(f=d(e));for(var h;h=f.shift();)if(h.getDtd().p){f={element:h,remaining:f};break a}f=null}if(!f)return 0;if((h=CKEDITOR.filter.instances[f.element.data("cke-filter")])&&!h.check(c))return b(a, -c,e,f.remaining);c=new CKEDITOR.dom.range(f.element);c.selectNodeContents(f.element);c=c.createIterator();c.enlargeBr=a.enlargeBr;c.enforceRealBlocks=a.enforceRealBlocks;c.activeFilter=c.filter=h;a._.nestedEditable={element:f.element,container:e,remaining:f.remaining,iterator:c};return 1}function c(a,b,c){if(!b)return!1;a=a.clone();a.collapse(!c);return a.checkBoundaryOfElement(b,c?CKEDITOR.START:CKEDITOR.END)}var f=/^[\r\n\t ]+$/,e=CKEDITOR.dom.walker.bookmark(!1,!0),k=CKEDITOR.dom.walker.whitespaces(!0), -h=function(a){return e(a)&&k(a)},p={dd:1,dt:1,li:1};a.prototype={getNextParagraph:function(a){var d,k,y,A,F;a=a||"p";if(this._.nestedEditable){if(d=this._.nestedEditable.iterator.getNextParagraph(a))return this.activeFilter=this._.nestedEditable.iterator.activeFilter,d;this.activeFilter=this.filter;if(b(this,a,this._.nestedEditable.container,this._.nestedEditable.remaining))return this.activeFilter=this._.nestedEditable.iterator.activeFilter,this._.nestedEditable.iterator.getNextParagraph(a);this._.nestedEditable= -null}if(!this.range.root.getDtd()[a])return null;if(!this._.started){var v=this.range.clone();k=v.startPath();var l=v.endPath(),L=!v.collapsed&&c(v,k.block),w=!v.collapsed&&c(v,l.block,1);v.shrink(CKEDITOR.SHRINK_ELEMENT,!0);L&&v.setStartAt(k.block,CKEDITOR.POSITION_BEFORE_END);w&&v.setEndAt(l.block,CKEDITOR.POSITION_AFTER_START);k=v.endContainer.hasAscendant("pre",!0)||v.startContainer.hasAscendant("pre",!0);v.enlarge(this.forceBrBreak&&!k||!this.enlargeBr?CKEDITOR.ENLARGE_LIST_ITEM_CONTENTS:CKEDITOR.ENLARGE_BLOCK_CONTENTS); -v.collapsed||(k=new CKEDITOR.dom.walker(v.clone()),l=CKEDITOR.dom.walker.bookmark(!0,!0),k.evaluator=l,this._.nextNode=k.next(),k=new CKEDITOR.dom.walker(v.clone()),k.evaluator=l,k=k.previous(),this._.lastNode=k.getNextSourceNode(!0,null,v.root),this._.lastNode&&this._.lastNode.type==CKEDITOR.NODE_TEXT&&!CKEDITOR.tools.trim(this._.lastNode.getText())&&this._.lastNode.getParent().isBlockBoundary()&&(l=this.range.clone(),l.moveToPosition(this._.lastNode,CKEDITOR.POSITION_AFTER_END),l.checkEndOfBlock()&& -(l=new CKEDITOR.dom.elementPath(l.endContainer,l.root),this._.lastNode=(l.block||l.blockLimit).getNextSourceNode(!0))),this._.lastNode&&v.root.contains(this._.lastNode)||(this._.lastNode=this._.docEndMarker=v.document.createText(""),this._.lastNode.insertAfter(k)),v=null);this._.started=1;k=v}l=this._.nextNode;v=this._.lastNode;for(this._.nextNode=null;l;){var L=0,w=l.hasAscendant("pre"),J=l.type!=CKEDITOR.NODE_ELEMENT,G=0;if(J)l.type==CKEDITOR.NODE_TEXT&&f.test(l.getText())&&(J=0);else{var q=l.getName(); -if(CKEDITOR.dtd.$block[q]&&"false"==l.getAttribute("contenteditable")){d=l;b(this,a,d);break}else if(l.isBlockBoundary(this.forceBrBreak&&!w&&{br:1})){if("br"==q)J=1;else if(!k&&!l.getChildCount()&&"hr"!=q){d=l;y=l.equals(v);break}k&&(k.setEndAt(l,CKEDITOR.POSITION_BEFORE_START),"br"!=q&&(this._.nextNode=l));L=1}else{if(l.getFirst()){k||(k=this.range.clone(),k.setStartAt(l,CKEDITOR.POSITION_BEFORE_START));l=l.getFirst();continue}J=1}}J&&!k&&(k=this.range.clone(),k.setStartAt(l,CKEDITOR.POSITION_BEFORE_START)); -y=(!L||J)&&l.equals(v);if(k&&!L)for(;!l.getNext(h)&&!y;){q=l.getParent();if(q.isBlockBoundary(this.forceBrBreak&&!w&&{br:1})){L=1;J=0;y||q.equals(v);k.setEndAt(q,CKEDITOR.POSITION_BEFORE_END);break}l=q;J=1;y=l.equals(v);G=1}J&&k.setEndAt(l,CKEDITOR.POSITION_AFTER_END);l=this._getNextSourceNode(l,G,v);if((y=!l)||L&&k)break}if(!d){if(!k)return this._.docEndMarker&&this._.docEndMarker.remove(),this._.nextNode=null;d=new CKEDITOR.dom.elementPath(k.startContainer,k.root);l=d.blockLimit;L={div:1,th:1,td:1}; -d=d.block;!d&&l&&!this.enforceRealBlocks&&L[l.getName()]&&k.checkStartOfBlock()&&k.checkEndOfBlock()&&!l.equals(k.root)?d=l:!d||this.enforceRealBlocks&&d.is(p)?(d=this.range.document.createElement(a),k.extractContents().appendTo(d),d.trim(),k.insertNode(d),A=F=!0):"li"!=d.getName()?k.checkStartOfBlock()&&k.checkEndOfBlock()||(d=d.clone(!1),k.extractContents().appendTo(d),d.trim(),F=k.splitBlock(),A=!F.wasStartOfBlock,F=!F.wasEndOfBlock,k.insertNode(d)):y||(this._.nextNode=d.equals(v)?null:this._getNextSourceNode(k.getBoundaryNodes().endNode, -1,v))}A&&(A=d.getPrevious())&&A.type==CKEDITOR.NODE_ELEMENT&&("br"==A.getName()?A.remove():A.getLast()&&"br"==A.getLast().$.nodeName.toLowerCase()&&A.getLast().remove());F&&(A=d.getLast())&&A.type==CKEDITOR.NODE_ELEMENT&&"br"==A.getName()&&(!CKEDITOR.env.needsBrFiller||A.getPrevious(e)||A.getNext(e))&&A.remove();this._.nextNode||(this._.nextNode=y||d.equals(v)||!v?null:this._getNextSourceNode(d,1,v));return d},_getNextSourceNode:function(a,b,c){function d(a){return!(a.equals(c)||a.equals(f))}var f= -this.range.root;for(a=a.getNextSourceNode(b,null,d);!e(a);)a=a.getNextSourceNode(b,null,d);return a}};CKEDITOR.dom.range.prototype.createIterator=function(){return new a(this)}})(); -CKEDITOR.command=function(a,d){this.uiItems=[];this.exec=function(b){if(this.state==CKEDITOR.TRISTATE_DISABLED||!this.checkAllowed())return!1;this.editorFocus&&a.focus();return!1===this.fire("exec")?!0:!1!==d.exec.call(this,a,b)};this.refresh=function(a,b){if(!this.readOnly&&a.readOnly)return!0;if(this.context&&!b.isContextFor(this.context)||!this.checkAllowed(!0))return this.disable(),!0;this.startDisabled||this.enable();this.modes&&!this.modes[a.mode]&&this.disable();return!1===this.fire("refresh", -{editor:a,path:b})?!0:d.refresh&&!1!==d.refresh.apply(this,arguments)};var b;this.checkAllowed=function(c){return c||"boolean"!=typeof b?b=a.activeFilter.checkFeature(this):b};CKEDITOR.tools.extend(this,d,{modes:{wysiwyg:1},editorFocus:1,contextSensitive:!!d.context,state:CKEDITOR.TRISTATE_DISABLED});CKEDITOR.event.call(this)}; -CKEDITOR.command.prototype={enable:function(){this.state==CKEDITOR.TRISTATE_DISABLED&&this.checkAllowed()&&this.setState(this.preserveState&&"undefined"!=typeof this.previousState?this.previousState:CKEDITOR.TRISTATE_OFF)},disable:function(){this.setState(CKEDITOR.TRISTATE_DISABLED)},setState:function(a){if(this.state==a||a!=CKEDITOR.TRISTATE_DISABLED&&!this.checkAllowed())return!1;this.previousState=this.state;this.state=a;this.fire("state");return!0},toggleState:function(){this.state==CKEDITOR.TRISTATE_OFF? -this.setState(CKEDITOR.TRISTATE_ON):this.state==CKEDITOR.TRISTATE_ON&&this.setState(CKEDITOR.TRISTATE_OFF)}};CKEDITOR.event.implementOn(CKEDITOR.command.prototype);CKEDITOR.ENTER_P=1;CKEDITOR.ENTER_BR=2;CKEDITOR.ENTER_DIV=3; -CKEDITOR.config={customConfig:"config.js",autoUpdateElement:!0,language:"",defaultLanguage:"en",contentsLangDirection:"",enterMode:CKEDITOR.ENTER_P,forceEnterMode:!1,shiftEnterMode:CKEDITOR.ENTER_BR,docType:"\x3c!DOCTYPE html\x3e",bodyId:"",bodyClass:"",fullPage:!1,height:200,contentsCss:CKEDITOR.getUrl("contents.css"),extraPlugins:"",removePlugins:"",protectedSource:[],tabIndex:0,useComputedState:!0,width:"",baseFloatZIndex:1E4,blockedKeystrokes:[CKEDITOR.CTRL+66,CKEDITOR.CTRL+73,CKEDITOR.CTRL+85]}; -(function(){function a(a,b,c,d,e){var f,g;a=[];for(f in b){g=b[f];g="boolean"==typeof g?{}:"function"==typeof g?{match:g}:B(g);"$"!=f.charAt(0)&&(g.elements=f);c&&(g.featureName=c.toLowerCase());var n=g;n.elements=k(n.elements,/\s+/)||null;n.propertiesOnly=n.propertiesOnly||!0===n.elements;var t=/\s*,\s*/,r=void 0;for(r in N){n[r]=k(n[r],t)||null;var l=n,z=O[r],h=k(n[O[r]],t),E=n[r],D=[],H=!0,I=void 0;h?H=!1:h={};for(I in E)"!"==I.charAt(0)&&(I=I.slice(1),D.push(I),h[I]=!0,H=!1);for(;I=D.pop();)E[I]= -E["!"+I],delete E["!"+I];l[z]=(H?!1:h)||null}n.match=n.match||null;d.push(g);a.push(g)}b=e.elements;e=e.generic;var C;c=0;for(d=a.length;c=--p&&(e&&CKEDITOR.document.getDocumentElement().removeStyle("cursor"),x(b))},A=function(b,c){a[b]=1;var e=d[b];delete d[b];for(var f=0;f=CKEDITOR.env.version||CKEDITOR.env.ie9Compat)?f.$.onreadystatechange=function(){if("loaded"==f.$.readyState||"complete"==f.$.readyState)f.$.onreadystatechange=null,A(b,!0)}:(f.$.onload=function(){setTimeout(function(){f.$.onload=null;f.$.onerror=null;A(b,!0)},0)},f.$.onerror=function(){f.$.onload=null;f.$.onerror=null;A(b,!1)}));f.appendTo(CKEDITOR.document.getHead())}}};e&&CKEDITOR.document.getDocumentElement().setStyle("cursor", -"wait");for(var v=0;v]+)>)|(?:!--([\S|\s]*?)--!?>)|(?:([^\/\s>]+)((?:\s+[\w\-:.]+(?:\s*=\s*?(?:(?:"[^"]*")|(?:'[^']*')|[^\s"'\/>]+))?)*)[\S\s]*?(\/?)>))/g}}; -(function(){var a=/([\w\-:.]+)(?:(?:\s*=\s*(?:(?:"([^"]*)")|(?:'([^']*)')|([^\s>]+)))|(?=\s|$))/g,d={checked:1,compact:1,declare:1,defer:1,disabled:1,ismap:1,multiple:1,nohref:1,noresize:1,noshade:1,nowrap:1,readonly:1,selected:1};CKEDITOR.htmlParser.prototype={onTagOpen:function(){},onTagClose:function(){},onText:function(){},onCDATA:function(){},onComment:function(){},parse:function(b){for(var c,f,e=0,k;c=this._.htmlPartsRegex.exec(b);){f=c.index;if(f>e)if(e=b.substring(e,f),k)k.push(e);else this.onText(e); -e=this._.htmlPartsRegex.lastIndex;if(f=c[1])if(f=f.toLowerCase(),k&&CKEDITOR.dtd.$cdata[f]&&(this.onCDATA(k.join("")),k=null),!k){this.onTagClose(f);continue}if(k)k.push(c[0]);else if(f=c[3]){if(f=f.toLowerCase(),!/="/.test(f)){var h={},p,m=c[4];c=!!c[5];if(m)for(;p=a.exec(m);){var g=p[1].toLowerCase();p=p[2]||p[3]||p[4]||"";h[g]=!p&&d[g]?g:CKEDITOR.tools.htmlDecodeAttr(p)}this.onTagOpen(f,h,c);!k&&CKEDITOR.dtd.$cdata[f]&&(k=[])}}else if(f=c[2])this.onComment(f)}if(b.length>e)this.onText(b.substring(e, -b.length))}}})(); -CKEDITOR.htmlParser.basicWriter=CKEDITOR.tools.createClass({$:function(){this._={output:[]}},proto:{openTag:function(a){this._.output.push("\x3c",a)},openTagClose:function(a,d){d?this._.output.push(" /\x3e"):this._.output.push("\x3e")},attribute:function(a,d){"string"==typeof d&&(d=CKEDITOR.tools.htmlEncodeAttr(d));this._.output.push(" ",a,'\x3d"',d,'"')},closeTag:function(a){this._.output.push("\x3c/",a,"\x3e")},text:function(a){this._.output.push(a)},comment:function(a){this._.output.push("\x3c!--",a, -"--\x3e")},write:function(a){this._.output.push(a)},reset:function(){this._.output=[];this._.indent=!1},getHtml:function(a){var d=this._.output.join("");a&&this.reset();return d}}});"use strict"; -(function(){CKEDITOR.htmlParser.node=function(){};CKEDITOR.htmlParser.node.prototype={remove:function(){var a=this.parent.children,d=CKEDITOR.tools.indexOf(a,this),b=this.previous,c=this.next;b&&(b.next=c);c&&(c.previous=b);a.splice(d,1);this.parent=null},replaceWith:function(a){var d=this.parent.children,b=CKEDITOR.tools.indexOf(d,this),c=a.previous=this.previous,f=a.next=this.next;c&&(c.next=a);f&&(f.previous=a);d[b]=a;a.parent=this.parent;this.parent=null},insertAfter:function(a){var d=a.parent.children, -b=CKEDITOR.tools.indexOf(d,a),c=a.next;d.splice(b+1,0,this);this.next=a.next;this.previous=a;a.next=this;c&&(c.previous=this);this.parent=a.parent},insertBefore:function(a){var d=a.parent.children,b=CKEDITOR.tools.indexOf(d,a);d.splice(b,0,this);this.next=a;(this.previous=a.previous)&&(a.previous.next=this);a.previous=this;this.parent=a.parent},getAscendant:function(a){var d="function"==typeof a?a:"string"==typeof a?function(b){return b.name==a}:function(b){return b.name in a},b=this.parent;for(;b&& -b.type==CKEDITOR.NODE_ELEMENT;){if(d(b))return b;b=b.parent}return null},wrapWith:function(a){this.replaceWith(a);a.add(this);return a},getIndex:function(){return CKEDITOR.tools.indexOf(this.parent.children,this)},getFilterContext:function(a){return a||{}}}})();"use strict";CKEDITOR.htmlParser.comment=function(a){this.value=a;this._={isBlockLike:!1}}; -CKEDITOR.htmlParser.comment.prototype=CKEDITOR.tools.extend(new CKEDITOR.htmlParser.node,{type:CKEDITOR.NODE_COMMENT,filter:function(a,d){var b=this.value;if(!(b=a.onComment(d,b,this)))return this.remove(),!1;if("string"!=typeof b)return this.replaceWith(b),!1;this.value=b;return!0},writeHtml:function(a,d){d&&this.filter(d);a.comment(this.value)}});"use strict"; -(function(){CKEDITOR.htmlParser.text=function(a){this.value=a;this._={isBlockLike:!1}};CKEDITOR.htmlParser.text.prototype=CKEDITOR.tools.extend(new CKEDITOR.htmlParser.node,{type:CKEDITOR.NODE_TEXT,filter:function(a,d){if(!(this.value=a.onText(d,this.value,this)))return this.remove(),!1},writeHtml:function(a,d){d&&this.filter(d);a.text(this.value)}})})();"use strict"; -(function(){CKEDITOR.htmlParser.cdata=function(a){this.value=a};CKEDITOR.htmlParser.cdata.prototype=CKEDITOR.tools.extend(new CKEDITOR.htmlParser.node,{type:CKEDITOR.NODE_TEXT,filter:function(a){var d=this.getAscendant("style");if(d&&d.getAscendant({math:1,svg:1})){var d=CKEDITOR.htmlParser.fragment.fromHtml(this.value),b=new CKEDITOR.htmlParser.basicWriter;a.applyTo(d);d.writeHtml(b);this.value=b.getHtml()}},writeHtml:function(a){a.write(this.value)}})})();"use strict"; -CKEDITOR.htmlParser.fragment=function(){this.children=[];this.parent=null;this._={isBlockLike:!0,hasInlineStarted:!1}}; -(function(){function a(a){return a.attributes["data-cke-survive"]?!1:"a"==a.name&&a.attributes.href||CKEDITOR.dtd.$removeEmpty[a.name]}var d=CKEDITOR.tools.extend({table:1,ul:1,ol:1,dl:1},CKEDITOR.dtd.table,CKEDITOR.dtd.ul,CKEDITOR.dtd.ol,CKEDITOR.dtd.dl),b={ol:1,ul:1},c=CKEDITOR.tools.extend({},{html:1},CKEDITOR.dtd.html,CKEDITOR.dtd.body,CKEDITOR.dtd.head,{style:1,script:1}),f={ul:"li",ol:"li",dl:"dd",table:"tbody",tbody:"tr",thead:"tr",tfoot:"tr",tr:"td"};CKEDITOR.htmlParser.fragment.fromHtml= -function(e,k,h){function p(a){var b;if(0k;k++)if(e=d[k]){e=e.exec(a,c,this);if(!1===e)return null;if(e&&e!=c)return this.onNode(a,e);if(c.parent&&!c.name)break}return c}, -onNode:function(a,c){var d=c.type;return d==CKEDITOR.NODE_ELEMENT?this.onElement(a,c):d==CKEDITOR.NODE_TEXT?new CKEDITOR.htmlParser.text(this.onText(a,c.value,c)):d==CKEDITOR.NODE_COMMENT?new CKEDITOR.htmlParser.comment(this.onComment(a,c.value,c)):null},onAttribute:function(a,c,d,e){return(d=this.attributesRules[d])?d.exec(a,e,c,this):e}}});CKEDITOR.htmlParser.filterRulesGroup=a;a.prototype={add:function(a,c,d){this.rules.splice(this.findIndex(c),0,{value:a,priority:c,options:d})},addMany:function(a, -c,d){for(var e=[this.findIndex(c),0],k=0,h=a.length;k/g,"\x26gt;")+"\x3c/textarea\x3e");return"\x3ccke:encoded\x3e"+encodeURIComponent(a)+"\x3c/cke:encoded\x3e"})}function x(a){return a.replace(O,function(a,b){return decodeURIComponent(b)})}function y(a){return a.replace(/\x3c!--(?!{cke_protected})[\s\S]+?--\x3e/g, -function(a){return"\x3c!--"+w+"{C}"+encodeURIComponent(a).replace(/--/g,"%2D%2D")+"--\x3e"})}function A(a){return a.replace(/\x3c!--\{cke_protected\}\{C\}([\s\S]+?)--\x3e/g,function(a,b){return decodeURIComponent(b)})}function F(a,b){var c=b._.dataStore;return a.replace(/\x3c!--\{cke_protected\}([\s\S]+?)--\x3e/g,function(a,b){return decodeURIComponent(b)}).replace(/\{cke_protected_(\d+)\}/g,function(a,b){return c&&c[b]||""})}function v(a,b,c){var d=[],e=b.config.protectedSource,f=b._.dataStore|| -(b._.dataStore={id:1}),g=new RegExp("\x3c\\!--\\{cke_temp_"+c+"(comment)?\\}(\\d*?)--\x3e","g"),e=[/|$)/gi,//gi,//gi].concat(e);a=a.replace(/\x3c!--[\s\S]*?--\x3e/g,function(a){return"\x3c!--{cke_temp_"+c+"comment}"+(d.push(a)-1)+"--\x3e"});for(var t=0;t]+\s*=\s*(?:[^'"\s>]+|'[^']*'|"[^"]*"))|[^\s=\/>]+))+\s*\/?>/g,function(a){return a.replace(/\x3c!--\{cke_protected\}([^>]*)--\x3e/g,function(a,b){f[f.id]=decodeURIComponent(b);return"{cke_protected_"+f.id++ +"}"})});return a=a.replace(/<(title|iframe|textarea)([^>]*)>([\s\S]*?)<\/\1>/g,function(a,c,d,e){return"\x3c"+c+d+"\x3e"+F(A(e),b)+"\x3c/"+c+"\x3e"})}var l;CKEDITOR.htmlDataProcessor= -function(b){var c,e,f=this;this.editor=b;this.dataFilter=c=new CKEDITOR.htmlParser.filter;this.htmlFilter=e=new CKEDITOR.htmlParser.filter;this.writer=new CKEDITOR.htmlParser.basicWriter;c.addRules(u);c.addRules(K,{applyToAll:!0});c.addRules(a(b,"data"),{applyToAll:!0});e.addRules(E);e.addRules(C,{applyToAll:!0});e.addRules(a(b,"html"),{applyToAll:!0});b.on("toHtml",function(a){var c;var e=window.crypto||window.msCrypto;c=e?e.getRandomValues(new Uint32Array(1))[0]:Math.floor(9E9*Math.random()+1E9); -a=a.data;var e=a.dataValue,e=l(e),e=v(e,b,c),e=g(e,N),e=m(e,c),e=g(e,H),e=e.replace(r,"$1cke:$2"),e=e.replace(M,"\x3ccke:$1$2\x3e\x3c/cke:$1\x3e"),e=e.replace(/(]*>)(\r\n|\n)/g,"$1$2$2"),e=e.replace(/([^a-z0-9<\-])(on\w{3,})(?!>)/gi,"$1data-cke-"+c+"-$2"),f=a.context||b.editable().getName(),t;CKEDITOR.env.ie&&9>CKEDITOR.env.version&&"pre"==f&&(f="div",e="\x3cpre\x3e"+e+"\x3c/pre\x3e",t=1);f=b.document.createElement(f);f.setHtml("a"+e);e=f.getHtml().substr(1);e=e.replace(new RegExp("data-cke-"+ -c+"-","ig"),"");t&&(e=e.replace(/^
|<\/pre>$/gi,""));e=e.replace(I,"$1$2");e=x(e);e=A(e);c=!1===a.fixForBody?!1:d(a.enterMode,b.config.autoParagraph);e=CKEDITOR.htmlParser.fragment.fromHtml(e,a.context,c);c&&(t=e,!t.children.length&&CKEDITOR.dtd[t.name][c]&&(c=new CKEDITOR.htmlParser.element(c),t.add(c)));a.dataValue=e},null,null,5);b.on("toHtml",function(a){a.data.filter.applyTo(a.data.dataValue,!0,a.data.dontFilter,a.data.enterMode)&&b.fire("dataFiltered")},null,null,6);b.on("toHtml",function(a){a.data.dataValue.filterChildren(f.dataFilter,
-!0)},null,null,10);b.on("toHtml",function(a){a=a.data;var b=a.dataValue,c=new CKEDITOR.htmlParser.basicWriter;b.writeChildrenHtml(c);b=c.getHtml(!0);a.dataValue=y(b)},null,null,15);b.on("toDataFormat",function(a){var c=a.data.dataValue;a.data.enterMode!=CKEDITOR.ENTER_BR&&(c=c.replace(/^
/i,""));a.data.dataValue=CKEDITOR.htmlParser.fragment.fromHtml(c,a.data.context,d(a.data.enterMode,b.config.autoParagraph))},null,null,5);b.on("toDataFormat",function(a){a.data.dataValue.filterChildren(f.htmlFilter, -!0)},null,null,10);b.on("toDataFormat",function(a){a.data.filter.applyTo(a.data.dataValue,!1,!0)},null,null,11);b.on("toDataFormat",function(a){var c=a.data.dataValue,d=f.writer;d.reset();c.writeChildrenHtml(d);c=d.getHtml(!0);c=A(c);c=F(c,b);a.data.dataValue=c},null,null,15)};CKEDITOR.htmlDataProcessor.prototype={toHtml:function(a,b,c,d){var e=this.editor,f,g,t,r;b&&"object"==typeof b?(f=b.context,c=b.fixForBody,d=b.dontFilter,g=b.filter,t=b.enterMode,r=b.protectedWhitespaces):f=b;f||null===f||(f= -e.editable().getName());return e.fire("toHtml",{dataValue:a,context:f,fixForBody:c,dontFilter:d,filter:g||e.filter,enterMode:t||e.enterMode,protectedWhitespaces:r}).dataValue},toDataFormat:function(a,b){var c,d,e;b&&(c=b.context,d=b.filter,e=b.enterMode);c||null===c||(c=this.editor.editable().getName());return this.editor.fire("toDataFormat",{dataValue:a,filter:d||this.editor.filter,context:c,enterMode:e||this.editor.enterMode}).dataValue},protectSource:function(a){return v(a,this.editor)},unprotectSource:function(a){return F(a, -this.editor)},unprotectRealComments:function(a){return A(a)}};var L=/(?: |\xa0)$/,w="{cke_protected}",J=CKEDITOR.dtd,G="caption colgroup col thead tfoot tbody".split(" "),q=CKEDITOR.tools.extend({},J.$blockLimit,J.$block),u={elements:{input:h,textarea:h}},K={attributeNames:[[/^on/,"data-cke-pa-on"],[/^srcdoc/,"data-cke-pa-srcdoc"],[/^data-cke-expando$/,""]],elements:{iframe:function(a){if(a.attributes&&a.attributes.src){var b=a.attributes.src.toLowerCase().replace(/[^a-z]/gi,"");if(0===b.indexOf("javascript")|| -0===b.indexOf("data"))a.attributes["data-cke-pa-src"]=a.attributes.src,delete a.attributes.src}}}},E={elements:{embed:function(a){var b=a.parent;if(b&&"object"==b.name){var c=b.attributes.width,b=b.attributes.height;c&&(a.attributes.width=c);b&&(a.attributes.height=b)}},a:function(a){var b=a.attributes;if(!(a.children.length||b.name||b.id||a.attributes["data-cke-saved-name"]))return!1}}},C={elementNames:[[/^cke:/,""],[/^\?xml:namespace$/,""]],attributeNames:[[/^data-cke-(saved|pa)-/,""],[/^data-cke-.*/, -""],["hidefocus",""]],elements:{$:function(a){var b=a.attributes;if(b){if(b["data-cke-temp"])return!1;for(var c=["name","href","src"],d,e=0;ed?1:-1})},param:function(a){a.children= -[];a.isEmpty=!0;return a},span:function(a){"Apple-style-span"==a.attributes["class"]&&delete a.name},html:function(a){delete a.attributes.contenteditable;delete a.attributes["class"]},body:function(a){delete a.attributes.spellcheck;delete a.attributes.contenteditable},style:function(a){var b=a.children[0];b&&b.value&&(b.value=CKEDITOR.tools.trim(b.value));a.attributes.type||(a.attributes.type="text/css")},title:function(a){var b=a.children[0];!b&&k(a,b=new CKEDITOR.htmlParser.text);b.value=a.attributes["data-cke-title"]|| -""},input:p,textarea:p},attributes:{"class":function(a){return CKEDITOR.tools.ltrim(a.replace(/(?:^|\s+)cke_[^\s]*/g,""))||!1}}};CKEDITOR.env.ie&&(C.attributes.style=function(a){return a.replace(/(^|;)([^\:]+)/g,function(a){return a.toLowerCase()})});var t=/<(a|area|img|input|source)\b([^>]*)>/gi,B=/([\w-:]+)\s*=\s*(?:(?:"[^"]*")|(?:'[^']*')|(?:[^ "'>]+))/gi,z=/^(href|src|name)$/i,H=/(?:])[^>]*>[\s\S]*?<\/style>)|(?:<(:?link|meta|base)[^>]*>)/gi,N=/(])[^>]*>)([\s\S]*?)(?:<\/textarea>)/gi, -O=/([^<]*)<\/cke:encoded>/gi,r=/(<\/?)((?:object|embed|param|html|body|head|title)([\s][^>]*)?>)/gi,I=/(<\/?)cke:((?:html|body|head|title)[^>]*>)/gi,M=/]*?)\/?>(?!\s*<\/cke:\1)/gi;l=function(){function a(b,c){for(var d=0;d/g];return function(b){for(;a(d,b);)for(var c=d,e=0;eb?1:0},b=CKEDITOR.htmlParser.fragment.prototype;CKEDITOR.htmlParser.element.prototype=CKEDITOR.tools.extend(new CKEDITOR.htmlParser.node,{type:CKEDITOR.NODE_ELEMENT,add:b.add,clone:function(){return new CKEDITOR.htmlParser.element(this.name,this.attributes)},filter:function(a,b){var d=this,k,h;b=d.getFilterContext(b);if(!d.parent)a.onRoot(b, -d);for(;;){k=d.name;if(!(h=a.onElementName(b,k)))return this.remove(),!1;d.name=h;if(!(d=a.onElement(b,d)))return this.remove(),!1;if(d!==this)return this.replaceWith(d),!1;if(d.name==k)break;if(d.type!=CKEDITOR.NODE_ELEMENT)return this.replaceWith(d),!1;if(!d.name)return this.replaceWithChildren(),!1}k=d.attributes;var p,m;for(p in k){for(h=k[p];;)if(m=a.onAttributeName(b,p))if(m!=p)delete k[p],p=m;else break;else{delete k[p];break}m&&(!1===(h=a.onAttribute(b,d,m,h))?delete k[m]:k[m]=h)}d.isEmpty|| -this.filterChildren(a,!1,b);return!0},filterChildren:b.filterChildren,writeHtml:function(a,b){b&&this.filter(b);var e=this.name,k=[],h=this.attributes,p,m;a.openTag(e,h);for(p in h)k.push([p,h[p]]);a.sortAttributes&&k.sort(d);p=0;for(m=k.length;pCKEDITOR.env.version||CKEDITOR.env.quirks))this.hasFocus&&(this.focus(),b());else if(this.hasFocus)this.focus(), -a();else this.once("focus",function(){a()},null,null,-999)},getHtmlFromRange:function(a){if(a.collapsed)return new CKEDITOR.dom.documentFragment(a.document);a={doc:this.getDocument(),range:a.clone()};q.eol.detect(a,this);q.bogus.exclude(a);q.cell.shrink(a);a.fragment=a.range.cloneContents();q.tree.rebuild(a,this);q.eol.fix(a,this);return new CKEDITOR.dom.documentFragment(a.fragment.$)},extractHtmlFromRange:function(a,b){var c=u,d={range:a,doc:a.document},e=this.getHtmlFromRange(a);if(a.collapsed)return a.optimize(), -e;a.enlarge(CKEDITOR.ENLARGE_INLINE,1);c.table.detectPurge(d);d.bookmark=a.createBookmark();delete d.range;var g=this.editor.createRange();g.moveToPosition(d.bookmark.startNode,CKEDITOR.POSITION_BEFORE_START);d.targetBookmark=g.createBookmark();c.list.detectMerge(d,this);c.table.detectRanges(d,this);c.block.detectMerge(d,this);d.tableContentsRanges?(c.table.deleteRanges(d),a.moveToBookmark(d.bookmark),d.range=a):(a.moveToBookmark(d.bookmark),d.range=a,a.extractContents(c.detectExtractMerge(d)));a.moveToBookmark(d.targetBookmark); -a.optimize();c.fixUneditableRangePosition(a);c.list.merge(d,this);c.table.purge(d,this);c.block.merge(d,this);if(b){c=a.startPath();if(d=a.checkStartOfBlock()&&a.checkEndOfBlock()&&c.block&&!a.root.equals(c.block)){a:{var d=c.block.getElementsByTag("span"),g=0,f;if(d)for(;f=d.getItem(g++);)if(!F(f)){d=!0;break a}d=!1}d=!d}d&&(a.moveToPosition(c.block,CKEDITOR.POSITION_BEFORE_START),c.block.remove())}else c.autoParagraph(this.editor,a),v(a.startContainer)&&a.startContainer.appendBogus();a.startContainer.mergeSiblings(); -return e},setup:function(){var a=this.editor;this.attachListener(a,"beforeGetData",function(){var b=this.getData();this.is("textarea")||!1!==a.config.ignoreEmptyParagraph&&(b=b.replace(L,function(a,b){return b}));a.setData(b,null,1)},this);this.attachListener(a,"getSnapshot",function(a){a.data=this.getData(1)},this);this.attachListener(a,"afterSetData",function(){this.setData(a.getData(1))},this);this.attachListener(a,"loadSnapshot",function(a){this.setData(a.data,1)},this);this.attachListener(a, -"beforeFocus",function(){var b=a.getSelection();(b=b&&b.getNative())&&"Control"==b.type||this.focus()},this);this.attachListener(a,"insertHtml",function(a){this.insertHtml(a.data.dataValue,a.data.mode,a.data.range)},this);this.attachListener(a,"insertElement",function(a){this.insertElement(a.data)},this);this.attachListener(a,"insertText",function(a){this.insertText(a.data)},this);this.setReadOnly(a.readOnly);this.attachClass("cke_editable");a.elementMode==CKEDITOR.ELEMENT_MODE_INLINE?this.attachClass("cke_editable_inline"): -a.elementMode!=CKEDITOR.ELEMENT_MODE_REPLACE&&a.elementMode!=CKEDITOR.ELEMENT_MODE_APPENDTO||this.attachClass("cke_editable_themed");this.attachClass("cke_contents_"+a.config.contentsLangDirection);a.keystrokeHandler.blockedKeystrokes[8]=+a.readOnly;a.keystrokeHandler.attach(this);this.on("blur",function(){this.hasFocus=!1},null,null,-1);this.on("focus",function(){this.hasFocus=!0},null,null,-1);if(CKEDITOR.env.webkit)this.on("scroll",function(){a._.previousScrollTop=a.editable().$.scrollTop},null, -null,-1);if(CKEDITOR.env.edge&&14CKEDITOR.env.version?H.$.styleSheet.cssText=z:H.setText(z)):(z=g.appendStyleText(z),z=new CKEDITOR.dom.element(z.ownerNode||z.owningElement),f.setCustomData("stylesheet", -z),z.data("cke-temp",1))}f=g.getCustomData("stylesheet_ref")||0;g.setCustomData("stylesheet_ref",f+1);this.setCustomData("cke_includeReadonly",!a.config.disableReadonlyStyling);this.attachListener(this,"click",function(a){a=a.data;var b=(new CKEDITOR.dom.elementPath(a.getTarget(),this)).contains("a");b&&2!=a.$.button&&b.isReadOnly()&&a.preventDefault()});var N={8:1,46:1};this.attachListener(a,"key",function(b){if(a.readOnly)return!0;var c=b.data.domEvent.getKey(),d,g=a.getSelection();if(0!==g.getRanges().length){if(c in -N){var f;b=g.getRanges()[0];var t=b.startPath(),z,B,H,c=8==c,m=!1;if(CKEDITOR.env.ie&&11>CKEDITOR.env.version&&g.getSelectedElement())f=g.getSelectedElement();else if(e(g)){var l=new CKEDITOR.dom.walker(b),p=b.collapsed?b.startContainer:l.next(),m=!1,C;if(b.checkStartOfBlock()){C=b.startPath().block||b.startPath().blockLimit;var q=C.getName();C=-1!==CKEDITOR.tools.array.indexOf(["dd","dt","li"],q)&&null===C.getPrevious()}else C=!1;if(C){for(;p&&!m;)m=p.$.nodeName.toLowerCase(),m=!!K[m],p=l.next(); -l=h(b.startPath());p=h(b.endPath());m=m||l!==p}else m=void 0;m||(f=k(g))}f||m?(a.fire("saveSnapshot"),m?((d=b.startContainer.getAscendant(K,!0))?(b.setStart(d,0),b.enlarge(CKEDITOR.ENLARGE_ELEMENT),f=b):f=null,f.deleteContents()):(b.moveToPosition(f,CKEDITOR.POSITION_BEFORE_START),f.remove()),b.select(),a.fire("saveSnapshot"),d=1):b.collapsed&&((z=t.block)&&(H=z[c?"getPrevious":"getNext"](A))&&H.type==CKEDITOR.NODE_ELEMENT&&H.is("table")&&b[c?"checkStartOfBlock":"checkEndOfBlock"]()?(a.fire("saveSnapshot"), -b[c?"checkEndOfBlock":"checkStartOfBlock"]()&&z.remove(),b["moveToElementEdit"+(c?"End":"Start")](H),b.select(),a.fire("saveSnapshot"),d=1):t.blockLimit&&t.blockLimit.is("td")&&(B=t.blockLimit.getAscendant("table"))&&b.checkBoundaryOfElement(B,c?CKEDITOR.START:CKEDITOR.END)&&(H=B[c?"getPrevious":"getNext"](A))?(a.fire("saveSnapshot"),b["moveToElementEdit"+(c?"End":"Start")](H),b.checkStartOfBlock()&&b.checkEndOfBlock()?H.remove():b.select(),a.fire("saveSnapshot"),d=1):(B=t.contains(["td","th","caption"]))&& -b.checkBoundaryOfElement(B,c?CKEDITOR.START:CKEDITOR.END)&&(d=1))}return!d}});a.blockless&&CKEDITOR.env.ie&&CKEDITOR.env.needsBrFiller&&this.attachListener(this,"keyup",function(b){b.data.getKeystroke()in N&&!this.getFirst(c)&&(this.appendBogus(),b=a.createRange(),b.moveToPosition(this,CKEDITOR.POSITION_AFTER_START),b.select())});this.attachListener(this,"dblclick",function(b){if(a.readOnly)return!1;b={element:b.data.getTarget()};a.fire("doubleclick",b)});CKEDITOR.env.ie&&this.attachListener(this, -"click",b);CKEDITOR.env.ie&&!CKEDITOR.env.edge||this.attachListener(this,"mousedown",function(b){var c=b.data.getTarget();c.is("img","hr","input","textarea","select")&&!c.isReadOnly()&&(a.getSelection().selectElement(c),c.is("input","textarea","select")&&b.data.preventDefault())});CKEDITOR.env.edge&&this.attachListener(this,"mouseup",function(b){(b=b.data.getTarget())&&b.is("img")&&!b.isReadOnly()&&a.getSelection().selectElement(b)});CKEDITOR.env.gecko&&this.attachListener(this,"mouseup",function(b){if(2== -b.data.$.button&&(b=b.data.getTarget(),!b.getAscendant("table")&&!b.getOuterHtml().replace(L,""))){var c=a.createRange();c.moveToElementEditStart(b);c.select(!0)}});CKEDITOR.env.webkit&&(this.attachListener(this,"click",function(a){a.data.getTarget().is("input","select")&&a.data.preventDefault()}),this.attachListener(this,"mouseup",function(a){a.data.getTarget().is("input","textarea")&&a.data.preventDefault()}));CKEDITOR.env.webkit&&this.attachListener(a,"key",function(b){if(a.readOnly)return!0;var c= -b.data.domEvent.getKey();if(c in N&&(b=a.getSelection(),0!==b.getRanges().length)){var c=8==c,d=b.getRanges()[0];b=d.startPath();if(d.collapsed)a:{var e=b.block;if(e&&d[c?"checkStartOfBlock":"checkEndOfBlock"](!0)&&d.moveToClosestEditablePosition(e,!c)&&d.collapsed){if(d.startContainer.type==CKEDITOR.NODE_ELEMENT){var g=d.startContainer.getChild(d.startOffset-(c?1:0));if(g&&g.type==CKEDITOR.NODE_ELEMENT&&g.is("hr")){a.fire("saveSnapshot");g.remove();b=!0;break a}}d=d.startPath().block;if(!d||d&&d.contains(e))b= -void 0;else{a.fire("saveSnapshot");var f;(f=(c?d:e).getBogus())&&f.remove();f=a.getSelection();g=f.createBookmarks();(c?e:d).moveChildren(c?d:e,!1);b.lastElement.mergeSiblings();y(e,d,!c);f.selectBookmarks(g);b=!0}}else b=!1}else c=d,f=b.block,d=c.endPath().block,f&&d&&!f.equals(d)?(a.fire("saveSnapshot"),(e=f.getBogus())&&e.remove(),c.enlarge(CKEDITOR.ENLARGE_INLINE),c.deleteContents(),d.getParent()&&(d.moveChildren(f,!1),b.lastElement.mergeSiblings(),y(f,d,!0)),c=a.getSelection().getRanges()[0], -c.collapse(1),c.optimize(),""===c.startContainer.getHtml()&&c.startContainer.appendBogus(),c.select(),b=!0):b=!1;if(!b)return;a.getSelection().scrollIntoView();a.fire("saveSnapshot");return!1}},this,null,100)}},getUniqueId:function(){var a;try{this._.expandoNumber=a=CKEDITOR.dom.domObject.prototype.getUniqueId.call(this)}catch(b){a=this._&&this._.expandoNumber}return a}},_:{cleanCustomData:function(){this.removeClass("cke_editable");this.restoreAttrs();for(var a=this.removeCustomData("classes");a&& -a.length;)this.removeClass(a.pop());if(!this.is("textarea")){var a=this.getDocument(),b=a.getHead();if(b.getCustomData("stylesheet")){var c=a.getCustomData("stylesheet_ref");--c?a.setCustomData("stylesheet_ref",c):(a.removeCustomData("stylesheet_ref"),b.removeCustomData("stylesheet").remove())}}}}});CKEDITOR.editor.prototype.editable=function(a){var b=this._.editable;if(b&&a)return 0;if(!arguments.length)return b;a?b=a instanceof CKEDITOR.editable?a:new CKEDITOR.editable(this,a):(b&&b.detach(),b= -null);return this._.editable=b};CKEDITOR.on("instanceLoaded",function(b){var c=b.editor;c.on("insertElement",function(a){a=a.data;a.type==CKEDITOR.NODE_ELEMENT&&(a.is("input")||a.is("textarea"))&&("false"!=a.getAttribute("contentEditable")&&a.data("cke-editable",a.hasAttribute("contenteditable")?"true":"1"),a.setAttribute("contentEditable",!1))});c.on("selectionChange",function(b){if(!c.readOnly){var d=c.getSelection();d&&!d.isLocked&&(d=c.checkDirty(),c.fire("lockSnapshot"),a(b),c.fire("unlockSnapshot"), -!d&&c.resetDirty())}})});CKEDITOR.on("instanceCreated",function(a){var b=a.editor;b.on("mode",function(){var a=b.editable();if(a&&a.isInline()){var c=b.title;a.changeAttr("role","textbox");a.changeAttr("aria-multiline","true");c&&a.changeAttr("aria-label",c);c&&a.changeAttr("title",c);var d=b.fire("ariaEditorHelpLabel",{}).label;if(d&&(c=this.ui.space(this.elementMode==CKEDITOR.ELEMENT_MODE_INLINE?"top":"contents"))){var e=CKEDITOR.tools.getNextId(),d=CKEDITOR.dom.element.createFromHtml('\x3cspan id\x3d"'+ -e+'" class\x3d"cke_voice_label"\x3e'+d+"\x3c/span\x3e");c.append(d);a.changeAttr("aria-describedby",e)}}})});CKEDITOR.addCss(".cke_editable{cursor:text}.cke_editable img,.cke_editable input,.cke_editable textarea{cursor:default}");A=CKEDITOR.dom.walker.whitespaces(!0);F=CKEDITOR.dom.walker.bookmark(!1,!0);v=CKEDITOR.dom.walker.empty();l=CKEDITOR.dom.walker.bogus();L=/(^|]*>)\s*<(p|div|address|h\d|center|pre)[^>]*>\s*(?:]*>| |\u00A0| )?\s*(:?<\/\2>)?\s*(?=$|<\/body>)/gi;w= -function(){function a(b){return b.type==CKEDITOR.NODE_ELEMENT}function b(c,d){var e,g,f,h,r=[],t=d.range.startContainer;e=d.range.startPath();for(var t=l[t.getName()],k=0,z=c.getChildren(),B=z.count(),H=-1,I=-1,M=0,N=e.contains(l.$list);kCKEDITOR.env.version&&d.getChildCount()&&d.getFirst().remove())}return function(d){var e=d.startContainer,g=e.getAscendant("table",1),f=!1;c(g.getElementsByTag("td"));c(g.getElementsByTag("th"));g=d.clone();g.setStart(e,0);g=a(g).lastBackward();g||(g=d.clone(),g.setEndAt(e, -CKEDITOR.POSITION_BEFORE_END),g=a(g).lastForward(),f=!0);g||(g=e);g.is("table")?(d.setStartAt(g,CKEDITOR.POSITION_BEFORE_START),d.collapse(!0),g.remove()):(g.is({tbody:1,thead:1,tfoot:1})&&(g=b(g,"tr",f)),g.is("tr")&&(g=b(g,g.getParent().is("thead")?"th":"td",f)),(e=g.getBogus())&&e.remove(),d.moveToPosition(g,f?CKEDITOR.POSITION_AFTER_START:CKEDITOR.POSITION_BEFORE_END))}}();G=function(){function a(b){b=new CKEDITOR.dom.walker(b);b.guard=function(a,b){if(b)return!1;if(a.type==CKEDITOR.NODE_ELEMENT)return a.is(CKEDITOR.dtd.$list)|| -a.is(CKEDITOR.dtd.$listItem)};b.evaluator=function(a){return a.type==CKEDITOR.NODE_ELEMENT&&a.is(CKEDITOR.dtd.$listItem)};return b}return function(b){var c=b.startContainer,d=!1,e;e=b.clone();e.setStart(c,0);e=a(e).lastBackward();e||(e=b.clone(),e.setEndAt(c,CKEDITOR.POSITION_BEFORE_END),e=a(e).lastForward(),d=!0);e||(e=c);e.is(CKEDITOR.dtd.$list)?(b.setStartAt(e,CKEDITOR.POSITION_BEFORE_START),b.collapse(!0),e.remove()):((c=e.getBogus())&&c.remove(),b.moveToPosition(e,d?CKEDITOR.POSITION_AFTER_START: -CKEDITOR.POSITION_BEFORE_END),b.select())}}();q={eol:{detect:function(a,b){var c=a.range,d=c.clone(),e=c.clone(),g=new CKEDITOR.dom.elementPath(c.startContainer,b),f=new CKEDITOR.dom.elementPath(c.endContainer,b);d.collapse(1);e.collapse();g.block&&d.checkBoundaryOfElement(g.block,CKEDITOR.END)&&(c.setStartAfter(g.block),a.prependEolBr=1);f.block&&e.checkBoundaryOfElement(f.block,CKEDITOR.START)&&(c.setEndBefore(f.block),a.appendEolBr=1)},fix:function(a,b){var c=b.getDocument(),d;a.appendEolBr&&(d= -this.createEolBr(c),a.fragment.append(d));!a.prependEolBr||d&&!d.getPrevious()||a.fragment.append(this.createEolBr(c),1)},createEolBr:function(a){return a.createElement("br",{attributes:{"data-cke-eol":1}})}},bogus:{exclude:function(a){var b=a.range.getBoundaryNodes(),c=b.startNode,b=b.endNode;!b||!l(b)||c&&c.equals(b)||a.range.setEndBefore(b)}},tree:{rebuild:function(a,b){var c=a.range,d=c.getCommonAncestor(),e=new CKEDITOR.dom.elementPath(d,b),g=new CKEDITOR.dom.elementPath(c.startContainer,b), -c=new CKEDITOR.dom.elementPath(c.endContainer,b),f;d.type==CKEDITOR.NODE_TEXT&&(d=d.getParent());if(e.blockLimit.is({tr:1,table:1})){var h=e.contains("table").getParent();f=function(a){return!a.equals(h)}}else if(e.block&&e.block.is(CKEDITOR.dtd.$listItem)&&(g=g.contains(CKEDITOR.dtd.$list),c=c.contains(CKEDITOR.dtd.$list),!g.equals(c))){var r=e.contains(CKEDITOR.dtd.$list).getParent();f=function(a){return!a.equals(r)}}f||(f=function(a){return!a.equals(e.block)&&!a.equals(e.blockLimit)});this.rebuildFragment(a, -b,d,f)},rebuildFragment:function(a,b,c,d){for(var e;c&&!c.equals(b)&&d(c);)e=c.clone(0,1),a.fragment.appendTo(e),a.fragment=e,c=c.getParent()}},cell:{shrink:function(a){a=a.range;var b=a.startContainer,c=a.endContainer,d=a.startOffset,e=a.endOffset;b.type==CKEDITOR.NODE_ELEMENT&&b.equals(c)&&b.is("tr")&&++d==e&&a.shrink(CKEDITOR.SHRINK_TEXT)}}};u=function(){function a(b,c){var d=b.getParent();if(d.is(CKEDITOR.dtd.$inline))b[c?"insertBefore":"insertAfter"](d)}function b(c,d,e){a(d);a(e,1);for(var g;g= -e.getNext();)g.insertAfter(d),d=g;v(c)&&c.remove()}function c(a,b){var d=new CKEDITOR.dom.range(a);d.setStartAfter(b.startNode);d.setEndBefore(b.endNode);return d}return{list:{detectMerge:function(a,b){var d=c(b,a.bookmark),e=d.startPath(),g=d.endPath(),f=e.contains(CKEDITOR.dtd.$list),h=g.contains(CKEDITOR.dtd.$list);a.mergeList=f&&h&&f.getParent().equals(h.getParent())&&!f.equals(h);a.mergeListItems=e.block&&g.block&&e.block.is(CKEDITOR.dtd.$listItem)&&g.block.is(CKEDITOR.dtd.$listItem);if(a.mergeList|| -a.mergeListItems)d=d.clone(),d.setStartBefore(a.bookmark.startNode),d.setEndAfter(a.bookmark.endNode),a.mergeListBookmark=d.createBookmark()},merge:function(a,c){if(a.mergeListBookmark){var d=a.mergeListBookmark.startNode,e=a.mergeListBookmark.endNode,g=new CKEDITOR.dom.elementPath(d,c),f=new CKEDITOR.dom.elementPath(e,c);if(a.mergeList){var h=g.contains(CKEDITOR.dtd.$list),k=f.contains(CKEDITOR.dtd.$list);h.equals(k)||(k.moveChildren(h),k.remove())}a.mergeListItems&&(g=g.contains(CKEDITOR.dtd.$listItem), -f=f.contains(CKEDITOR.dtd.$listItem),g.equals(f)||b(f,d,e));d.remove();e.remove()}}},block:{detectMerge:function(a,b){if(!a.tableContentsRanges&&!a.mergeListBookmark){var c=new CKEDITOR.dom.range(b);c.setStartBefore(a.bookmark.startNode);c.setEndAfter(a.bookmark.endNode);a.mergeBlockBookmark=c.createBookmark()}},merge:function(a,c){if(a.mergeBlockBookmark&&!a.purgeTableBookmark){var d=a.mergeBlockBookmark.startNode,e=a.mergeBlockBookmark.endNode,g=new CKEDITOR.dom.elementPath(d,c),f=new CKEDITOR.dom.elementPath(e, -c),g=g.block,f=f.block;g&&f&&!g.equals(f)&&b(f,d,e);d.remove();e.remove()}}},table:function(){function a(c){var e=[],g,f=new CKEDITOR.dom.walker(c),h=c.startPath().contains(d),k=c.endPath().contains(d),t={};f.guard=function(a,f){if(a.type==CKEDITOR.NODE_ELEMENT){var B="visited_"+(f?"out":"in");if(a.getCustomData(B))return;CKEDITOR.dom.element.setMarker(t,a,B,1)}if(f&&h&&a.equals(h))g=c.clone(),g.setEndAt(h,CKEDITOR.POSITION_BEFORE_END),e.push(g);else if(!f&&k&&a.equals(k))g=c.clone(),g.setStartAt(k, -CKEDITOR.POSITION_AFTER_START),e.push(g);else{if(B=!f)B=a.type==CKEDITOR.NODE_ELEMENT&&a.is(d)&&(!h||b(a,h))&&(!k||b(a,k));if(!B&&(B=f))if(a.is(d))var B=h&&h.getAscendant("table",!0),I=k&&k.getAscendant("table",!0),m=a.getAscendant("table",!0),B=B&&B.contains(m)||I&&I.contains(m);else B=void 0;B&&(g=c.clone(),g.selectNodeContents(a),e.push(g))}};f.lastForward();CKEDITOR.dom.element.clearAllMarkers(t);return e}function b(a,c){var d=CKEDITOR.POSITION_CONTAINS+CKEDITOR.POSITION_IS_CONTAINED,e=a.getPosition(c); -return e===CKEDITOR.POSITION_IDENTICAL?!1:0===(e&d)}var d={td:1,th:1,caption:1};return{detectPurge:function(a){var b=a.range,c=b.clone();c.enlarge(CKEDITOR.ENLARGE_ELEMENT);var c=new CKEDITOR.dom.walker(c),e=0;c.evaluator=function(a){a.type==CKEDITOR.NODE_ELEMENT&&a.is(d)&&++e};c.checkForward();if(1g&&e&&e.intersectsNode(c.$)){var f=[{node:d.anchorNode,offset:d.anchorOffset}, -{node:d.focusNode,offset:d.focusOffset}];d.anchorNode==c.$&&d.anchorOffset>g&&(f[0].offset-=g);d.focusNode==c.$&&d.focusOffset>g&&(f[1].offset-=g)}}c.setText(y(c.getText(),1));f&&(c=a.getDocument().$,d=c.getSelection(),c=c.createRange(),c.setStart(f[0].node,f[0].offset),c.collapse(!0),d.removeAllRanges(),d.addRange(c),d.extend(f[1].node,f[1].offset))}}function y(a,b){return b?a.replace(J,function(a,b){return b?" ":""}):a.replace(w,"")}function A(a,b){var c=b&&CKEDITOR.tools.htmlEncode(b)||"\x26nbsp;", -c=CKEDITOR.dom.element.createFromHtml('\x3cdiv data-cke-hidden-sel\x3d"1" data-cke-temp\x3d"1" style\x3d"'+(CKEDITOR.env.ie&&14>CKEDITOR.env.version?"display:none":"position:fixed;top:0;left:-1000px;width:0;height:0;overflow:hidden;")+'"\x3e'+c+"\x3c/div\x3e",a.document);a.fire("lockSnapshot");a.editable().append(c);var d=a.getSelection(1),e=a.createRange(),g=d.root.on("selectionchange",function(a){a.cancel()},null,null,0);e.setStartAt(c,CKEDITOR.POSITION_AFTER_START);e.setEndAt(c,CKEDITOR.POSITION_BEFORE_END); -d.selectRanges([e]);g.removeListener();a.fire("unlockSnapshot");a._.hiddenSelectionContainer=c}function F(b){var c={37:1,39:1,8:1,46:1};return function(d){var e=d.data.getKeystroke();if(c[e]){var g=b.getSelection(),f=g.getRanges()[0];g.isCollapsed()&&(f=f[38>e?"getPreviousEditableNode":"getNextEditableNode"]())&&f.type==CKEDITOR.NODE_ELEMENT&&"false"==f.getAttribute("contenteditable")&&(g=g.getStartElement(),!g.isBlockBoundary()||""!==(void 0===g.$.textContent?g.$.innerText:g.$.textContent)||a(g.getFirst())|| -8!==e&&46!==e||(g.remove(),b.fire("saveSnapshot")),b.getSelection().fake(f),d.data.preventDefault(),d.cancel())}}}function v(a){for(var b=0;b=d.getLength()?h.setStartAfter(d):h.setStartBefore(d));e&&e.type==CKEDITOR.NODE_TEXT&&(f?h.setEndAfter(e):h.setEndBefore(e));d=new CKEDITOR.dom.walker(h);d.evaluator=function(d){if(d.type==CKEDITOR.NODE_ELEMENT&&d.isReadOnly()){var e=c.clone();c.setEndBefore(d);c.collapsed&&a.splice(b--,1);d.getPosition(h.endContainer)&CKEDITOR.POSITION_CONTAINS||(e.setStartAfter(d),e.collapsed||a.splice(b+1,0,e));return!0}return!1};d.next()}}return a}var l= -"function"!=typeof window.getSelection,L=1,w=CKEDITOR.tools.repeat("​",7),J=new RegExp(w+"( )?","g"),G,q,u,K=CKEDITOR.dom.walker.invisible(1),E=function(){function a(b){return function(a){var c=a.editor.createRange();c.moveToClosestEditablePosition(a.selected,b)&&a.editor.getSelection().selectRanges([c]);return!1}}function b(a){return function(b){var c=b.editor,d=c.createRange(),e;if(!c.readOnly)return(e=d.moveToClosestEditablePosition(b.selected,a))||(e=d.moveToClosestEditablePosition(b.selected, -!a)),e&&c.getSelection().selectRanges([d]),c.fire("saveSnapshot"),b.selected.remove(),e||(d.moveToElementEditablePosition(c.editable()),c.getSelection().selectRanges([d])),c.fire("saveSnapshot"),!1}}var c=a(),d=a(1);return{37:c,38:c,39:d,40:d,8:b(),46:b(1)}}();CKEDITOR.on("instanceCreated",function(a){function b(){var a=c.getSelection();a&&a.removeAllRanges()}var c=a.editor;c.on("contentDom",function(){function a(){q=new CKEDITOR.dom.selection(c.getSelection());q.lock()}function b(){h.removeListener("mouseup", -b);m.removeListener("mouseup",b);var a=CKEDITOR.document.$.selection,c=a.createRange();"None"!=a.type&&c.parentElement()&&c.parentElement().ownerDocument==f.$&&c.select()}function d(a){var b,c;b=(b=this.document.getActive())?"input"===b.getName()||"textarea"===b.getName():!1;b||(b=this.getSelection(1),(c=g(b))&&!c.equals(n)&&(b.selectElement(c),a.data.preventDefault()))}function g(a){a=a.getRanges()[0];return a?(a=a.startContainer.getAscendant(function(a){return a.type==CKEDITOR.NODE_ELEMENT&&a.hasAttribute("contenteditable")}, -!0))&&"false"===a.getAttribute("contenteditable")?a:null:null}var f=c.document,h=CKEDITOR.document,n=c.editable(),t=f.getBody(),m=f.getDocumentElement(),B=n.isInline(),p,q;CKEDITOR.env.gecko&&n.attachListener(n,"focus",function(a){a.removeListener();0!==p&&(a=c.getSelection().getNative())&&a.isCollapsed&&a.anchorNode==n.$&&(a=c.createRange(),a.moveToElementEditStart(n),a.select())},null,null,-2);n.attachListener(n,CKEDITOR.env.webkit||CKEDITOR.env.gecko?"focusin":"focus",function(){if(p&&(CKEDITOR.env.webkit|| -CKEDITOR.env.gecko)){p=c._.previousActive&&c._.previousActive.equals(f.getActive());var a=null!=c._.previousScrollTop&&c._.previousScrollTop!=n.$.scrollTop;CKEDITOR.env.webkit&&p&&a&&(n.$.scrollTop=c._.previousScrollTop)}c.unlockSelection(p);p=0},null,null,-1);n.attachListener(n,"mousedown",function(){p=0});if(CKEDITOR.env.ie||CKEDITOR.env.gecko||B)l?n.attachListener(n,"beforedeactivate",a,null,null,-1):n.attachListener(c,"selectionCheck",a,null,null,-1),n.attachListener(n,CKEDITOR.env.webkit||CKEDITOR.env.gecko? -"focusout":"blur",function(){var a=q&&(q.isFake||2>q.getRanges().length);CKEDITOR.env.gecko&&!B&&a||(c.lockSelection(q),p=1)},null,null,-1),n.attachListener(n,"mousedown",function(){p=0});if(CKEDITOR.env.ie&&!B){var v;n.attachListener(n,"mousedown",function(a){2==a.data.$.button&&((a=c.document.getSelection())&&a.getType()!=CKEDITOR.SELECTION_NONE||(v=c.window.getScrollPosition()))});n.attachListener(n,"mouseup",function(a){2==a.data.$.button&&v&&(c.document.$.documentElement.scrollLeft=v.x,c.document.$.documentElement.scrollTop= -v.y);v=null});if("BackCompat"!=f.$.compatMode){if(CKEDITOR.env.ie7Compat||CKEDITOR.env.ie6Compat){var u,w;m.on("mousedown",function(a){function b(a){a=a.data.$;if(u){var c=t.$.createTextRange();try{c.moveToPoint(a.clientX,a.clientY)}catch(d){}u.setEndPoint(0>w.compareEndPoints("StartToStart",c)?"EndToEnd":"StartToStart",c);u.select()}}function c(){m.removeListener("mousemove",b);h.removeListener("mouseup",c);m.removeListener("mouseup",c);u.select()}a=a.data;if(a.getTarget().is("html")&&a.$.yCKEDITOR.env.version)m.on("mousedown",function(a){a.data.getTarget().is("html")&&(h.on("mouseup",b),m.on("mouseup",b))})}}n.attachListener(n,"selectionchange",e,c);n.attachListener(n,"keyup",k,c);n.attachListener(n,"touchstart",k,c);n.attachListener(n,"touchend",k,c);CKEDITOR.env.ie&&n.attachListener(n, -"keydown",d,c);n.attachListener(n,CKEDITOR.env.webkit||CKEDITOR.env.gecko?"focusin":"focus",function(){c.forceNextSelectionCheck();c.selectionChange(1)});if(B&&(CKEDITOR.env.webkit||CKEDITOR.env.gecko)){var y;n.attachListener(n,"mousedown",function(){y=1});n.attachListener(f.getDocumentElement(),"mouseup",function(){y&&k.call(c);y=0})}else n.attachListener(CKEDITOR.env.ie?n:f.getDocumentElement(),"mouseup",k,c);CKEDITOR.env.webkit&&n.attachListener(f,"keydown",function(a){switch(a.data.getKey()){case 13:case 33:case 34:case 35:case 36:case 37:case 39:case 8:case 45:case 46:n.hasFocus&& -x(n)}},null,null,-1);n.attachListener(n,"keydown",F(c),null,null,-1)});c.on("setData",function(){c.unlockSelection();CKEDITOR.env.webkit&&b()});c.on("contentDomUnload",function(){c.unlockSelection()});if(CKEDITOR.env.ie9Compat)c.on("beforeDestroy",b,null,null,9);c.on("dataReady",function(){delete c._.fakeSelection;delete c._.hiddenSelectionContainer;c.selectionChange(1)});c.on("loadSnapshot",function(){var a=CKEDITOR.dom.walker.nodeType(CKEDITOR.NODE_ELEMENT),b=c.editable().getLast(a);b&&b.hasAttribute("data-cke-hidden-sel")&& -(b.remove(),CKEDITOR.env.gecko&&(a=c.editable().getFirst(a))&&a.is("br")&&a.getAttribute("_moz_editor_bogus_node")&&a.remove())},null,null,100);c.on("key",function(a){if("wysiwyg"==c.mode){var b=c.getSelection();if(b.isFake){var d=E[a.data.keyCode];if(d)return d({editor:c,selected:b.getSelectedElement(),selection:b,keyEvent:a})}}})});if(CKEDITOR.env.webkit)CKEDITOR.on("instanceReady",function(a){var b=a.editor;b.on("selectionChange",function(){var a=b.editable(),c=a.getCustomData("cke-fillingChar"); -c&&(c.getCustomData("ready")?(x(a),a.editor.fire("selectionCheck")):c.setCustomData("ready",1))},null,null,-1);b.on("beforeSetMode",function(){x(b.editable())},null,null,-1);b.on("getSnapshot",function(a){a.data&&(a.data=y(a.data))},b,null,20);b.on("toDataFormat",function(a){a.data.dataValue=y(a.data.dataValue)},null,null,0)});CKEDITOR.editor.prototype.selectionChange=function(a){(a?e:k).call(this)};CKEDITOR.editor.prototype.getSelection=function(a){return!this._.savedSelection&&!this._.fakeSelection|| -a?(a=this.editable())&&"wysiwyg"==this.mode&&"recreating"!==this.status?new CKEDITOR.dom.selection(a):null:this._.savedSelection||this._.fakeSelection};CKEDITOR.editor.prototype.getSelectedRanges=function(a){var b=this.getSelection();return b&&b.getRanges(a)||[]};CKEDITOR.editor.prototype.lockSelection=function(a){a=a||this.getSelection(1);return a.getType()!=CKEDITOR.SELECTION_NONE?(!a.isLocked&&a.lock(),this._.savedSelection=a,!0):!1};CKEDITOR.editor.prototype.unlockSelection=function(a){var b= -this._.savedSelection;return b?(b.unlock(a),delete this._.savedSelection,!0):!1};CKEDITOR.editor.prototype.forceNextSelectionCheck=function(){delete this._.selectionPreviousPath};CKEDITOR.dom.document.prototype.getSelection=function(){return new CKEDITOR.dom.selection(this)};CKEDITOR.dom.range.prototype.select=function(){var a=this.root instanceof CKEDITOR.editable?this.root.editor.getSelection():new CKEDITOR.dom.selection(this.root);a.selectRanges([this]);return a};CKEDITOR.SELECTION_NONE=1;CKEDITOR.SELECTION_TEXT= -2;CKEDITOR.SELECTION_ELEMENT=3;CKEDITOR.dom.selection=function(a){if(a instanceof CKEDITOR.dom.selection){var b=a;a=a.root}var c=a instanceof CKEDITOR.dom.element;this.rev=b?b.rev:L++;this.document=a instanceof CKEDITOR.dom.document?a:a.getDocument();this.root=c?a:this.document.getBody();this.isLocked=0;this._={cache:{}};if(b)return CKEDITOR.tools.extend(this._.cache,b._.cache),this.isFake=b.isFake,this.isLocked=b.isLocked,this;a=this.getNative();var d,e;if(a)if(a.getRangeAt)d=(e=a.rangeCount&&a.getRangeAt(0))&& -new CKEDITOR.dom.node(e.commonAncestorContainer);else{try{e=a.createRange()}catch(g){}d=e&&CKEDITOR.dom.element.get(e.item&&e.item(0)||e.parentElement())}if(!d||d.type!=CKEDITOR.NODE_ELEMENT&&d.type!=CKEDITOR.NODE_TEXT||!this.root.equals(d)&&!this.root.contains(d))this._.cache.type=CKEDITOR.SELECTION_NONE,this._.cache.startElement=null,this._.cache.selectedElement=null,this._.cache.selectedText="",this._.cache.ranges=new CKEDITOR.dom.rangeList;return this};var C={img:1,hr:1,li:1,table:1,tr:1,td:1, -th:1,embed:1,object:1,ol:1,ul:1,a:1,input:1,form:1,select:1,textarea:1,button:1,fieldset:1,thead:1,tfoot:1};CKEDITOR.tools.extend(CKEDITOR.dom.selection,{_removeFillingCharSequenceString:y,_createFillingCharSequenceNode:g,FILLING_CHAR_SEQUENCE:w});CKEDITOR.dom.selection.prototype={getNative:function(){return void 0!==this._.cache.nativeSel?this._.cache.nativeSel:this._.cache.nativeSel=l?this.document.$.selection:this.document.getWindow().$.getSelection()},getType:l?function(){var a=this._.cache;if(a.type)return a.type; -var b=CKEDITOR.SELECTION_NONE;try{var c=this.getNative(),d=c.type;"Text"==d&&(b=CKEDITOR.SELECTION_TEXT);"Control"==d&&(b=CKEDITOR.SELECTION_ELEMENT);c.createRange().parentElement()&&(b=CKEDITOR.SELECTION_TEXT)}catch(e){}return a.type=b}:function(){var a=this._.cache;if(a.type)return a.type;var b=CKEDITOR.SELECTION_TEXT,c=this.getNative();if(!c||!c.rangeCount)b=CKEDITOR.SELECTION_NONE;else if(1==c.rangeCount){var c=c.getRangeAt(0),d=c.startContainer;d==c.endContainer&&1==d.nodeType&&1==c.endOffset- -c.startOffset&&C[d.childNodes[c.startOffset].nodeName.toLowerCase()]&&(b=CKEDITOR.SELECTION_ELEMENT)}return a.type=b},getRanges:function(){var a=l?function(){function a(b){return(new CKEDITOR.dom.node(b)).getIndex()}var b=function(b,c){b=b.duplicate();b.collapse(c);var d=b.parentElement();if(!d.hasChildNodes())return{container:d,offset:0};for(var e=d.children,g,f,h=b.duplicate(),k=0,m=e.length-1,t=-1,l,p;k<=m;)if(t=Math.floor((k+m)/2),g=e[t],h.moveToElementText(g),l=h.compareEndPoints("StartToStart", -b),0l)k=t+1;else return{container:d,offset:a(g)};if(-1==t||t==e.length-1&&0>l){h.moveToElementText(d);h.setEndPoint("StartToStart",b);h=h.text.replace(/(\r\n|\r)/g,"\n").length;e=d.childNodes;if(!h)return g=e[e.length-1],g.nodeType!=CKEDITOR.NODE_TEXT?{container:d,offset:e.length}:{container:g,offset:g.nodeValue.length};for(d=e.length;0c.length?this.selectElement(b):this.selectRanges(c))}},reset:function(){this._.cache={};this.isFake=0;var a=this.root.editor;if(a&&a._.fakeSelection)if(this.rev== -a._.fakeSelection.rev){delete a._.fakeSelection;var b=a._.hiddenSelectionContainer;if(b){var c=a.checkDirty();a.fire("lockSnapshot");b.remove();a.fire("unlockSnapshot");!c&&a.resetDirty()}delete a._.hiddenSelectionContainer}else CKEDITOR.warn("selection-fake-reset");this.rev=L++},selectElement:function(a){var b=new CKEDITOR.dom.range(this.root);b.setStartBefore(a);b.setEndAfter(a);this.selectRanges([b])},selectRanges:function(a){var b=this.root.editor,c=b&&b._.hiddenSelectionContainer;this.reset(); -if(c)for(var c=this.root,e,h=0;h]*>)[ \t\r\n]*/gi,"$1");f=f.replace(/([ \t\n\r]+| )/g," ");f=f.replace(/]*>/gi,"\n");if(CKEDITOR.env.ie){var h=a.getDocument().createElement("div");h.append(e);e.$.outerHTML="\x3cpre\x3e"+f+"\x3c/pre\x3e";e.copyAttributes(h.getFirst());e=h.getFirst().remove()}else e.setHtml(f);b=e}else f?b=y(c?[a.getHtml()]:g(a),b):a.moveChildren(b);b.replace(a);if(d){var c=b,k;(k=c.getPrevious(H))&& -k.type==CKEDITOR.NODE_ELEMENT&&k.is("pre")&&(d=x(k.getHtml(),/\n$/,"")+"\n\n"+x(c.getHtml(),/^\n/,""),CKEDITOR.env.ie?c.$.outerHTML="\x3cpre\x3e"+d+"\x3c/pre\x3e":c.setHtml(d),k.remove())}else c&&l(b)}function g(a){var b=[];x(a.getOuterHtml(),/(\S\s*)\n(?:\s|(]+data-cke-bookmark.*?\/span>))*\n(?!$)/gi,function(a,b,c){return b+"\x3c/pre\x3e"+c+"\x3cpre\x3e"}).replace(/([\s\S]*?)<\/pre>/gi,function(a,c){b.push(c)});return b}function x(a,b,c){var d="",e="";a=a.replace(/(^]+data-cke-bookmark.*?\/span>)|(]+data-cke-bookmark.*?\/span>$)/gi, -function(a,b,c){b&&(d=b);c&&(e=c);return""});return d+a.replace(b,c)+e}function y(a,b){var c;1=b&&a<=c}function f(a){a=a.toString(16);return 1==a.length?"0"+a:a}CKEDITOR.tools.color= -CKEDITOR.tools.createClass({$:function(a,b){this._.initialColorCode=a;this._.defaultValue=b;this._.parseInput(a)},proto:{getHex:function(){if(!this._.isValidColor)return this._.defaultValue;var a=this._.blendAlphaColor(this._.red,this._.green,this._.blue,this._.alpha);return this._.formatHexString(a[0],a[1],a[2])},getHexWithAlpha:function(){if(!this._.isValidColor)return this._.defaultValue;var a=Math.round(this._.alpha*CKEDITOR.tools.color.MAX_RGB_CHANNEL_VALUE);return this._.formatHexString(this._.red, -this._.green,this._.blue,a)},getRgb:function(){if(!this._.isValidColor)return this._.defaultValue;var a=this._.blendAlphaColor(this._.red,this._.green,this._.blue,this._.alpha);return this._.formatRgbString("rgb",a[0],a[1],a[2])},getRgba:function(){return this._.isValidColor?this._.formatRgbString("rgba",this._.red,this._.green,this._.blue,this._.alpha):this._.defaultValue},getHsl:function(){var a=0===this._.alpha||1===this._.alpha;if(!this._.isValidColor)return this._.defaultValue;this._.type=== -CKEDITOR.tools.color.TYPE_HSL&&a?a=[this._.hue,this._.saturation,this._.lightness]:(a=this._.blendAlphaColor(this._.red,this._.green,this._.blue,this._.alpha),a=this._.rgbToHsl(a[0],a[1],a[2]));return this._.formatHslString("hsl",a[0],a[1],a[2])},getHsla:function(){var a;if(!this._.isValidColor)return this._.defaultValue;a=this._.type===CKEDITOR.tools.color.TYPE_HSL?[this._.hue,this._.saturation,this._.lightness]:this._.rgbToHsl(this._.red,this._.green,this._.blue);return this._.formatHslString("hsla", -a[0],a[1],a[2],this._.alpha)},getInitialValue:function(){return this._.initialColorCode}},_:{initialColorCode:"",isValidColor:!0,type:0,hue:0,saturation:0,lightness:0,red:0,green:0,blue:0,alpha:1,blendAlphaColor:function(a,b,c,d){return CKEDITOR.tools.array.map([a,b,c],function(a){return Math.round(CKEDITOR.tools.color.MAX_RGB_CHANNEL_VALUE-d*(CKEDITOR.tools.color.MAX_RGB_CHANNEL_VALUE-a))})},formatHexString:function(a,b,c,d){a="#"+f(a)+f(b)+f(c);void 0!==d&&(a+=f(d));return a.toUpperCase()},formatRgbString:function(a, -b,c,d,f){b=[b,c,d];void 0!==f&&b.push(f);return a+"("+b.join(",")+")"},formatHslString:function(a,b,c,d,f){return a+"("+b+","+c+"%,"+d+"%"+(void 0!==f?","+f:"")+")"},parseInput:function(a){if("string"!==typeof a)this._.isValidColor=!1;else{a=CKEDITOR.tools.trim(a);var b=this._.matchStringToNamedColor(a);b&&(a=b);var b=this._.extractColorChannelsFromHex(a),c=this._.extractColorChannelsFromRgba(a);a=this._.extractColorChannelsFromHsla(a);(a=b||c||a)?(this._.type=a.type,this._.red=a.red,this._.green= -a.green,this._.blue=a.blue,this._.alpha=a.alpha,a.type===CKEDITOR.tools.color.TYPE_HSL&&(this._.hue=a.hue,this._.saturation=a.saturation,this._.lightness=a.lightness)):this._.isValidColor=!1}},matchStringToNamedColor:function(a){return CKEDITOR.tools.color.namedColors[a.toLowerCase()]||null},extractColorChannelsFromHex:function(a){-1===a.indexOf("#")&&(a="#"+a);a.match(CKEDITOR.tools.color.hex3CharsRegExp)&&(a=this._.hex3ToHex6(a));a.match(CKEDITOR.tools.color.hex4CharsRegExp)&&(a=this._.hex4ToHex8(a)); -if(!a.match(CKEDITOR.tools.color.hex6CharsRegExp)&&!a.match(CKEDITOR.tools.color.hex8CharsRegExp))return null;a=a.split("");var b=1;a[7]&&a[8]&&(b=parseInt(a[7]+a[8],16),b/=CKEDITOR.tools.color.MAX_RGB_CHANNEL_VALUE,b=Number(b.toFixed(1)));return{type:CKEDITOR.tools.color.TYPE_RGB,red:parseInt(a[1]+a[2],16),green:parseInt(a[3]+a[4],16),blue:parseInt(a[5]+a[6],16),alpha:b}},extractColorChannelsFromRgba:function(b){var c=this._.extractColorChannelsByPattern(b,CKEDITOR.tools.color.rgbRegExp);if(!c|| -3>c.length||4c.length||4=c?(e=f.createText(""),e.insertAfter(this)):(a=f.createText(""),a.insertAfter(e),a.remove()));return e},substring:function(a,d){return"number"!=typeof d?this.$.nodeValue.substr(a):this.$.nodeValue.substring(a,d)}}); -(function(){function a(a,c,d){var e=a.serializable,k=c[d?"endContainer":"startContainer"],h=d?"endOffset":"startOffset",p=e?c.document.getById(a.startNode):a.startNode;a=e?c.document.getById(a.endNode):a.endNode;k.equals(p.getPrevious())?(c.startOffset=c.startOffset-k.getLength()-a.getPrevious().getLength(),k=a.getNext()):k.equals(a.getPrevious())&&(c.startOffset-=k.getLength(),k=a.getNext());k.equals(p.getParent())&&c[h]++;k.equals(a.getParent())&&c[h]++;c[d?"endContainer":"startContainer"]=k;return c} -CKEDITOR.dom.rangeList=function(a){if(a instanceof CKEDITOR.dom.rangeList)return a;a?a instanceof CKEDITOR.dom.range&&(a=[a]):a=[];return CKEDITOR.tools.extend(a,d)};var d={createIterator:function(){var a=this,c=CKEDITOR.dom.walker.bookmark(),d=[],e;return{getNextRange:function(k){e=void 0===e?0:e+1;var h=a[e];if(h&&1b?-1:1}),e=0,f;eCKEDITOR.env.version? -a[h].$.styleSheet.cssText+=f:a[h].$.innerHTML+=f}}var e={};CKEDITOR.skin={path:a,loadPart:function(c,d){CKEDITOR.skin.name!=CKEDITOR.skinName.split(",")[0]?CKEDITOR.scriptLoader.load(CKEDITOR.getUrl(a()+"skin.js"),function(){b(c,d)}):b(c,d)},getPath:function(a){return CKEDITOR.getUrl(d(a))},icons:{},addIcon:function(a,b,c,d){a=a.toLowerCase();this.icons[a]||(this.icons[a]={path:b,offset:c||0,bgsize:d||"16px"})},getIconStyle:function(a,b,c,d,e){var f;a&&(a=a.toLowerCase(),b&&(f=this.icons[a+"-rtl"]), -f||(f=this.icons[a]));a=c||f&&f.path||"";d=d||f&&f.offset;e=e||f&&f.bgsize||"16px";a&&(a=a.replace(/'/g,"\\'"));return a&&"background-image:url('"+CKEDITOR.getUrl(a)+"');background-position:0 "+d+"px;background-size:"+e+";"}};CKEDITOR.tools.extend(CKEDITOR.editor.prototype,{getUiColor:function(){return this.uiColor},setUiColor:function(a){var b=c(CKEDITOR.document);return(this.setUiColor=function(a){this.uiColor=a;var c=CKEDITOR.skin.chameleon,d="",e="";"function"==typeof c&&(d=c(this,"editor"),e= -c(this,"panel"));a=[[p,a]];f([b],d,a);f(h,e,a)}).call(this,a)}});var k="cke_ui_color",h=[],p=/\$color/g;CKEDITOR.on("instanceLoaded",function(a){if(!CKEDITOR.env.ie||!CKEDITOR.env.quirks){var b=a.editor;a=function(a){a=(a.data[0]||a.data).element.getElementsByTag("iframe").getItem(0).getFrameDocument();if(!a.getById("cke_ui_color")){var d=c(a);h.push(d);b.on("destroy",function(){h=CKEDITOR.tools.array.filter(h,function(a){return d!==a})});(a=b.getUiColor())&&f([d],CKEDITOR.skin.chameleon(b,"panel"), -[[p,a]])}};b.on("panelShow",a);b.on("menuShow",a);b.config.uiColor&&b.setUiColor(b.config.uiColor)}})})(); -(function(){var a=CKEDITOR.dom.element.createFromHtml('\x3cdiv style\x3d"width:0;height:0;position:absolute;left:-10000px;border:1px solid;border-color:red blue"\x3e\x3c/div\x3e',CKEDITOR.document);a.appendTo(CKEDITOR.document.getHead());try{var d=a.getComputedStyle("border-top-color"),b=a.getComputedStyle("border-right-color");CKEDITOR.env.hc=!(!d||d!=b)}catch(c){CKEDITOR.env.hc=!1}a.remove();CKEDITOR.env.hc&&(CKEDITOR.env.cssClass+=" cke_hc");CKEDITOR.document.appendStyleText(".cke{visibility:hidden;}"); -CKEDITOR.status="loaded";CKEDITOR.fireOnce("loaded");if(a=CKEDITOR._.pending)for(delete CKEDITOR._.pending,d=0;de;e++){var f=e,c;c=parseInt(a[e],16);c=("0"+(0>d?0|c*(1+d):0|c+(255-c)*d).toString(16)).slice(-2);a[f]=c}return"#"+a.join("")}}(),f={editor:new CKEDITOR.template("{id}.cke_chrome [border-color:{defaultBorder};] {id} .cke_top [ background-color:{defaultBackground};border-bottom-color:{defaultBorder};] {id} .cke_bottom [background-color:{defaultBackground};border-top-color:{defaultBorder};] {id} .cke_resizer [border-right-color:{ckeResizer}] {id} .cke_dialog_title [background-color:{defaultBackground};border-bottom-color:{defaultBorder};] {id} .cke_dialog_footer [background-color:{defaultBackground};outline-color:{defaultBorder};] {id} .cke_dialog_tab [background-color:{dialogTab};border-color:{defaultBorder};] {id} .cke_dialog_tab:hover [background-color:{lightBackground};] {id} .cke_dialog_contents [border-top-color:{defaultBorder};] {id} .cke_dialog_tab_selected, {id} .cke_dialog_tab_selected:hover [background:{dialogTabSelected};border-bottom-color:{dialogTabSelectedBorder};] {id} .cke_dialog_body [background:{dialogBody};border-color:{defaultBorder};] {id} a.cke_button_off:hover,{id} a.cke_button_off:focus,{id} a.cke_button_off:active [background-color:{darkBackground};border-color:{toolbarElementsBorder};] {id} .cke_button_on [background-color:{ckeButtonOn};border-color:{toolbarElementsBorder};] {id} .cke_toolbar_separator,{id} .cke_toolgroup a.cke_button:last-child:after,{id} .cke_toolgroup a.cke_button.cke_button_disabled:hover:last-child:after [background-color: {toolbarElementsBorder};border-color: {toolbarElementsBorder};] {id} a.cke_combo_button:hover,{id} a.cke_combo_button:focus,{id} .cke_combo_on a.cke_combo_button [border-color:{toolbarElementsBorder};background-color:{darkBackground};] {id} .cke_combo:after [border-color:{toolbarElementsBorder};] {id} .cke_path_item [color:{elementsPathColor};] {id} a.cke_path_item:hover,{id} a.cke_path_item:focus,{id} a.cke_path_item:active [background-color:{darkBackground};] {id}.cke_panel [border-color:{defaultBorder};] "),panel:new CKEDITOR.template(".cke_panel_grouptitle [background-color:{lightBackground};border-color:{defaultBorder};] .cke_menubutton_icon [background-color:{menubuttonIcon};] .cke_menubutton:hover,.cke_menubutton:focus,.cke_menubutton:active [background-color:{menubuttonHover};] .cke_menubutton:hover .cke_menubutton_icon, .cke_menubutton:focus .cke_menubutton_icon, .cke_menubutton:active .cke_menubutton_icon [background-color:{menubuttonIconHover};] .cke_menubutton_disabled:hover .cke_menubutton_icon,.cke_menubutton_disabled:focus .cke_menubutton_icon,.cke_menubutton_disabled:active .cke_menubutton_icon [background-color:{menubuttonIcon};] .cke_menuseparator [background-color:{menubuttonIcon};] a:hover.cke_colorbox, a:active.cke_colorbox [border-color:{defaultBorder};] a:hover.cke_colorauto, a:hover.cke_colormore, a:active.cke_colorauto, a:active.cke_colormore [background-color:{ckeColorauto};border-color:{defaultBorder};] ")}; -return function(g,d){var a=b(g.uiColor,.4),a={id:"."+g.id,defaultBorder:b(a,-.2),toolbarElementsBorder:b(a,-.25),defaultBackground:a,lightBackground:b(a,.8),darkBackground:b(a,-.15),ckeButtonOn:b(a,.4),ckeResizer:b(a,-.4),ckeColorauto:b(a,.8),dialogBody:b(a,.7),dialogTab:b(a,.65),dialogTabSelected:"#FFF",dialogTabSelectedBorder:"#FFF",elementsPathColor:b(a,-.6),menubuttonHover:b(a,.1),menubuttonIcon:b(a,.5),menubuttonIconHover:b(a,.3)};return f[d].output(a).replace(/\[/g,"{").replace(/\]/g,"}")}}();CKEDITOR.plugins.add("dialogui",{onLoad:function(){var k=function(b){this._||(this._={});this._["default"]=this._.initValue=b["default"]||"";this._.required=b.required||!1;for(var a=[this._],d=1;darguments.length)){var c=k.call(this,a);c.labelId=CKEDITOR.tools.getNextId()+ -"_label";this._.children=[];var f={role:a.role||"presentation"};a.includeLabel&&(f["aria-labelledby"]=c.labelId);CKEDITOR.ui.dialog.uiElement.call(this,b,a,d,"div",null,f,function(){var d=[],g=a.required?" cke_required":"";"horizontal"!=a.labelLayout?d.push('\x3clabel class\x3d"cke_dialog_ui_labeled_label'+g+'" ',' id\x3d"'+c.labelId+'"',c.inputId?' for\x3d"'+c.inputId+'"':"",(a.labelStyle?' style\x3d"'+a.labelStyle+'"':"")+"\x3e",a.required?a.label+'\x3cspan class\x3d"cke_dialog_ui_labeled_required" aria-hidden\x3d"true"\x3e*\x3c/span\x3e': -a.label,"\x3c/label\x3e",'\x3cdiv class\x3d"cke_dialog_ui_labeled_content"',a.controlStyle?' style\x3d"'+a.controlStyle+'"':"",' role\x3d"presentation"\x3e',e.call(this,b,a),"\x3c/div\x3e"):(g={type:"hbox",widths:a.widths,padding:0,children:[{type:"html",html:'\x3clabel class\x3d"cke_dialog_ui_labeled_label'+g+'" id\x3d"'+c.labelId+'" for\x3d"'+c.inputId+'"'+(a.labelStyle?' style\x3d"'+a.labelStyle+'"':"")+"\x3e"+CKEDITOR.tools.htmlEncode(a.label)+"\x3c/label\x3e"},{type:"html",html:'\x3cspan class\x3d"cke_dialog_ui_labeled_content"'+ -(a.controlStyle?' style\x3d"'+a.controlStyle+'"':"")+"\x3e"+e.call(this,b,a)+"\x3c/span\x3e"}]},CKEDITOR.dialog._.uiElementBuilders.hbox.build(b,g,d));return d.join("")})}},textInput:function(b,a,d){if(!(3>arguments.length)){k.call(this,a);var e=this._.inputId=CKEDITOR.tools.getNextId()+"_textInput",c={"class":"cke_dialog_ui_input_"+a.type,id:e,type:a.type};a.validate&&(this.validate=a.validate);a.maxLength&&(c.maxlength=a.maxLength);a.size&&(c.size=a.size);a.inputStyle&&(c.style=a.inputStyle);var f= -this,h=!1;b.on("load",function(){f.getInputElement().on("keydown",function(a){13==a.data.getKeystroke()&&(h=!0)});f.getInputElement().on("keyup",function(a){13==a.data.getKeystroke()&&h&&(b.getButton("ok")&&setTimeout(function(){b.getButton("ok").click()},0),h=!1);f.bidi&&w.call(f,a)},null,null,1E3)});CKEDITOR.ui.dialog.labeledElement.call(this,b,a,d,function(){var b=['\x3cdiv class\x3d"cke_dialog_ui_input_',a.type,'" role\x3d"presentation"'];a.width&&b.push('style\x3d"width:'+a.width+'" ');b.push("\x3e\x3cinput "); -c["aria-labelledby"]=this._.labelId;this._.required&&(c["aria-required"]=this._.required);for(var e in c)b.push(e+'\x3d"'+c[e]+'" ');b.push(" /\x3e\x3c/div\x3e");return b.join("")})}},textarea:function(b,a,d){if(!(3>arguments.length)){k.call(this,a);var e=this,c=this._.inputId=CKEDITOR.tools.getNextId()+"_textarea",f={};a.validate&&(this.validate=a.validate);f.rows=a.rows||5;f.cols=a.cols||20;f["class"]="cke_dialog_ui_input_textarea "+(a["class"]||"");"undefined"!=typeof a.inputStyle&&(f.style=a.inputStyle); -a.dir&&(f.dir=a.dir);if(e.bidi)b.on("load",function(){e.getInputElement().on("keyup",w)},e);CKEDITOR.ui.dialog.labeledElement.call(this,b,a,d,function(){f["aria-labelledby"]=this._.labelId;this._.required&&(f["aria-required"]=this._.required);var a=['\x3cdiv class\x3d"cke_dialog_ui_input_textarea" role\x3d"presentation"\x3e\x3ctextarea id\x3d"',c,'" '],b;for(b in f)a.push(b+'\x3d"'+CKEDITOR.tools.htmlEncode(f[b])+'" ');a.push("\x3e",CKEDITOR.tools.htmlEncode(e._["default"]),"\x3c/textarea\x3e\x3c/div\x3e"); -return a.join("")})}},checkbox:function(b,a,d){if(!(3>arguments.length)){var e=k.call(this,a,{"default":!!a["default"]});a.validate&&(this.validate=a.validate);CKEDITOR.ui.dialog.uiElement.call(this,b,a,d,"span",null,null,function(){var c=CKEDITOR.tools.extend({},a,{id:a.id?a.id+"_checkbox":CKEDITOR.tools.getNextId()+"_checkbox"},!0),d=[],h=CKEDITOR.tools.getNextId()+"_label",g={"class":"cke_dialog_ui_checkbox_input",type:"checkbox","aria-labelledby":h};t(c);a["default"]&&(g.checked="checked");"undefined"!= -typeof c.inputStyle&&(c.style=c.inputStyle);e.checkbox=new CKEDITOR.ui.dialog.uiElement(b,c,d,"input",null,g);d.push(' \x3clabel id\x3d"',h,'" for\x3d"',g.id,'"'+(a.labelStyle?' style\x3d"'+a.labelStyle+'"':"")+"\x3e",CKEDITOR.tools.htmlEncode(a.label),"\x3c/label\x3e");return d.join("")})}},radio:function(b,a,d){if(!(3>arguments.length)){k.call(this,a);this._["default"]||(this._["default"]=this._.initValue=a.items[0][1]);a.validate&&(this.validate=a.validate);var e=[],c=this;a.role="radiogroup"; -a.includeLabel=!0;CKEDITOR.ui.dialog.labeledElement.call(this,b,a,d,function(){for(var d=[],h=[],g=(a.id?a.id:CKEDITOR.tools.getNextId())+"_radio",n=0;narguments.length)){var e=k.call(this,a);a.validate&&(this.validate=a.validate);e.inputId=CKEDITOR.tools.getNextId()+"_select";CKEDITOR.ui.dialog.labeledElement.call(this,b,a,d,function(){var c=CKEDITOR.tools.extend({},a,{id:a.id?a.id+"_select":CKEDITOR.tools.getNextId()+"_select"},!0),d=[],h=[],g={id:e.inputId, -"class":"cke_dialog_ui_input_select","aria-labelledby":this._.labelId};d.push('\x3cdiv class\x3d"cke_dialog_ui_input_',a.type,'" role\x3d"presentation"');a.width&&d.push('style\x3d"width:'+a.width+'" ');d.push("\x3e");void 0!==a.size&&(g.size=a.size);void 0!==a.multiple&&(g.multiple=a.multiple);t(c);for(var n=0,l;narguments.length)){void 0===a["default"]&&(a["default"]="");var e=CKEDITOR.tools.extend(k.call(this,a),{definition:a,buttons:[]});a.validate&&(this.validate=a.validate);b.on("load",function(){CKEDITOR.document.getById(e.frameId).getParent().addClass("cke_dialog_ui_input_file")});CKEDITOR.ui.dialog.labeledElement.call(this, -b,a,d,function(){e.frameId=CKEDITOR.tools.getNextId()+"_fileInput";var b=['\x3ciframe frameborder\x3d"0" allowtransparency\x3d"0" class\x3d"cke_dialog_ui_input_file" role\x3d"presentation" id\x3d"',e.frameId,'" title\x3d"',a.label,'" src\x3d"javascript:void('];b.push(CKEDITOR.env.ie?"(function(){"+encodeURIComponent("document.open();("+CKEDITOR.tools.fixDomain+")();document.close();")+"})()":"0");b.push(')"\x3e\x3c/iframe\x3e');return b.join("")})}},fileButton:function(b,a,d){var e=this;if(!(3>arguments.length)){k.call(this, -a);a.validate&&(this.validate=a.validate);var c=CKEDITOR.tools.extend({},a),f=c.onClick;c.className=(c.className?c.className+" ":"")+"cke_dialog_ui_button";c.onClick=function(c){var d=a["for"];c=f?f.call(this,c):!1;!1!==c&&("xhr"!==c&&b.getContentElement(d[0],d[1]).submit(),this.disable())};b.on("load",function(){b.getContentElement(a["for"][0],a["for"][1])._.buttons.push(e)});CKEDITOR.ui.dialog.button.call(this,b,c,d)}},html:function(){var b=/^\s*<[\w:]+\s+([^>]*)?>/,a=/^(\s*<[\w:]+(?:\s+[^>]*)?)((?:.|\r|\n)+)$/, -d=/\/$/;return function(e,c,f){if(!(3>arguments.length)){var h=[],g=c.html;"\x3c"!=g.charAt(0)&&(g="\x3cspan\x3e"+g+"\x3c/span\x3e");var n=c.focus;if(n){var l=this.focus;this.focus=function(){("function"==typeof n?n:l).call(this);this.fire("focus")};c.isFocusable&&(this.isFocusable=this.isFocusable);this.keyboardFocusable=!0}CKEDITOR.ui.dialog.uiElement.call(this,e,c,h,"span",null,null,"");h=h.join("").match(b);g=g.match(a)||["","",""];d.test(g[1])&&(g[1]=g[1].slice(0,-1),g[2]="/"+g[2]);f.push([g[1], -" ",h[1]||"",g[2]].join(""))}}}(),fieldset:function(b,a,d,e,c){var f=c.label;this._={children:a};CKEDITOR.ui.dialog.uiElement.call(this,b,c,e,"fieldset",null,null,function(){var a=[];f&&a.push("\x3clegend"+(c.labelStyle?' style\x3d"'+c.labelStyle+'"':"")+"\x3e"+f+"\x3c/legend\x3e");for(var b=0;ba.getChildCount()?(new CKEDITOR.dom.text(b,CKEDITOR.document)).appendTo(a):a.getChild(0).$.nodeValue=b;return this},getLabel:function(){var b=CKEDITOR.document.getById(this._.labelId);return!b||1>b.getChildCount()?"":b.getChild(0).getText()},eventProcessors:v},!0);CKEDITOR.ui.dialog.button.prototype=CKEDITOR.tools.extend(new CKEDITOR.ui.dialog.uiElement,{click:function(){return this._.disabled?!1:this.fire("click",{dialog:this._.dialog})}, -enable:function(){this._.disabled=!1;var b=this.getElement();b&&b.removeClass("cke_disabled")},disable:function(){this._.disabled=!0;this.getElement().addClass("cke_disabled")},isVisible:function(){return this.getElement().getFirst().isVisible()},isEnabled:function(){return!this._.disabled},eventProcessors:CKEDITOR.tools.extend({},CKEDITOR.ui.dialog.uiElement.prototype.eventProcessors,{onClick:function(b,a){this.on("click",function(){a.apply(this,arguments)})}},!0),accessKeyUp:function(){this.click()}, -accessKeyDown:function(){this.focus()},keyboardFocusable:!0},!0);CKEDITOR.ui.dialog.textInput.prototype=CKEDITOR.tools.extend(new CKEDITOR.ui.dialog.labeledElement,{getInputElement:function(){return CKEDITOR.document.getById(this._.inputId)},focus:function(){var b=this.selectParentTab();setTimeout(function(){var a=b.getInputElement();a&&a.$.focus()},0)},select:function(){var b=this.selectParentTab();setTimeout(function(){var a=b.getInputElement();a&&(a.$.focus(),a.$.select())},0)},accessKeyUp:function(){this.select()}, -setValue:function(b){if(this.bidi){var a=b&&b.charAt(0);(a="‪"==a?"ltr":"‫"==a?"rtl":null)&&(b=b.slice(1));this.setDirectionMarker(a)}b||(b="");return CKEDITOR.ui.dialog.uiElement.prototype.setValue.apply(this,arguments)},getValue:function(){var b=CKEDITOR.ui.dialog.uiElement.prototype.getValue.call(this);if(this.bidi&&b){var a=this.getDirectionMarker();a&&(b=("ltr"==a?"‪":"‫")+b)}return b},setDirectionMarker:function(b){var a=this.getInputElement();b?a.setAttributes({dir:b,"data-cke-dir-marker":b}): -this.getDirectionMarker()&&a.removeAttributes(["dir","data-cke-dir-marker"])},getDirectionMarker:function(){return this.getInputElement().data("cke-dir-marker")},keyboardFocusable:!0},q,!0);CKEDITOR.ui.dialog.textarea.prototype=new CKEDITOR.ui.dialog.textInput;CKEDITOR.ui.dialog.select.prototype=CKEDITOR.tools.extend(new CKEDITOR.ui.dialog.labeledElement,{getInputElement:function(){return this._.select.getElement()},add:function(b,a,d){var e=new CKEDITOR.dom.element("option",this.getDialog().getParentEditor().document), -c=this.getInputElement().$;e.$.text=b;e.$.value=void 0===a||null===a?b:a;void 0===d||null===d?CKEDITOR.env.ie?c.add(e.$):c.add(e.$,null):c.add(e.$,d);return this},remove:function(b){this.getInputElement().$.remove(b);return this},clear:function(){for(var b=this.getInputElement().$;0this.focusIndex&&!c&&(a=b[b.length-1]);d.currentFocusIndex=this.focusIndex;for(d=0;db-a;c--)if(this._.tabs[this._.tabIdList[c%a]][0].$.offsetHeight)return this._.tabIdList[c%a];return null}function W(){for(var a=this._.tabIdList.length,b=CKEDITOR.tools.indexOf(this._.tabIdList,this._.currentTabId),c=b+1;ch.width-c.width-g?h.width-c.width+("rtl"==f.lang.dir?0:k[1]):d.x;c=d.y+k[0]h.height-c.height-g?h.height-c.height+k[2]:d.y;q=Math.floor(q);c=Math.floor(c);a.move(q,c,1);b.data.preventDefault()}function c(){CKEDITOR.document.removeListener("mousemove",b);CKEDITOR.document.removeListener("mouseup",c);if(CKEDITOR.env.ie6Compat){var a=u.getChild(0).getFrameDocument();a.removeListener("mousemove",b);a.removeListener("mouseup", -c)}}var e=null,d=null,f=a.getParentEditor(),g=f.config.dialog_magnetDistance,k=CKEDITOR.skin.margins||[0,0,0,0];"undefined"==typeof g&&(g=20);a.parts.title.on("mousedown",function(f){if(!a._.moved){var g=a._.element;g.getFirst().setStyle("position","absolute");g.removeStyle("display");a._.moved=!0;a.layout()}e={x:f.data.$.screenX,y:f.data.$.screenY};CKEDITOR.document.on("mousemove",b);CKEDITOR.document.on("mouseup",c);d=a.getPosition();CKEDITOR.env.ie6Compat&&(g=u.getChild(0).getFrameDocument(),g.on("mousemove", -b),g.on("mouseup",c));f.data.preventDefault()},a)}function da(a){function b(b){var c="rtl"==f.lang.dir,m=h.width,q=h.height,w=m+(b.data.$.screenX-l.x)*(c?-1:1)*(a._.moved?1:2),A=q+(b.data.$.screenY-l.y)*(a._.moved?1:2),C=a._.element.getFirst(),C=c&&parseInt(C.getComputedStyle("right"),10),v=a.getPosition();v.x=v.x||0;v.y=v.y||0;v.y+A>p.height&&(A=p.height-v.y);(c?C:v.x)+w>p.width&&(w=p.width-(c?C:v.x));A=Math.floor(A);w=Math.floor(w);if(d==CKEDITOR.DIALOG_RESIZE_WIDTH||d==CKEDITOR.DIALOG_RESIZE_BOTH)m= -Math.max(e.minWidth||0,w-g);if(d==CKEDITOR.DIALOG_RESIZE_HEIGHT||d==CKEDITOR.DIALOG_RESIZE_BOTH)q=Math.max(e.minHeight||0,A-k);a.resize(m,q);a._.moved&&O(a,a._.position.x,a._.position.y);a._.moved||a.layout();b.data.preventDefault()}function c(){CKEDITOR.document.removeListener("mouseup",c);CKEDITOR.document.removeListener("mousemove",b);q&&(q.remove(),q=null);if(CKEDITOR.env.ie6Compat){var a=u.getChild(0).getFrameDocument();a.removeListener("mouseup",c);a.removeListener("mousemove",b)}}var e=a.definition, -d=e.resizable;if(d!=CKEDITOR.DIALOG_RESIZE_NONE){var f=a.getParentEditor(),g,k,p,l,h,q,m=CKEDITOR.tools.addFunction(function(d){function e(a){return a.isVisible()}h=a.getSize();var f=a.parts.contents,m=f.$.getElementsByTagName("iframe").length,w=!(CKEDITOR.env.gecko||CKEDITOR.env.ie&&CKEDITOR.env.quirks);m&&(q=CKEDITOR.dom.element.createFromHtml('\x3cdiv class\x3d"cke_dialog_resize_cover" style\x3d"height: 100%; position: absolute; width: 100%; left:0; top:0;"\x3e\x3c/div\x3e'),f.append(q));k=h.height- -a.parts.contents.getFirst(e).getSize("height",w);g=h.width-a.parts.contents.getFirst(e).getSize("width",1);l={x:d.screenX,y:d.screenY};p=CKEDITOR.document.getWindow().getViewPaneSize();CKEDITOR.document.on("mousemove",b);CKEDITOR.document.on("mouseup",c);CKEDITOR.env.ie6Compat&&(f=u.getChild(0).getFrameDocument(),f.on("mousemove",b),f.on("mouseup",c));d.preventDefault&&d.preventDefault()});a.on("load",function(){var b="";d==CKEDITOR.DIALOG_RESIZE_WIDTH?b=" cke_resizer_horizontal":d==CKEDITOR.DIALOG_RESIZE_HEIGHT&& -(b=" cke_resizer_vertical");b=CKEDITOR.dom.element.createFromHtml('\x3cdiv class\x3d"cke_resizer'+b+" cke_resizer_"+f.lang.dir+'" title\x3d"'+CKEDITOR.tools.htmlEncode(f.lang.common.resize)+'" onmousedown\x3d"CKEDITOR.tools.callFunction('+m+', event )"\x3e'+("ltr"==f.lang.dir?"â—¢":"â—£")+"\x3c/div\x3e");a.parts.footer.append(b,1)});f.on("destroy",function(){CKEDITOR.tools.removeFunction(m)})}}function O(a,b,c){var e=a.parts.dialog.getParent().getClientSize(),d=a.getSize(),f=a._.viewportRatio,g=Math.max(e.width- -d.width,0),e=Math.max(e.height-d.height,0);f.width=g?b/g:f.width;f.height=e?c/e:f.height;a._.viewportRatio=f}function H(a){a.data.preventDefault(1)}function P(a){var b=a.config,c=CKEDITOR.skinName||a.config.skin,e=b.dialog_backgroundCoverColor||("moono-lisa"==c?"black":"white"),c=b.dialog_backgroundCoverOpacity,d=b.baseFloatZIndex,b=CKEDITOR.tools.genKey(e,c,d),f=B[b];CKEDITOR.document.getBody().addClass("cke_dialog_open");f?f.show():(d=['\x3cdiv tabIndex\x3d"-1" style\x3d"position: ',CKEDITOR.env.ie6Compat? -"absolute":"fixed","; z-index: ",d,"; top: 0px; left: 0px; ","; width: 100%; height: 100%;",CKEDITOR.env.ie6Compat?"":"background-color: "+e,'" class\x3d"cke_dialog_background_cover"\x3e'],CKEDITOR.env.ie6Compat&&(e="\x3chtml\x3e\x3cbody style\x3d\\'background-color:"+e+";\\'\x3e\x3c/body\x3e\x3c/html\x3e",d.push('\x3ciframe hidefocus\x3d"true" frameborder\x3d"0" id\x3d"cke_dialog_background_iframe" src\x3d"javascript:'),d.push("void((function(){"+encodeURIComponent("document.open();("+CKEDITOR.tools.fixDomain+ -")();document.write( '"+e+"' );document.close();")+"})())"),d.push('" style\x3d"position:absolute;left:0;top:0;width:100%;height: 100%;filter: progid:DXImageTransform.Microsoft.Alpha(opacity\x3d0)"\x3e\x3c/iframe\x3e')),d.push("\x3c/div\x3e"),f=CKEDITOR.dom.element.createFromHtml(d.join("")),f.setOpacity(void 0!==c?c:.5),f.on("keydown",H),f.on("keypress",H),f.on("keyup",H),f.appendTo(CKEDITOR.document.getBody()),B[b]=f);a.focusManager.add(f);u=f;CKEDITOR.env.mac&&CKEDITOR.env.webkit||f.focus()}function Q(a){CKEDITOR.document.getBody().removeClass("cke_dialog_open"); -u&&(a.focusManager.remove(u),u.hide())}function R(a){var b=a.data.$.ctrlKey||a.data.$.metaKey,c=a.data.$.altKey,e=a.data.$.shiftKey,d=String.fromCharCode(a.data.$.keyCode);(b=x[(b?"CTRL+":"")+(c?"ALT+":"")+(e?"SHIFT+":"")+d])&&b.length&&(b=b[b.length-1],b.keydown&&b.keydown.call(b.uiElement,b.dialog,b.key),a.data.preventDefault())}function S(a){var b=a.data.$.ctrlKey||a.data.$.metaKey,c=a.data.$.altKey,e=a.data.$.shiftKey,d=String.fromCharCode(a.data.$.keyCode);(b=x[(b?"CTRL+":"")+(c?"ALT+":"")+(e? -"SHIFT+":"")+d])&&b.length&&(b=b[b.length-1],b.keyup&&(b.keyup.call(b.uiElement,b.dialog,b.key),a.data.preventDefault()))}function T(a,b,c,e,d){(x[c]||(x[c]=[])).push({uiElement:a,dialog:b,key:c,keyup:d||a.accessKeyUp,keydown:e||a.accessKeyDown})}function ea(a){for(var b in x){for(var c=x[b],e=c.length-1;0<=e;e--)c[e].dialog!=a&&c[e].uiElement!=a||c.splice(e,1);0===c.length&&delete x[b]}}function fa(a,b){a._.accessKeyMap[b]&&a.selectPage(a._.accessKeyMap[b])}function ga(){}var y=CKEDITOR.tools.cssLength, -U,u,V=!1,D=!CKEDITOR.env.ie||CKEDITOR.env.edge,aa='\x3cdiv class\x3d"cke_reset_all cke_dialog_container {editorId} {editorDialogClass} {hidpi}" dir\x3d"{langDir}" style\x3d"'+(D?"display:flex":"")+'" lang\x3d"{langCode}" role\x3d"dialog" aria-labelledby\x3d"cke_dialog_title_{id}"\x3e\x3ctable class\x3d"cke_dialog '+CKEDITOR.env.cssClass+' cke_{langDir}" style\x3d"'+(D?"margin:auto":"position:absolute")+'" role\x3d"presentation"\x3e\x3ctr\x3e\x3ctd role\x3d"presentation"\x3e\x3cdiv class\x3d"cke_dialog_body" role\x3d"presentation"\x3e\x3cdiv id\x3d"cke_dialog_title_{id}" class\x3d"cke_dialog_title" role\x3d"presentation"\x3e\x3c/div\x3e\x3ca id\x3d"cke_dialog_close_button_{id}" class\x3d"cke_dialog_close_button" href\x3d"javascript:void(0)" title\x3d"{closeTitle}" role\x3d"button"\x3e\x3cspan class\x3d"cke_label"\x3eX\x3c/span\x3e\x3c/a\x3e\x3cdiv id\x3d"cke_dialog_tabs_{id}" class\x3d"cke_dialog_tabs" role\x3d"tablist"\x3e\x3c/div\x3e\x3ctable class\x3d"cke_dialog_contents" role\x3d"presentation"\x3e\x3ctr\x3e\x3ctd id\x3d"cke_dialog_contents_{id}" class\x3d"cke_dialog_contents_body" role\x3d"presentation"\x3e\x3c/td\x3e\x3c/tr\x3e\x3ctr\x3e\x3ctd id\x3d"cke_dialog_footer_{id}" class\x3d"cke_dialog_footer" role\x3d"presentation"\x3e\x3c/td\x3e\x3c/tr\x3e\x3c/table\x3e\x3c/div\x3e\x3c/td\x3e\x3c/tr\x3e\x3c/table\x3e\x3c/div\x3e'; -CKEDITOR.dialog=function(a,b){function c(){var a=n._.focusList;a.sort(function(a,b){return a.tabIndex!=b.tabIndex?b.tabIndex-a.tabIndex:a.focusIndex-b.focusIndex});for(var b=a.length,c=0;cb.length)){var c=n._.currentFocusIndex;n._.tabBarMode&&0>a&&(c=0);try{b[c].getInputElement().$.blur()}catch(d){}var e=c,f=1arguments.length)){var k=(e.call?e(b):e)||"div",p=["\x3c",k," "],l=(d&&d.call?d(b):d)||{},h=(f&&f.call?f(b):f)||{},q=(g&&g.call?g.call(this,a,b):g)||"",m=this.domId=h.id||CKEDITOR.tools.getNextId()+"_uiElement";b.requiredContent&&!a.getParentEditor().filter.check(b.requiredContent)&&(l.display="none",this.notAllowed= -!0);h.id=m;var r={};b.type&&(r["cke_dialog_ui_"+b.type]=1);b.className&&(r[b.className]=1);b.disabled&&(r.cke_disabled=1);for(var n=h["class"]&&h["class"].split?h["class"].split(" "):[],m=0;mCKEDITOR.env.version?"cke_dialog_ui_focused":"";b.on("focus", -function(){a._.tabBarMode=!1;a._.hasFocus=!0;t.fire("focus");c&&this.addClass(c)});b.on("blur",function(){t.fire("blur");c&&this.removeClass(c)})}});CKEDITOR.tools.extend(this,b);this.keyboardFocusable&&(this.tabIndex=b.tabIndex||0,this.focusIndex=a._.focusList.push(this)-1,this.on("focus",function(){a._.currentFocusIndex=t.focusIndex}))}},hbox:function(a,b,c,e,d){if(!(4>arguments.length)){this._||(this._={});var f=this._.children=b,g=d&&d.widths||null,k=d&&d.height||null,p,l={role:"presentation"}; -d&&d.align&&(l.align=d.align);CKEDITOR.ui.dialog.uiElement.call(this,a,d||{type:"hbox"},e,"table",{},l,function(){var a=['\x3ctbody\x3e\x3ctr class\x3d"cke_dialog_ui_hbox"\x3e'];for(p=0;parguments.length)){this._||(this._={});var f=this._.children=b,g=d&&d.width||null,k=d&&d.heights||null;CKEDITOR.ui.dialog.uiElement.call(this,a,d||{type:"vbox"},e,"div",null,{role:"presentation"},function(){var b= -['\x3ctable role\x3d"presentation" cellspacing\x3d"0" border\x3d"0" '];b.push('style\x3d"');d&&d.expand&&b.push("height:100%;");b.push("width:"+y(g||"100%"),";");CKEDITOR.env.webkit&&b.push("float:none;");b.push('"');b.push('align\x3d"',CKEDITOR.tools.htmlEncode(d&&d.align||("ltr"==a.getParentEditor().lang.dir?"left":"right")),'" ');b.push("\x3e\x3ctbody\x3e");for(var e=0;earguments.length)return this._.children.concat();a.splice||(a=[a]);return 2>a.length?this._.children[a[0]]:this._.children[a[0]]&&this._.children[a[0]].getChild?this._.children[a[0]].getChild(a.slice(1,a.length)):null}},!0);CKEDITOR.ui.dialog.vbox.prototype=new CKEDITOR.ui.dialog.hbox;(function(){var a={build:function(a, -c,e){for(var d=c.children,f,g=[],k=[],p=0;pe.length&&(a=g.document.createElement(g.config.enterMode==CKEDITOR.ENTER_P?"p":"div"),b=h.shift(),c.insertNode(a),a.append(new CKEDITOR.dom.text("",g.document)),c.moveToBookmark(b),c.selectNodeContents(a),c.collapse(!0),b=c.createBookmark(),e.push(a),h.unshift(b));d=e[0].getParent();c=[];for(b=0;ba||(this.notifications.splice(a,1),b.element.remove(),this.element.getChildCount()||(this._removeListeners(),this.element.remove()))},_createElement:function(){var b=this.editor,a=b.config,c=new CKEDITOR.dom.element("div");c.addClass("cke_notifications_area");c.setAttribute("id","cke_notifications_area_"+b.name);c.setStyle("z-index",a.baseFloatZIndex-2);return c},_attachListeners:function(){var b=CKEDITOR.document.getWindow(),a=this.editor;b.on("scroll",this._uiBuffer.input);b.on("resize",this._uiBuffer.input); -a.on("change",this._changeBuffer.input);a.on("floatingSpaceLayout",this._layout,this,null,20);a.on("blur",this._layout,this,null,20)},_removeListeners:function(){var b=CKEDITOR.document.getWindow(),a=this.editor;b.removeListener("scroll",this._uiBuffer.input);b.removeListener("resize",this._uiBuffer.input);a.removeListener("change",this._changeBuffer.input);a.removeListener("floatingSpaceLayout",this._layout);a.removeListener("blur",this._layout)},_layout:function(){function b(){a.setStyle("left", -k(n+d.width-g-h))}var a=this.element,c=this.editor,d=c.ui.contentsElement.getClientRect(),e=c.ui.contentsElement.getDocumentPosition(),f,l,u=a.getClientRect(),m,g=this._notificationWidth,h=this._notificationMargin;m=CKEDITOR.document.getWindow();var p=m.getScrollPosition(),t=m.getViewPaneSize(),q=CKEDITOR.document.getBody(),r=q.getDocumentPosition(),k=CKEDITOR.tools.cssLength;g&&h||(m=this.element.getChild(0),g=this._notificationWidth=m.getClientRect().width,h=this._notificationMargin=parseInt(m.getComputedStyle("margin-left"), -10)+parseInt(m.getComputedStyle("margin-right"),10));c.toolbar&&(f=c.ui.space(c.config.toolbarLocation),l=f.getClientRect());f&&f.isVisible()&&l.bottom>d.top&&l.bottomp.y?a.setStyles({position:"fixed",top:0}):a.setStyles({position:"absolute",top:k(e.y+d.height-u.height)});var n="fixed"==a.getStyle("position")?d.left:"static"!=q.getComputedStyle("position")? -e.x-r.x:e.x;d.widthp.x+t.width?b():a.setStyle("left",k(n)):e.x+g+h>p.x+t.width?a.setStyle("left",k(n)):e.x+d.width/2+g/2+h>p.x+t.width?a.setStyle("left",k(n-e.x+p.x+t.width-g-h)):0>d.left+d.width-g-h?b():0>d.left+d.width/2-g/2?a.setStyle("left",k(n-e.x+p.x)):a.setStyle("left",k(n+d.width/2-g/2-h/2))}};CKEDITOR.plugins.notification=q})();(function(){var c='\x3ca id\x3d"{id}" class\x3d"cke_button cke_button__{name} cke_button_{state} {cls}"'+(CKEDITOR.env.gecko&&!CKEDITOR.env.hc?"":" href\x3d\"javascript:void('{titleJs}')\"")+' title\x3d"{title}" tabindex\x3d"-1" hidefocus\x3d"true" role\x3d"button" aria-labelledby\x3d"{id}_label" aria-describedby\x3d"{id}_description" aria-haspopup\x3d"{hasArrow}" aria-disabled\x3d"{ariaDisabled}"{hasArrowAriaHtml}{toggleAriaHtml}';CKEDITOR.env.gecko&&CKEDITOR.env.mac&&(c+=' onkeypress\x3d"return false;"'); -CKEDITOR.env.gecko&&(c+=' onblur\x3d"this.style.cssText \x3d this.style.cssText;"');var l="";CKEDITOR.env.ie&&(l='return false;" onmouseup\x3d"CKEDITOR.tools.getMouseButton(event)\x3d\x3dCKEDITOR.MOUSE_BUTTON_LEFT\x26\x26');var c=c+(' onkeydown\x3d"return CKEDITOR.tools.callFunction({keydownFn},event);" onfocus\x3d"return CKEDITOR.tools.callFunction({focusFn},event);" onclick\x3d"'+l+'CKEDITOR.tools.callFunction({clickFn},this);return false;"\x3e\x3cspan class\x3d"cke_button_icon cke_button__{iconName}_icon" style\x3d"{style}"')+ -'\x3e\x26nbsp;\x3c/span\x3e\x3cspan id\x3d"{id}_label" class\x3d"cke_button_label cke_button__{name}_label" aria-hidden\x3d"false"\x3e{label}\x3c/span\x3e\x3cspan id\x3d"{id}_description" class\x3d"cke_button_label" aria-hidden\x3d"false"\x3e{ariaShortcutSpace}{ariaShortcut}\x3c/span\x3e{arrowHtml}\x3c/a\x3e',v=CKEDITOR.addTemplate("buttonArrow",'\x3cspan class\x3d"cke_button_arrow"\x3e'+(CKEDITOR.env.hc?"\x26#9660;":"")+"\x3c/span\x3e"),w=CKEDITOR.addTemplate("button",c);CKEDITOR.plugins.add("button", -{beforeInit:function(a){a.ui.addHandler(CKEDITOR.UI_BUTTON,CKEDITOR.ui.button.handler)}});CKEDITOR.UI_BUTTON="button";CKEDITOR.ui.button=function(a){CKEDITOR.tools.extend(this,a,{isToggle:a.isToggle||!1,title:a.label,click:a.click||function(b){b.execCommand(a.command)}});this._={}};CKEDITOR.ui.button.handler={create:function(a){return new CKEDITOR.ui.button(a)}};CKEDITOR.ui.button.prototype={render:function(a,b){function c(){var f=a.mode;f&&(f=this.modes[f]?void 0!==p[f]?p[f]:CKEDITOR.TRISTATE_OFF: -CKEDITOR.TRISTATE_DISABLED,f=a.readOnly&&!this.readOnly?CKEDITOR.TRISTATE_DISABLED:f,this.setState(f),this.refresh&&this.refresh())}var p=null,q=CKEDITOR.env,r=this._.id=CKEDITOR.tools.getNextId(),g="",d=this.command,l,m,k;this._.editor=a;var e={id:r,button:this,editor:a,focus:function(){CKEDITOR.document.getById(r).focus()},execute:function(){this.button.click(a)},attach:function(a){this.button.attach(a)}},x=CKEDITOR.tools.addFunction(function(a){if(e.onkey)return a=new CKEDITOR.dom.event(a),!1!== -e.onkey(e,a.getKeystroke())}),y=CKEDITOR.tools.addFunction(function(a){var b;e.onfocus&&(b=!1!==e.onfocus(e,new CKEDITOR.dom.event(a)));return b}),u=0;e.clickFn=l=CKEDITOR.tools.addFunction(function(){u&&(a.unlockSelection(1),u=0);e.execute();q.iOS&&a.focus()});this.modes?(p={},a.on("beforeModeUnload",function(){a.mode&&this._.state!=CKEDITOR.TRISTATE_DISABLED&&(p[a.mode]=this._.state)},this),a.on("activeFilterChange",c,this),a.on("mode",c,this),!this.readOnly&&a.on("readOnly",c,this)):d&&(d=a.getCommand(d))&& -(d.on("state",function(){this.setState(d.state)},this),g+=d.state==CKEDITOR.TRISTATE_ON?"on":d.state==CKEDITOR.TRISTATE_DISABLED?"disabled":"off");var n;if(this.directional)a.on("contentDirChanged",function(b){var c=CKEDITOR.document.getById(this._.id),d=c.getFirst();b=b.data;b!=a.lang.dir?c.addClass("cke_"+b):c.removeClass("cke_ltr").removeClass("cke_rtl");d.setAttribute("style",CKEDITOR.skin.getIconStyle(n,"rtl"==b,this.icon,this.iconOffset))},this);d?(m=a.getCommandKeystroke(d))&&(k=CKEDITOR.tools.keystrokeToString(a.lang.common.keyboard, -m)):g+="off";m=this.name||this.command;var h=null,t=this.icon;n=m;this.icon&&!/\./.test(this.icon)?(n=this.icon,t=null):(this.icon&&(h=this.icon),CKEDITOR.env.hidpi&&this.iconHiDpi&&(h=this.iconHiDpi));h?(CKEDITOR.skin.addIcon(h,h),t=null):h=n;g={id:r,name:m,iconName:n,label:this.label,cls:(this.hasArrow?"cke_button_expandable ":"")+(this.className||""),state:g,ariaDisabled:"disabled"==g?"true":"false",title:this.title+(k?" ("+k.display+")":""),ariaShortcutSpace:k?"\x26nbsp;":"",ariaShortcut:k?a.lang.common.keyboardShortcut+ -" "+k.aria:"",titleJs:q.gecko&&!q.hc?"":(this.title||"").replace("'",""),hasArrow:"string"===typeof this.hasArrow&&this.hasArrow||(this.hasArrow?"true":"false"),keydownFn:x,focusFn:y,clickFn:l,style:CKEDITOR.skin.getIconStyle(h,"rtl"==a.lang.dir,t,this.iconOffset),arrowHtml:this.hasArrow?v.output():"",hasArrowAriaHtml:this.hasArrow?' aria-expanded\x3d"false"':"",toggleAriaHtml:this.isToggle?'aria-pressed\x3d"false"':""};w.output(g,b);if(this.onRender)this.onRender();return e},setState:function(a){if(this._.state== -a)return!1;this._.state=a;var b=CKEDITOR.document.getById(this._.id);return b?(b.setState(a,"cke_button"),b.setAttribute("aria-disabled",a==CKEDITOR.TRISTATE_DISABLED),this.isToggle&&!this.hasArrow&&b.setAttribute("aria-pressed",a===CKEDITOR.TRISTATE_ON),!0):!1},getState:function(){return this._.state},toFeature:function(a){if(this._.feature)return this._.feature;var b=this;this.allowedContent||this.requiredContent||!this.command||(b=a.getCommand(this.command)||b);return this._.feature=b}};CKEDITOR.ui.prototype.addButton= -function(a,b){this.add(a,CKEDITOR.UI_BUTTON,b)}})();(function(){function D(b){function d(){for(var a=f(),e=CKEDITOR.tools.clone(b.config.toolbarGroups)||v(b),n=0;nb.order?-1:0>a.order?1:a.order]+data-cke-bookmark[^<]*?<\/span>/ig, -"");h&&t(a,c)})}function p(){if("wysiwyg"==a.mode){var b=k("paste");a.getCommand("cut").setState(k("cut"));a.getCommand("copy").setState(k("copy"));a.getCommand("paste").setState(b);a.fire("pasteState",b)}}function k(b){var c=a.getSelection(),c=c&&c.getRanges()[0];if((a.readOnly||c&&c.checkReadOnly())&&b in{paste:1,cut:1})return CKEDITOR.TRISTATE_DISABLED;if("paste"==b)return CKEDITOR.TRISTATE_OFF;b=a.getSelection();c=b.getRanges();return b.getType()==CKEDITOR.SELECTION_NONE||1==c.length&&c[0].collapsed? -CKEDITOR.TRISTATE_DISABLED:CKEDITOR.TRISTATE_OFF}var n=CKEDITOR.plugins.clipboard,u=0,w=0;(function(){a.on("key",h);a.on("contentDom",b);a.on("selectionChange",p);if(a.contextMenu){a.contextMenu.addListener(function(){return{cut:k("cut"),copy:k("copy"),paste:k("paste")}});var c=null;a.on("menuShow",function(){c&&(c.removeListener(),c=null);var b=a.contextMenu.findItemByCommandName("paste");b&&b.element&&(c=b.element.on("touchend",function(){a._.forcePasteDialog=!0}))})}if(a.ui.addButton)a.once("instanceReady", -function(){a._.pasteButtons&&CKEDITOR.tools.array.forEach(a._.pasteButtons,function(b){if(b=a.ui.get(b))if(b=CKEDITOR.document.getById(b._.id))b.on("touchend",function(){a._.forcePasteDialog=!0})})})})();(function(){function b(c,h,d,m,e){var p=a.lang.clipboard[h];a.addCommand(h,d);a.ui.addButton&&a.ui.addButton(c,{label:p,command:h,toolbar:"clipboard,"+m});a.addMenuItems&&a.addMenuItem(h,{label:p,command:h,group:"clipboard",order:e})}b("Cut","cut",c("cut"),10,1);b("Copy","copy",c("copy"),20,4);b("Paste", -"paste",d(),30,8);a._.pasteButtons||(a._.pasteButtons=[]);a._.pasteButtons.push("Paste")})();a.getClipboardData=function(b,c){function h(a){a.removeListener();a.cancel();c(a.data)}function d(a){a.removeListener();a.cancel();c({type:e,dataValue:a.data.dataValue,dataTransfer:a.data.dataTransfer,method:"paste"})}var m=!1,e="auto";c||(c=b,b=null);a.on("beforePaste",function(a){a.removeListener();m=!0;e=a.data.type},null,null,1E3);a.on("paste",h,null,null,0);!1===v()&&(a.removeListener("paste",h),a._.forcePasteDialog&& -m&&a.fire("pasteDialog")?(a.on("pasteDialogCommit",d),a.on("dialogHide",function(a){a.removeListener();a.data.removeListener("pasteDialogCommit",d);a.data._.committed||c(null)})):c(null))}}function z(a){if(CKEDITOR.env.webkit){if(!a.match(/^[^<]*$/g)&&!a.match(/^(
<\/div>|
[^<]*<\/div>)*$/gi))return"html"}else if(CKEDITOR.env.ie){if(!a.match(/^([^<]|)*$/gi)&&!a.match(/^(

([^<]|)*<\/p>|(\r\n))*$/gi))return"html"}else if(CKEDITOR.env.gecko){if(!a.match(/^([^<]|)*$/gi))return"html"}else return"html"; -return"htmlifiedtext"}function A(a,b){function c(a){return CKEDITOR.tools.repeat("\x3c/p\x3e\x3cp\x3e",~~(a/2))+(1==a%2?"\x3cbr\x3e":"")}b=b.replace(/(?!\u3000)\s+/g," ").replace(/> +/gi,"\x3cbr\x3e");b=b.replace(/<\/?[A-Z]+>/g,function(a){return a.toLowerCase()});if(b.match(/^[^<]$/))return b;CKEDITOR.env.webkit&&-1(
|)<\/div>)(?!$|(

(
|)<\/div>))/g,"\x3cbr\x3e").replace(/^(
(
|)<\/div>){2}(?!$)/g,"\x3cdiv\x3e\x3c/div\x3e"), -b.match(/
(
|)<\/div>/)&&(b="\x3cp\x3e"+b.replace(/(
(
|)<\/div>)+/g,function(a){return c(a.split("\x3c/div\x3e\x3cdiv\x3e").length+1)})+"\x3c/p\x3e"),b=b.replace(/<\/div>
/g,"\x3cbr\x3e"),b=b.replace(/<\/?div>/g,""));CKEDITOR.env.gecko&&a.enterMode!=CKEDITOR.ENTER_BR&&(CKEDITOR.env.gecko&&(b=b.replace(/^

$/,"\x3cbr\x3e")),-1){2,}/g,function(a){return c(a.length/4)})+"\x3c/p\x3e"));return B(a,b)}function C(a){function b(){var a= -{},b;for(b in CKEDITOR.dtd)"$"!=b.charAt(0)&&"div"!=b&&"span"!=b&&(a[b]=1);return a}var c={};return{get:function(d){return"plain-text"==d?c.plainText||(c.plainText=new CKEDITOR.filter(a,"br")):"semantic-content"==d?((d=c.semanticContent)||(d=new CKEDITOR.filter(a,{}),d.allow({$1:{elements:b(),attributes:!0,styles:!1,classes:!1}}),d=c.semanticContent=d),d):d?new CKEDITOR.filter(a,d):null}}}function x(a,b,c){b=CKEDITOR.htmlParser.fragment.fromHtml(b);var d=new CKEDITOR.htmlParser.basicWriter;c.applyTo(b, -!0,!1,a.activeEnterMode);b.writeHtml(d);return d.getHtml()}function B(a,b){a.enterMode==CKEDITOR.ENTER_BR?b=b.replace(/(<\/p>

)+/g,function(a){return CKEDITOR.tools.repeat("\x3cbr\x3e",a.length/7*2)}).replace(/<\/?p>/g,""):a.enterMode==CKEDITOR.ENTER_DIV&&(b=b.replace(/<(\/)?p>/g,"\x3c$1div\x3e"));return b}function D(a){a.data.preventDefault();a.data.$.dataTransfer.dropEffect="none"}function E(a){var b=CKEDITOR.plugins.clipboard;a.on("contentDom",function(){function c(b,c,d){c.select();t(a,{dataTransfer:d, -method:"drop"},1);d.sourceEditor.fire("saveSnapshot");d.sourceEditor.editable().extractHtmlFromRange(b);d.sourceEditor.getSelection().selectRanges([b]);d.sourceEditor.fire("saveSnapshot")}function d(c,d){c.select();t(a,{dataTransfer:d,method:"drop"},1);b.resetDragDataTransfer()}function g(b,c,d){var e={$:b.data.$,target:b.data.getTarget()};c&&(e.dragRange=c);d&&(e.dropRange=d);!1===a.fire(b.name,e)&&b.data.preventDefault()}function f(a){a.type!=CKEDITOR.NODE_ELEMENT&&(a=a.getParent());return a.getChildCount()} -var e=a.editable(),l=CKEDITOR.plugins.clipboard.getDropTarget(a),q=a.ui.space("top"),v=a.ui.space("bottom");b.preventDefaultDropOnElement(q);b.preventDefaultDropOnElement(v);e.attachListener(l,"dragstart",g);e.attachListener(a,"dragstart",b.resetDragDataTransfer,b,null,1);e.attachListener(a,"dragstart",function(c){b.initDragDataTransfer(c,a)},null,null,2);e.attachListener(a,"dragstart",function(){var c=b.dragRange=a.getSelection().getRanges()[0];CKEDITOR.env.ie&&10>CKEDITOR.env.version&&(b.dragStartContainerChildCount= -c?f(c.startContainer):null,b.dragEndContainerChildCount=c?f(c.endContainer):null)},null,null,100);e.attachListener(l,"dragend",g);e.attachListener(a,"dragend",b.initDragDataTransfer,b,null,1);e.attachListener(a,"dragend",b.resetDragDataTransfer,b,null,100);e.attachListener(l,"dragover",function(a){if(CKEDITOR.env.edge)a.data.preventDefault();else{var b=a.data.getTarget();b&&b.is&&b.is("html")?a.data.preventDefault():CKEDITOR.env.ie&&CKEDITOR.plugins.clipboard.isFileApiSupported&&a.data.$.dataTransfer.types.contains("Files")&& -a.data.preventDefault()}});e.attachListener(l,"drop",function(c){if(!c.data.$.defaultPrevented&&(c.data.preventDefault(),!a.readOnly)){var d=c.data.getTarget();if(!d.isReadOnly()||d.type==CKEDITOR.NODE_ELEMENT&&d.is("html")){var d=b.getRangeAtDropPosition(c,a),e=b.dragRange;d&&g(c,e,d)}}},null,null,9999);e.attachListener(a,"drop",b.initDragDataTransfer,b,null,1);e.attachListener(a,"drop",function(h){if(h=h.data){var e=h.dropRange,p=h.dragRange,k=h.dataTransfer;k.getTransferType(a)==CKEDITOR.DATA_TRANSFER_INTERNAL? -setTimeout(function(){b.internalDrop(p,e,k,a)},0):k.getTransferType(a)==CKEDITOR.DATA_TRANSFER_CROSS_EDITORS?c(p,e,k):d(e,k)}},null,null,9999)})}var r;CKEDITOR.plugins.add("clipboard",{requires:"dialog,notification,toolbar",_supportedFileMatchers:[],init:function(a){function b(b){return a.config.clipboard_handleImages?-1!==CKEDITOR.tools.indexOf(["image/png","image/jpeg","image/gif"],b.type):!1}function c(b){return CKEDITOR.tools.array.some(a.plugins.clipboard._supportedFileMatchers,function(a){return a(b)})} -function d(b){b.length&&(b=CKEDITOR.tools.array.unique(b),b=CKEDITOR.tools.array.filter(b,function(a){return!!CKEDITOR.tools.trim(a)}),b=g(b.join(", ")),a.showNotification(b,"info",a.config.clipboard_notificationDuration))}function g(b){return b?a.lang.clipboard.fileFormatNotSupportedNotification.replace(/\${formats\}/g,"\x3cem\x3e"+b+"\x3c/em\x3e"):a.lang.clipboard.fileWithoutFormatNotSupportedNotification}function f(a,b){return CKEDITOR.env.ie&&a.data.fileTransferCancel||!(CKEDITOR.env.ie||b&&v!== -b.id)?!1:b.isFileTransfer()&&1===b.getFilesCount()}var e,l=C(a);a.config.forcePasteAsPlainText?e="plain-text":a.config.pasteFilter?e=a.config.pasteFilter:!CKEDITOR.env.webkit||"pasteFilter"in a.config||(e="semantic-content");a.pasteFilter=l.get(e);y(a);E(a);CKEDITOR.dialog.add("paste",CKEDITOR.getUrl(this.path+"dialogs/paste.js"));var q=CKEDITOR.plugins.clipboard.isCustomDataTypesSupported||CKEDITOR.plugins.clipboard.isFileApiSupported,v;CKEDITOR.plugins.clipboard.addFileMatcher(a,b);a.on("paste", -function(a){if(q){var b=a.data;a=b.dataTransfer;if(!b.dataValue){for(var b=[],e=0;e <\/span>/gi," "),"html"!=a.data.type&&(b=b.replace(/]*>([^<]*)<\/span>/gi,function(a,b){return b.replace(/\t/g,"\x26nbsp;\x26nbsp; \x26nbsp;")})),-1/,"")),b=b.replace(/(<[^>]+) class="Apple-[^"]*"/gi,"$1"));if(b.match(/^<[^<]+cke_(editable|contents)/i)){var d,e,f=new CKEDITOR.dom.element("div");for(f.setHtml(b);1==f.getChildCount()&&(d=f.getFirst())&&d.type==CKEDITOR.NODE_ELEMENT&&(d.hasClass("cke_editable")||d.hasClass("cke_contents"));)f=e=d;e&&(b=e.getHtml().replace(/
$/i,""))}CKEDITOR.env.ie?b=b.replace(/^ (?: |\r\n)?<(\w+)/g,function(b,d){return d.toLowerCase()in c?(a.data.preSniffing= -"html","\x3c"+d):b}):CKEDITOR.env.webkit?b=b.replace(/<\/(\w+)>


<\/div>$/,function(b,d){return d in c?(a.data.endsWithEOL=1,"\x3c/"+d+"\x3e"):b}):CKEDITOR.env.gecko&&(b=b.replace(/(\s)
$/,"$1"));a.data.dataValue=b},null,null,3);a.on("paste",function(b){b=b.data;var c=a._.nextPasteType||b.type,d=b.dataValue,e,f=a.config.clipboard_defaultContentType||"html",g=b.dataTransfer.getTransferType(a)==CKEDITOR.DATA_TRANSFER_EXTERNAL,q=!0===a.config.forcePasteAsPlainText;e="html"==c||"html"==b.preSniffing? -"html":z(d);delete a._.nextPasteType;"htmlifiedtext"==e&&(d=A(a.config,d));if("text"==c&&"html"==e)d=x(a,d,l.get("plain-text"));else if(g&&a.pasteFilter&&!b.dontFilter||q)d=x(a,d,a.pasteFilter);b.startsWithEOL&&(d='\x3cbr data-cke-eol\x3d"1"\x3e'+d);b.endsWithEOL&&(d+='\x3cbr data-cke-eol\x3d"1"\x3e');"auto"==c&&(c="html"==e||"html"==f?"html":"text");b.type=c;b.dataValue=d;delete b.preSniffing;delete b.startsWithEOL;delete b.endsWithEOL},null,null,6);a.on("paste",function(b){b=b.data;b.dataValue&& -(a.insertHtml(b.dataValue,b.type,b.range),setTimeout(function(){a.fire("afterPaste")},0))},null,null,1E3);a.on("pasteDialog",function(b){setTimeout(function(){a.openDialog("paste",b.data)},0)})}});CKEDITOR.plugins.clipboard={addFileMatcher:function(a,b){a.plugins.clipboard._supportedFileMatchers.push(b)},isCustomCopyCutSupported:CKEDITOR.env.ie&&16>CKEDITOR.env.version||CKEDITOR.env.iOS&&605>CKEDITOR.env.version?!1:!0,isCustomDataTypesSupported:!CKEDITOR.env.ie||16<=CKEDITOR.env.version,isFileApiSupported:!CKEDITOR.env.ie|| -9CKEDITOR.env.version||b.isInline()?b:a.document},fixSplitNodesAfterDrop:function(a,b,c,d){function g(a,c,d){var f=a;f.type==CKEDITOR.NODE_TEXT&&(f=a.getParent());if(f.equals(c)&&d!=c.getChildCount())return a=b.startContainer.getChild(b.startOffset-1),c=b.startContainer.getChild(b.startOffset),a&&a.type==CKEDITOR.NODE_TEXT&&c&&c.type==CKEDITOR.NODE_TEXT&& -(d=a.getLength(),a.setText(a.getText()+c.getText()),c.remove(),b.setStart(a,d),b.collapse(!0)),!0}var f=b.startContainer;"number"==typeof d&&"number"==typeof c&&f.type==CKEDITOR.NODE_ELEMENT&&(g(a.startContainer,f,c)||g(a.endContainer,f,d))},isDropRangeAffectedByDragRange:function(a,b){var c=b.startContainer,d=b.endOffset;return a.endContainer.equals(c)&&a.endOffset<=d||a.startContainer.getParent().equals(c)&&a.startContainer.getIndex()CKEDITOR.env.version&&this.fixSplitNodesAfterDrop(a,b,g.dragStartContainerChildCount,g.dragEndContainerChildCount);(l=this.isDropRangeAffectedByDragRange(a,b))||(e=a.createBookmark(!1));g=b.clone().createBookmark(!1);l&&(e=a.createBookmark(!1));a=e.startNode;b=e.endNode;l=g.startNode;b&&a.getPosition(l)&CKEDITOR.POSITION_PRECEDING&& -b.getPosition(l)&CKEDITOR.POSITION_FOLLOWING&&l.insertBefore(a);a=d.createRange();a.moveToBookmark(e);f.extractHtmlFromRange(a,1);b=d.createRange();g.startNode.getCommonAncestor(f)||(g=d.getSelection().createBookmarks()[0]);b.moveToBookmark(g);t(d,{dataTransfer:c,method:"drop",range:b},1);d.fire("unlockSnapshot")},getRangeAtDropPosition:function(a,b){var c=a.data.$,d=c.clientX,g=c.clientY,f=b.getSelection(!0).getRanges()[0],e=b.createRange();if(a.data.testRange)return a.data.testRange;if(document.caretRangeFromPoint&& -b.document.$.caretRangeFromPoint(d,g))c=b.document.$.caretRangeFromPoint(d,g),e.setStart(CKEDITOR.dom.node(c.startContainer),c.startOffset),e.collapse(!0);else if(c.rangeParent)e.setStart(CKEDITOR.dom.node(c.rangeParent),c.rangeOffset),e.collapse(!0);else{if(CKEDITOR.env.ie&&8q&&!l;q++){if(!l)try{c.moveToPoint(d,g-q),l=!0}catch(r){}if(!l)try{c.moveToPoint(d, -g+q),l=!0}catch(h){}}if(l){var m="cke-temp-"+(new Date).getTime();c.pasteHTML('\x3cspan id\x3d"'+m+'"\x3e​\x3c/span\x3e');var p=b.document.getById(m);e.moveToPosition(p,CKEDITOR.POSITION_BEFORE_START);p.remove()}else{var k=b.document.$.elementFromPoint(d,g),n=new CKEDITOR.dom.element(k),u;if(n.equals(b.editable())||"html"==n.getName())return f&&f.startContainer&&!f.startContainer.equals(b.editable())?f:null;u=n.getClientRect();d/i,fragmentRegExp:/\s*\x3c!--StartFragment--\x3e|\x3c!--EndFragment--\x3e\s*/g,types:[],data:{},files:[],nativeHtmlCache:"",normalizeType:function(a){a=a.toLowerCase();return"text"==a||"text/plain"==a?"Text":"url"==a?"URL":"files"===a?"Files":a}};this._.fallbackDataTransfer=new CKEDITOR.plugins.clipboard.fallbackDataTransfer(this);this.id=this.getData(r);this.id||(this.id="Text"==r?"":"cke-"+CKEDITOR.tools.getUniqueId());b&&(this.sourceEditor= -b,this.setData("text/html",b.getSelectedHtml(1)),"Text"==r||this.getData("text/plain")||this.setData("text/plain",b.getSelection().getSelectedText()))};CKEDITOR.DATA_TRANSFER_INTERNAL=1;CKEDITOR.DATA_TRANSFER_CROSS_EDITORS=2;CKEDITOR.DATA_TRANSFER_EXTERNAL=3;CKEDITOR.plugins.clipboard.dataTransfer.prototype={getData:function(a,b){a=this._.normalizeType(a);var c="text/html"==a&&b?this._.nativeHtmlCache:this._.data[a];if(void 0===c||null===c||""===c){if(this._.fallbackDataTransfer.isRequired())c=this._.fallbackDataTransfer.getData(a, -b);else try{c=this.$.getData(a)||""}catch(d){c=""}"text/html"!=a||b||(c=this._stripHtml(c))}"Text"==a&&CKEDITOR.env.gecko&&this.getFilesCount()&&"file://"==c.substring(0,7)&&(c="");if("string"===typeof c)var g=c.indexOf("\x3c/html\x3e"),c=-1!==g?c.substring(0,g+7):c;return c},setData:function(a,b){a=this._.normalizeType(a);"text/html"==a?(this._.data[a]=this._stripHtml(b),this._.nativeHtmlCache=b):this._.data[a]=b;if(CKEDITOR.plugins.clipboard.isCustomDataTypesSupported||"URL"==a||"Text"==a)if("Text"== -r&&"Text"==a&&(this.id=b),this._.fallbackDataTransfer.isRequired())this._.fallbackDataTransfer.setData(a,b);else try{this.$.setData(a,b)}catch(c){}},storeId:function(){"Text"!==r&&this.setData(r,this.id)},getTransferType:function(a){return this.sourceEditor?this.sourceEditor==a?CKEDITOR.DATA_TRANSFER_INTERNAL:CKEDITOR.DATA_TRANSFER_CROSS_EDITORS:CKEDITOR.DATA_TRANSFER_EXTERNAL},cacheData:function(){function a(a){a=b._.normalizeType(a);var c=b.getData(a);"text/html"==a&&(b._.nativeHtmlCache=b.getData(a, -!0),c=b._stripHtml(c));c&&(b._.data[a]=c);b._.types.push(a)}if(this.$){var b=this,c,d,g;if(CKEDITOR.plugins.clipboard.isCustomDataTypesSupported){if(this.$.types)for(c=0;c$/gi,"")}a&&a.length&&(a=b(a),a=a.replace(this._.metaRegExp,""),a=a.replace(this._.fragmentRegExp,"")); -return a}};CKEDITOR.plugins.clipboard.fallbackDataTransfer=function(a){this._dataTransfer=a;this._customDataFallbackType="text/html"};CKEDITOR.plugins.clipboard.fallbackDataTransfer._isCustomMimeTypeSupported=null;CKEDITOR.plugins.clipboard.fallbackDataTransfer._customTypes=[];CKEDITOR.plugins.clipboard.fallbackDataTransfer.prototype={isRequired:function(){var a=CKEDITOR.plugins.clipboard.fallbackDataTransfer,b=this._dataTransfer.$;if(null===a._isCustomMimeTypeSupported)if(b){a._isCustomMimeTypeSupported= -!1;if(CKEDITOR.env.edge&&17<=CKEDITOR.env.version)return!0;try{b.setData("cke/mimetypetest","cke test value"),a._isCustomMimeTypeSupported="cke test value"===b.getData("cke/mimetypetest"),b.clearData("cke/mimetypetest")}catch(c){}}else return!1;return!a._isCustomMimeTypeSupported},getData:function(a,b){var c=this._getData(this._customDataFallbackType,!0);if(b)return c;var c=this._extractDataComment(c),d=null,d=a===this._customDataFallbackType?c.content:c.data&&c.data[a]?c.data[a]:this._getData(a, -!0);return null!==d?d:""},setData:function(a,b){var c=a===this._customDataFallbackType;c&&(b=this._applyDataComment(b,this._getFallbackTypeData()));var d=b,g=this._dataTransfer.$;try{g.setData(a,d),c&&(this._dataTransfer._.nativeHtmlCache=d)}catch(f){if(this._isUnsupportedMimeTypeError(f)){c=CKEDITOR.plugins.clipboard.fallbackDataTransfer;-1===CKEDITOR.tools.indexOf(c._customTypes,a)&&c._customTypes.push(a);var c=this._getFallbackTypeContent(),e=this._getFallbackTypeData();e[a]=d;try{d=this._applyDataComment(c, -e),g.setData(this._customDataFallbackType,d),this._dataTransfer._.nativeHtmlCache=d}catch(l){d=""}}}return d},_getData:function(a,b){var c=this._dataTransfer._.data;if(!b&&c[a])return c[a];try{return this._dataTransfer.$.getData(a)}catch(d){return null}},_getFallbackTypeContent:function(){var a=this._dataTransfer._.data[this._customDataFallbackType];a||(a=this._extractDataComment(this._getData(this._customDataFallbackType,!0)).content);return a},_getFallbackTypeData:function(){var a=CKEDITOR.plugins.clipboard.fallbackDataTransfer._customTypes, -b=this._extractDataComment(this._getData(this._customDataFallbackType,!0)).data||{},c=this._dataTransfer._.data;CKEDITOR.tools.array.forEach(a,function(a){void 0!==c[a]?b[a]=c[a]:void 0!==b[a]&&(b[a]=b[a])},this);return b},_isUnsupportedMimeTypeError:function(a){return a.message&&-1!==a.message.search(/element not found/gi)},_extractDataComment:function(a){var b={data:null,content:a||""};if(a&&16c?d+c:b.width>c?d-a.left:d-a.right+b.width):mc?d-c:b.width>c?d-a.right+b.width:d-a.left);c=a.top;b.height-a.tope?p-e:b.height>e?p-a.bottom+b.height:p-a.top);CKEDITOR.env.ie&&!CKEDITOR.env.edge&&((b=a=k.$.offsetParent&&new CKEDITOR.dom.element(k.$.offsetParent))&&"html"==b.getName()&&(b=b.getDocument().getBody()),b&&"rtl"==b.getComputedStyle("direction")&&(d=CKEDITOR.env.ie8Compat?d-2*k.getDocument().getDocumentElement().$.scrollLeft:d-(a.$.scrollWidth-a.$.clientWidth))); -var a=k.getFirst(),f;(f=a.getCustomData("activePanel"))&&f.onHide&&f.onHide.call(this,1);a.setCustomData("activePanel",this);k.setStyles({top:p+"px",left:d+"px"});k.setOpacity(1);g&&g()},this);n.isLoaded?a():n.onLoad=a;CKEDITOR.tools.setTimeout(function(){var a=CKEDITOR.env.webkit&&CKEDITOR.document.getWindow().getScrollPosition().y;this.focus();l.element.focus();CKEDITOR.env.webkit&&(CKEDITOR.document.getBody().$.scrollTop=a);this.allowBlur(!0);this._.markFirst&&(CKEDITOR.env.ie?CKEDITOR.tools.setTimeout(function(){l.markFirstDisplayed? -l.markFirstDisplayed():l._.markFirstDisplayed()},0):l.markFirstDisplayed?l.markFirstDisplayed():l._.markFirstDisplayed());this._.editor.fire("panelShow",this)},0,this)},CKEDITOR.env.air?200:0,this);this.visible=1;this.onShow&&this.onShow.call(this)},reposition:function(){var a=this._.showBlockParams;this.visible&&this._.showBlockParams&&(this.hide(),this.showBlock.apply(this,a))},focus:function(){if(CKEDITOR.env.webkit){var a=CKEDITOR.document.getActive();a&&!a.equals(this._.iframe)&&a.$.blur()}(this._.lastFocused|| -this._.iframe.getFrameDocument().getWindow()).focus()},blur:function(){var a=this._.iframe.getFrameDocument().getActive();a&&a.is("a")&&(this._.lastFocused=a)},hide:function(a){if(this.visible&&(!this.onHide||!0!==this.onHide.call(this))){this.hideChild();CKEDITOR.env.gecko&&this._.iframe.getFrameDocument().$.activeElement.blur();this.element.setStyle("display","none");this.visible=0;this.element.getFirst().removeCustomData("activePanel");if(a=a&&this._.returnFocus)CKEDITOR.env.webkit&&a.type&&a.getWindow().$.focus(), -a.focus();delete this._.lastFocused;this._.showBlockParams=null;this._.editor.fire("panelHide",this)}},allowBlur:function(a){var b=this._.panel;void 0!==a&&(b.allowBlur=a);return b.allowBlur},showAsChild:function(a,b,c,f,h,g){if(this._.activeChild!=a||a._.panel._.offsetParentId!=c.getId())this.hideChild(),a.onHide=CKEDITOR.tools.bind(function(){CKEDITOR.tools.setTimeout(function(){this._.focused||this.hide()},0,this)},this),this._.activeChild=a,this._.focused=!1,a.showBlock(b,c,f,h,g),this.blur(), -(CKEDITOR.env.ie7Compat||CKEDITOR.env.ie6Compat)&&setTimeout(function(){a.element.getChild(0).$.style.cssText+=""},100)},hideChild:function(a){var b=this._.activeChild;b&&(delete b.onHide,delete this._.activeChild,b.hide(),a&&this.focus())}}});CKEDITOR.on("instanceDestroyed",function(){var a=CKEDITOR.tools.isEmpty(CKEDITOR.instances),b;for(b in f){var c=f[b];a?c.destroy():c.element.hide()}a&&(f={})})})();(function(){var n,k,l;CKEDITOR.plugins.add("colorbutton",{requires:"panelbutton,floatpanel",init:function(a){function b(d){function b(){var d=a.config["colorButton_"+h+"Style"];d.childRule="back"==h?function(a){return f(a)}:function(a){return!(a.is("a")||a.getElementsByTag("a").count())||f(a)};return d}function z(d,w,e){var c={};d&&(c.color=d);w&&(c.colorName=w);w=!CKEDITOR.tools.isEmpty(c)&&new CKEDITOR.style(b(),c);a.execCommand(m,{newStyle:w});if(d&&e)for(e.addColor(d.substr(1).toUpperCase()), -d=t.element.find("[role\x3doption]").toArray(),e=0;eb)return null;this.boxes[b].getElement().remove(); -return this.boxes.splice(b,1)[0]}}});l=CKEDITOR.tools.createClass({$:function(a,b,c){this.editor=a;this.cssProperty=b;this.clickFn=c;this.rows=[];this._.addNewRow();if(this.editor.config.colorButton_renderContentColors)this.editor.once("instanceReady",function(){this.renderContentColors()},this)},statics:{renderContainer:function(a,b){a.push('\x3c/tbody\x3e\x3ctbody class\x3d"cke_colorhistory" style\x3d"display:none;"\x3e',"\x3ctr\x3e",'\x3ctd colspan\x3d"',b.config.colorButton_colorsPerRow,'" align\x3d"center"\x3e', -"\x3cspan\x3e\x3chr\x3e\x3c/span\x3e","\x3c/td\x3e","\x3c/tr\x3e","\x3c/tbody\x3e\x3ctbody\x3e")},getRowLimit:function(a){return a.config.colorButton_historyRowLimit},getCapacity:function(a){return l.getRowLimit(a)*a.config.colorButton_colorsPerRow},colorList:CKEDITOR.tools.style.parse._colors},_:{countColors:function(){var a=CKEDITOR.tools.getStyledSpans(this.cssProperty,this.editor.editable());return CKEDITOR.tools.array.reduce(a,function(a,c){var f=this._.getHexCode(c,this.cssProperty,l.colorList); -a[f]=a[f]||0;a[f]+=1;return a},{},this)},getHexCode:function(a,b,c){var f=a.getStyle(b);return f in c?c[f].substr(1):n.normalizeColor(a.getComputedStyle(b)).toUpperCase()},sortByOccurrencesAscending:function(a,b){var c=[],f;for(f in a){var k={};k[b]=f;k.frequency=a[f];c.push(k)}c.sort(function(a,b){return b.frequency-a.frequency});this._.trimToCapacity(c);return c.reverse()},trimToCapacity:function(a){a.splice(l.getCapacity(this.editor))},addColors:function(a){CKEDITOR.tools.array.forEach(a,function(a){this.addColor(a.colorCode)}, -this)},extractColorBox:function(a){for(var b=0;ba.status||304==a.status||0===a.status||1223==a.status))return null;switch(b){case "text":return a.responseText;case "xml":var c=a.responseXML; -return new CKEDITOR.xml(c&&c.firstChild?c:a.responseText);case "arraybuffer":return a.response;default:return null}}function g(a,b,c){var e=!!b,d=k();if(!d)return null;e&&"text"!==c&&"xml"!==c&&(d.responseType=c);d.open("GET",a,e);e&&(d.onreadystatechange=function(){4==d.readyState&&(b(h(d,c)),d=null)});d.send(null);return e?"":h(d,c)}function l(a,b,c,e,d){var f=k();if(!f)return null;f.open("POST",a,!0);f.onreadystatechange=function(){4==f.readyState&&(e&&e(h(f,d)),f=null)};f.setRequestHeader("Content-type", -c||"application/x-www-form-urlencoded; charset\x3dUTF-8");f.send(b)}return{load:function(a,b,c){return g(a,b,c||"text")},post:function(a,b,c,e){return l(a,b,c,e,"text")},loadXml:function(a,b){return g(a,b,"xml")},loadText:function(a,b){return g(a,b,"text")},loadBinary:function(a,b){return g(a,b,"arraybuffer")}}}()})();(function(){CKEDITOR.plugins.add("templates",{requires:"dialog,ajax",init:function(a){CKEDITOR.dialog.add("templates",CKEDITOR.getUrl(this.path+"dialogs/templates.js"));a.addCommand("templates",new CKEDITOR.dialogCommand("templates"));a.ui.addButton&&a.ui.addButton("Templates",{label:a.lang.templates.button,command:"templates",toolbar:"doctools,10"})}});var c={},f={};CKEDITOR.addTemplates=function(a,d){c[a]=d};CKEDITOR.getTemplates=function(a){return c[a]};CKEDITOR.loadTemplates=function(a,d){for(var e= -[],b=0,c=a.length;bf.group?1:a.orderf.order?1:0})}var k='\x3cspan class\x3d"cke_menuitem"\x3e\x3ca id\x3d"{id}" class\x3d"cke_menubutton cke_menubutton__{name} cke_menubutton_{state} {cls}" href\x3d"{href}" title\x3d"{title}" tabindex\x3d"-1" _cke_focus\x3d1 hidefocus\x3d"true" role\x3d"{role}" aria-label\x3d"{attrLabel}" aria-describedby\x3d"{id}_description" aria-haspopup\x3d"{hasPopup}" aria-disabled\x3d"{disabled}" {ariaChecked} draggable\x3d"false"', -n="";CKEDITOR.env.gecko&&CKEDITOR.env.mac&&(k+=' onkeypress\x3d"return false;"');CKEDITOR.env.gecko&&(k+=' onblur\x3d"this.style.cssText \x3d this.style.cssText;" ondragstart\x3d"return false;"');CKEDITOR.env.ie&&(n='return false;" onmouseup\x3d"CKEDITOR.tools.getMouseButton(event)\x3d\x3d\x3dCKEDITOR.MOUSE_BUTTON_LEFT\x26\x26');var k=k+(' onmouseover\x3d"CKEDITOR.tools.callFunction({hoverFn},{index});" onmouseout\x3d"CKEDITOR.tools.callFunction({moveOutFn},{index});" onclick\x3d"'+n+'CKEDITOR.tools.callFunction({clickFn},{index}); return false;"\x3e')+ -'\x3cspan class\x3d"cke_menubutton_inner"\x3e\x3cspan class\x3d"cke_menubutton_icon"\x3e\x3cspan class\x3d"cke_button_icon cke_button__{iconName}_icon" style\x3d"{iconStyle}"\x3e\x3c/span\x3e\x3c/span\x3e\x3cspan class\x3d"cke_menubutton_label"\x3e{label}\x3c/span\x3e{shortcutHtml}{arrowHtml}\x3c/span\x3e\x3c/a\x3e\x3cspan id\x3d"{id}_description" class\x3d"cke_voice_label" aria-hidden\x3d"false"\x3e{ariaShortcut}\x3c/span\x3e\x3c/span\x3e',r=CKEDITOR.addTemplate("menuItem",k),p=CKEDITOR.addTemplate("menuArrow", -'\x3cspan class\x3d"cke_menuarrow"\x3e\x3cspan\x3e{label}\x3c/span\x3e\x3c/span\x3e'),c=CKEDITOR.addTemplate("menuShortcut",'\x3cspan class\x3d"cke_menubutton_label cke_menubutton_shortcut"\x3e{shortcut}\x3c/span\x3e');CKEDITOR.menu=CKEDITOR.tools.createClass({$:function(a,b){b=this._.definition=b||{};this.id=CKEDITOR.tools.getNextId();this.editor=a;this.items=[];this._.listeners=[];this._.level=b.level||1;var f=CKEDITOR.tools.extend({},b.panel,{css:[CKEDITOR.skin.getPath("editor")],level:this._.level- -1,block:{}}),c=f.block.attributes=f.attributes||{};!c.role&&(c.role="menu");this._.panelDefinition=f},_:{onShow:function(){var a=this.editor.getSelection(),b=a&&a.getStartElement(),f=this.editor.elementPath(),c=this._.listeners;this.removeAll();for(var h=0;h <\/span>/g, -""),a.replace(/<.*?>/g,"")):a.getText()}function d(a,c){var f=a,g=/\s/g,h="p br ol ul li td th div caption body".split(" "),m=!1,k=!1,p,n;do{for(p=b(f,c);!p&&f.getParent();){f=f.getParent();if(-1!==l(h,f.getName())){k=m=!0;break}p=b(f,c)}if(p&&p.getName&&-1!==l(h,p.getName())){m=!0;break}f=p}while(f&&f.getStyle&&("none"==f.getStyle("display")||!f.getText()));for(f||(f=a);f.type!==CKEDITOR.NODE_TEXT;)f=!m||c||k?f.getChild(0):f.getChild(f.getChildCount()-1);for(h=e(f);null!=(k=g.exec(h))&&(n=k.index, -c););if("number"!==typeof n&&!m)return d(f,c);if(m)c?n=0:(g=/([\.\b]*$)/,n=(k=g.exec(h))?k.index:h.length);else if(c&&(n+=1,n>h.length))return d(f);return{node:f,offset:n}}var c=/\b\w+\b/ig,f,g,h,m,k;h=m=k=a.startContainer;for(f=e(h);null!=(g=c.exec(f));)if(g.index+g[0].length>=a.startOffset)return a=g.index,c=g.index+g[0].length,0===g.index&&(g=d(h,!0),m=g.node,a=g.offset),c>=f.length&&(f=d(h),k=f.node,c=f.offset),{startNode:m,startOffset:a,endNode:k,endOffset:c};return null},_filterStyles:function(a){var b= -CKEDITOR.tools.isEmpty,e=[],d,c;for(c=0;cc.width&&(a.resize_minWidth=c.width);a.resize_minHeight>c.height&&(a.resize_minHeight=c.height);CKEDITOR.document.on("mousemove",f);CKEDITOR.document.on("mouseup",k);b.document&&(b.document.on("mousemove",f),b.document.on("mouseup",k));d.preventDefault&&d.preventDefault()});b.on("destroy", -function(){CKEDITOR.tools.removeFunction(q)});b.on("uiSpace",function(a){if("bottom"==a.data.space){var e="";h&&!p&&(e=" cke_resizer_horizontal");!h&&p&&(e=" cke_resizer_vertical");var c='\x3cspan id\x3d"'+r+'" class\x3d"cke_resizer'+e+" cke_resizer_"+g+'" title\x3d"'+CKEDITOR.tools.htmlEncode(b.lang.common.resize)+'" onmousedown\x3d"CKEDITOR.tools.callFunction('+q+', event)"\x3e'+("ltr"==g?"â—¢":"â—£")+"\x3c/span\x3e";"ltr"==g&&"ltr"==e?a.data.html+=c:a.data.html=c+a.data.html}},b,null,100);b.on("maximize", -function(a){b.ui.space("resizer")[a.data==CKEDITOR.TRISTATE_ON?"hide":"show"]()})}}});(function(){function q(a,c){function k(b){b=h.list[b];var e;b.equals(a.editable())||"true"==b.getAttribute("contenteditable")?(e=a.createRange(),e.selectNodeContents(b),e=e.select()):(e=a.getSelection(),e.selectElement(b));CKEDITOR.env.ie&&a.fire("selectionChange",{selection:e,path:new CKEDITOR.dom.elementPath(b)});a.focus()}function l(){m&&m.setHtml('\x3cspan class\x3d"cke_path_empty"\x3e\x26nbsp;\x3c/span\x3e');delete h.list}var n=a.ui.spaceId("path"),m,h=a._.elementsPath,q=h.idBase;c.html+='\x3cspan id\x3d"'+ -n+'_label" class\x3d"cke_voice_label"\x3e'+a.lang.elementspath.eleLabel+'\x3c/span\x3e\x3cspan id\x3d"'+n+'" class\x3d"cke_path" role\x3d"group" aria-labelledby\x3d"'+n+'_label"\x3e\x3cspan class\x3d"cke_path_empty"\x3e\x26nbsp;\x3c/span\x3e\x3c/span\x3e';a.on("uiReady",function(){var b=a.ui.space("path");b&&a.focusManager.add(b,1)});h.onClick=k;var v=CKEDITOR.tools.addFunction(k),w=CKEDITOR.tools.addFunction(function(b,e){var g=h.idBase,d;e=new CKEDITOR.dom.event(e);d="rtl"==a.lang.dir;switch(e.getKeystroke()){case d? -39:37:case 9:return(d=CKEDITOR.document.getById(g+(b+1)))||(d=CKEDITOR.document.getById(g+"0")),d.focus(),!1;case d?37:39:case CKEDITOR.SHIFT+9:return(d=CKEDITOR.document.getById(g+(b-1)))||(d=CKEDITOR.document.getById(g+(h.list.length-1))),d.focus(),!1;case 27:return a.focus(),!1;case 13:case 32:return k(b),!1;case CKEDITOR.ALT+121:return a.execCommand("toolbarFocus"),!1}return!0});a.on("selectionChange",function(b){for(var e=[],g=h.list=[],d=[],c=h.filters,p=!0,k=b.data.path.elements,u=k.length;u--;){var f= -k[u],r=0;b=f.data("cke-display-name")?f.data("cke-display-name"):f.data("cke-real-element-type")?f.data("cke-real-element-type"):f.getName();(p=f.hasAttribute("contenteditable")?"true"==f.getAttribute("contenteditable"):p)||f.hasAttribute("contenteditable")||(r=1);for(var t=0;tCKEDITOR.env.version?n.createText("\r"):n.createElement("br"),b.deleteContents(),b.insertNode(a),CKEDITOR.env.needsBrFiller?(n.createText("").insertAfter(a),g&&(k||f.blockLimit).appendBogus(),a.getNext().$.nodeValue="",b.setStartAt(a.getNext(), -CKEDITOR.POSITION_AFTER_START)):b.setStartAt(a,CKEDITOR.POSITION_AFTER_END)),b.collapse(!0),b.select(),b.scrollIntoView()):r(a,e,b,l)}}};v=CKEDITOR.plugins.enterkey;u=v.enterBr;r=v.enterBlock;w=/^h[1-6]$/})();(function(){function k(a,f){var g={},c=[],e={nbsp:" ",shy:"­",gt:"\x3e",lt:"\x3c",amp:"\x26",apos:"'",quot:'"'};a=a.replace(/\b(nbsp|shy|gt|lt|amp|apos|quot)(?:,|$)/g,function(a,b){var d=f?"\x26"+b+";":e[b];g[d]=f?e[b]:"\x26"+b+";";c.push(d);return""});a=a.replace(/,$/,"");if(!f&&a){a=a.split(",");var b=document.createElement("div"),d;b.innerHTML="\x26"+a.join(";\x26")+";";d=b.innerHTML;b=null;for(b=0;ba&&(a=640);420>b&&(b=420);var f=parseInt((window.screen.height-b)/2,10),g=parseInt((window.screen.width-a)/2,10);d=(d||"location\x3dno,menubar\x3dno,toolbar\x3dno,dependent\x3dyes,minimizable\x3dno,modal\x3dyes,alwaysRaised\x3dyes,resizable\x3dyes,scrollbars\x3dyes")+",width\x3d"+ -a+",height\x3d"+b+",top\x3d"+f+",left\x3d"+g;var c=window.open("",null,d,!0);if(!c)return!1;try{-1==navigator.userAgent.toLowerCase().indexOf(" chrome/")&&(c.moveTo(g,f),c.resizeTo(a,b)),c.focus(),c.location.href=e}catch(h){window.open(e,null,d,!0)}return!0}});(function(){function k(a){this.editor=a;this.loaders=[]}function l(a,c,b){var d=a.config.fileTools_defaultFileName;this.editor=a;this.lang=a.lang;"string"===typeof c?(this.data=c,this.file=n(this.data),this.loaded=this.total=this.file.size):(this.data=null,this.file=c,this.total=this.file.size,this.loaded=0);b?this.fileName=b:this.file.name?this.fileName=this.file.name:(a=this.file.type.split("/"),d&&(a[0]=d),this.fileName=a.join("."));this.uploaded=0;this.responseData=this.uploadTotal=null;this.status= -"created";this.abort=function(){this.changeStatus("abort")}}function n(a){var c=a.match(m)[1];a=a.replace(m,"");a=atob(a);var b=[],d,f,g,e;for(d=0;dd.status||299h.height-c.bottom?e("pin"):e("bottom"),d=h.width/2,d=l.floatSpacePreferRight?"right":0n.width?"rtl"==l.contentsLangDirection? -"right":"left":d-c.left>c.right-d?"left":"right",n.width>h.width?(d="left",f=0):(f="left"==d?0h.width&&(d="left"==d?"right":"left",f=0)),b.setStyle(d,w(("pin"==m?u:p)+f+("pin"==m?0:"left"==d?v:-v)))):(m="pin",e("pin"),t(d))}}}();if(p){var k=new CKEDITOR.template('\x3cdiv id\x3d"cke_{name}" class\x3d"cke {id} cke_reset_all cke_chrome cke_editor_{name} cke_float cke_{langDir} '+CKEDITOR.env.cssClass+'" dir\x3d"{langDir}" title\x3d"'+(CKEDITOR.env.gecko? -" ":"")+'" lang\x3d"{langCode}" role\x3d"application" style\x3d"{style}"'+(a.applicationTitle?' aria-labelledby\x3d"cke_{name}_arialbl"':" ")+"\x3e"+(a.applicationTitle?'\x3cspan id\x3d"cke_{name}_arialbl" class\x3d"cke_voice_label"\x3e{voiceLabel}\x3c/span\x3e':" ")+'\x3cdiv class\x3d"cke_inner"\x3e\x3cdiv id\x3d"{topId}" class\x3d"cke_top" role\x3d"presentation"\x3e{content}\x3c/div\x3e\x3c/div\x3e\x3c/div\x3e'),b=CKEDITOR.document.getBody().append(CKEDITOR.dom.element.createFromHtml(k.output({content:p, -id:a.id,langDir:a.lang.dir,langCode:a.langCode,name:a.name,style:"display:none;z-index:"+(l.baseFloatZIndex-1),topId:a.ui.spaceId("top"),voiceLabel:a.applicationTitle}))),u=CKEDITOR.tools.eventsBuffer(500,t),e=CKEDITOR.tools.eventsBuffer(100,t);b.unselectable();b.on("mousedown",function(a){a=a.data;a.getTarget().hasAscendant("a",1)||a.preventDefault()});a.on("focus",function(b){t(b);a.on("change",u.input);g.on("scroll",e.input);g.on("resize",e.input)});a.on("blur",function(){b.hide();a.removeListener("change", -u.input);g.removeListener("scroll",e.input);g.removeListener("resize",e.input)});a.on("destroy",function(){g.removeListener("scroll",e.input);g.removeListener("resize",e.input);b.clearCustomData();b.remove()});a.focusManager.hasFocus&&b.show();a.focusManager.add(b,1)}}var g=CKEDITOR.document.getWindow(),w=CKEDITOR.tools.cssLength;CKEDITOR.plugins.add("floatingspace",{init:function(a){a.on("loaded",function(){k(this)},null,null,20)}})})();CKEDITOR.plugins.add("listblock",{requires:"panel",onLoad:function(){var f=CKEDITOR.addTemplate("panel-list",'\x3cul role\x3d"presentation" class\x3d"cke_panel_list"\x3e{items}\x3c/ul\x3e'),g=CKEDITOR.addTemplate("panel-list-item",'\x3cli id\x3d"{id}" class\x3d"cke_panel_listItem" role\x3dpresentation\x3e\x3ca id\x3d"{id}_option" _cke_focus\x3d1 hidefocus\x3dtrue title\x3d"{title}" draggable\x3d"false" ondragstart\x3d"return false;" href\x3d"javascript:void(\'{val}\')" onclick\x3d"{onclick}CKEDITOR.tools.callFunction({clickFn},\'{val}\'); return false;" role\x3d"option"\x3e{text}\x3c/a\x3e\x3c/li\x3e'), -h=CKEDITOR.addTemplate("panel-list-group",'\x3ch1 id\x3d"{id}" draggable\x3d"false" ondragstart\x3d"return false;" class\x3d"cke_panel_grouptitle" role\x3d"presentation" \x3e{label}\x3c/h1\x3e'),k=/\'/g;CKEDITOR.ui.panel.prototype.addListBlock=function(a,b){return this.addBlock(a,new CKEDITOR.ui.listBlock(this.getHolderElement(),b))};CKEDITOR.ui.listBlock=CKEDITOR.tools.createClass({base:CKEDITOR.ui.panel.block,$:function(a,b){b=b||{};var c=b.attributes||(b.attributes={});(this.multiSelect=!!b.multiSelect)&& -(c["aria-multiselectable"]=!0);!c.role&&(c.role="listbox");this.base.apply(this,arguments);this.element.setAttribute("role",c.role);c=this.keys;c[40]="next";c[9]="next";c[38]="prev";c[CKEDITOR.SHIFT+9]="prev";c[32]=CKEDITOR.env.ie?"mouseup":"click";CKEDITOR.env.ie&&(c[13]="mouseup");this._.pendingHtml=[];this._.pendingList=[];this._.items={};this._.groups={}},_:{close:function(){if(this._.started){var a=f.output({items:this._.pendingList.join("")});this._.pendingList=[];this._.pendingHtml.push(a); -delete this._.started}},getClick:function(){this._.click||(this._.click=CKEDITOR.tools.addFunction(function(a){var b=this.toggle(a);if(this.onClick)this.onClick(a,b)},this));return this._.click}},proto:{add:function(a,b,c){var d=CKEDITOR.tools.getNextId();this._.started||(this._.started=1,this._.size=this._.size||0);this._.items[a]=d;var e;e=CKEDITOR.tools.htmlEncodeAttr(a).replace(k,"\\'");a={id:d,val:e,onclick:CKEDITOR.env.ie?'return false;" onmouseup\x3d"CKEDITOR.tools.getMouseButton(event)\x3d\x3d\x3dCKEDITOR.MOUSE_BUTTON_LEFT\x26\x26': -"",clickFn:this._.getClick(),title:CKEDITOR.tools.htmlEncodeAttr(c||a),text:b||a};this._.pendingList.push(g.output(a))},startGroup:function(a){this._.close();var b=CKEDITOR.tools.getNextId();this._.groups[a]=b;this._.pendingHtml.push(h.output({id:b,label:a}))},commit:function(){this._.close();this.element.appendHtml(this._.pendingHtml.join(""));delete this._.size;this._.pendingHtml=[]},toggle:function(a){var b=this.isMarked(a);b?this.unmark(a):this.mark(a);return!b},hideGroup:function(a){var b=(a= -this.element.getDocument().getById(this._.groups[a]))&&a.getNext();a&&(a.setStyle("display","none"),b&&"ul"==b.getName()&&b.setStyle("display","none"))},hideItem:function(a){this.element.getDocument().getById(this._.items[a]).setStyle("display","none")},showAll:function(){var a=this._.items,b=this._.groups,c=this.element.getDocument(),d;for(d in a)c.getById(a[d]).setStyle("display","");for(var e in b)a=c.getById(b[e]),d=a.getNext(),a.setStyle("display",""),d&&"ul"==d.getName()&&d.setStyle("display", -"")},mark:function(a){this.multiSelect||this.unmarkAll();a=this._.items[a];var b=this.element.getDocument().getById(a);b.addClass("cke_selected");this.element.getDocument().getById(a+"_option").setAttribute("aria-selected",!0);this.onMark&&this.onMark(b)},markFirstDisplayed:function(){var a=this;this._.markFirstDisplayed(function(){a.multiSelect||a.unmarkAll()})},unmark:function(a){var b=this.element.getDocument();a=this._.items[a];var c=b.getById(a);c.removeClass("cke_selected");b.getById(a+"_option").removeAttribute("aria-selected"); -this.onUnmark&&this.onUnmark(c)},unmarkAll:function(){var a=this._.items,b=this.element.getDocument(),c;for(c in a){var d=a[c];b.getById(d).removeClass("cke_selected");b.getById(d+"_option").removeAttribute("aria-selected")}this.onUnmark&&this.onUnmark()},isMarked:function(a){return this.element.getDocument().getById(this._.items[a]).hasClass("cke_selected")},focus:function(a){this._.focusIndex=-1;var b=this.element.getElementsByTag("a"),c,d=-1;if(a)for(c=this.element.getDocument().getById(this._.items[a]).getFirst();a= -b.getItem(++d);){if(a.equals(c)){this._.focusIndex=d;break}}else this.element.focus();c&&setTimeout(function(){c.focus()},0)}}})}});CKEDITOR.plugins.add("richcombo",{requires:"floatpanel,listblock,button",beforeInit:function(e){e.ui.addHandler(CKEDITOR.UI_RICHCOMBO,CKEDITOR.ui.richCombo.handler)}}); -(function(){var e='\x3cspan id\x3d"{id}" class\x3d"cke_combo cke_combo__{name} {cls}" role\x3d"presentation"\x3e\x3cspan id\x3d"{id}_label" class\x3d"cke_combo_label"\x3e{label}\x3c/span\x3e\x3ca class\x3d"cke_combo_button" title\x3d"{title}" tabindex\x3d"-1"'+(CKEDITOR.env.gecko&&!CKEDITOR.env.hc?"":" href\x3d\"javascript:void('{titleJs}')\"")+' hidefocus\x3d"true" role\x3d"button" aria-labelledby\x3d"{id}_label" aria-haspopup\x3d"listbox"',h="";CKEDITOR.env.gecko&&CKEDITOR.env.mac&&(e+=' onkeypress\x3d"return false;"'); -CKEDITOR.env.gecko&&(e+=' onblur\x3d"this.style.cssText \x3d this.style.cssText;"');CKEDITOR.env.ie&&(h='return false;" onmouseup\x3d"CKEDITOR.tools.getMouseButton(event)\x3d\x3dCKEDITOR.MOUSE_BUTTON_LEFT\x26\x26');var e=e+(' onkeydown\x3d"return CKEDITOR.tools.callFunction({keydownFn},event,this);" onfocus\x3d"return CKEDITOR.tools.callFunction({focusFn},event);" onclick\x3d"'+h+'CKEDITOR.tools.callFunction({clickFn},this);return false;"\x3e\x3cspan id\x3d"{id}_text" class\x3d"cke_combo_text cke_combo_inlinelabel"\x3e{label}\x3c/span\x3e\x3cspan class\x3d"cke_combo_open"\x3e\x3cspan class\x3d"cke_combo_arrow"\x3e'+ -(CKEDITOR.env.hc?"\x26#9660;":CKEDITOR.env.air?"\x26nbsp;":"")+"\x3c/span\x3e\x3c/span\x3e\x3c/a\x3e\x3c/span\x3e"),m=CKEDITOR.addTemplate("combo",e);CKEDITOR.UI_RICHCOMBO="richcombo";CKEDITOR.ui.richCombo=CKEDITOR.tools.createClass({$:function(a){CKEDITOR.tools.extend(this,a,{canGroup:!1,title:a.label,modes:{wysiwyg:1},editorFocus:1});a=this.panel||{};delete this.panel;this.id=CKEDITOR.tools.getNextNumber();this.document=a.parent&&a.parent.getDocument()||CKEDITOR.document;a.className="cke_combopanel"; -a.block={multiSelect:a.multiSelect,attributes:a.attributes};a.toolbarRelated=!0;this._={panelDefinition:a,items:{},listeners:[]}},proto:{renderHtml:function(a){var b=[];this.render(a,b);return b.join("")},render:function(a,b){function c(){if(this.getState()!=CKEDITOR.TRISTATE_ON){var b=this.modes[a.mode]?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED;a.readOnly&&!this.readOnly&&(b=CKEDITOR.TRISTATE_DISABLED);this.setState(b);this.setValue("");b!=CKEDITOR.TRISTATE_DISABLED&&this.refresh&&this.refresh()}} -var l=CKEDITOR.env,g,f,d="cke_"+this.id,e=CKEDITOR.tools.addFunction(function(b){f&&(a.unlockSelection(1),f=0);g.execute(b)},this),k=this;g={id:d,combo:this,focus:function(){CKEDITOR.document.getById(d).getChild(1).focus()},execute:function(b){var c=k._;if(c.state!=CKEDITOR.TRISTATE_DISABLED)if(k.createPanel(a),c.on)c.panel.hide();else{k.commit();var d=k.getValue();d?c.list.mark(d):c.list.unmarkAll();c.panel.showBlock(k.id,new CKEDITOR.dom.element(b),4)}},clickFn:e};this._.listeners.push(a.on("activeFilterChange", -c,this));this._.listeners.push(a.on("mode",c,this));this._.listeners.push(a.on("selectionChange",c,this));!this.readOnly&&this._.listeners.push(a.on("readOnly",c,this));var h=CKEDITOR.tools.addFunction(function(a,b){a=new CKEDITOR.dom.event(a);var c=a.getKeystroke();switch(c){case 13:case 32:case 40:CKEDITOR.tools.callFunction(e,b);break;default:g.onkey(g,c)}a.preventDefault()}),n=CKEDITOR.tools.addFunction(function(){g.onfocus&&g.onfocus()});f=0;g.keyDownFn=h;l={id:d,name:this.name||this.command, -label:this.label,title:this.title,cls:this.className||"",titleJs:l.gecko&&!l.hc?"":(this.title||"").replace("'",""),keydownFn:h,focusFn:n,clickFn:e};m.output(l,b);if(this.onRender)this.onRender();return g},createPanel:function(a){if(!this._.panel){var b=this._.panelDefinition,c=this._.panelDefinition.block,e=b.parent||CKEDITOR.document.getBody(),g="cke_combopanel__"+this.name,f=new CKEDITOR.ui.floatPanel(a,e,b),b=f.addListBlock(this.id,c),d=this;f.onShow=function(){this.element.addClass(g);d.setState(CKEDITOR.TRISTATE_ON); -d._.on=1;d.editorFocus&&!a.focusManager.hasFocus&&a.focus();if(d.onOpen)d.onOpen()};f.onHide=function(b){this.element.removeClass(g);d.setState(d.modes&&d.modes[a.mode]?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED);d._.on=0;if(!b&&d.onClose)d.onClose()};f.onEscape=function(){f.hide(1)};b.onClick=function(a,b){d.onClick&&d.onClick.call(d,a,b);f.hide()};this._.panel=f;this._.list=b;f.getBlock(this.id).onHide=function(){d._.on=0;d.setState(CKEDITOR.TRISTATE_OFF)};this.init&&this.init()}},setValue:function(a, -b){this._.value=a;var c=this.document.getById("cke_"+this.id+"_text");c&&(a||b?c.removeClass("cke_combo_inlinelabel"):(b=this.label,c.addClass("cke_combo_inlinelabel")),c.setText("undefined"!=typeof b?b:a));var c="undefined"!=typeof b?b:a,e=this.label,c=c===e?c:c+", "+e;(e=this.document.getById("cke_"+this.id+"_label"))&&e.setText(c)},getValue:function(){return this._.value||""},unmarkAll:function(){this._.list.unmarkAll()},mark:function(a){this._.list.mark(a)},hideItem:function(a){this._.list.hideItem(a)}, -hideGroup:function(a){this._.list.hideGroup(a)},showAll:function(){this._.list.showAll()},add:function(a,b,c){this._.items[a]=c||a;this._.list.add(a,b,c)},startGroup:function(a){this._.list.startGroup(a)},commit:function(){this._.committed||(this._.list.commit(),this._.committed=1,CKEDITOR.ui.fire("ready",this));this._.committed=1},setState:function(a){if(this._.state!=a){var b=this.document.getById("cke_"+this.id),c=b.getElementsByTag("a").getItem(0);b.setState(a,"cke_combo");a==CKEDITOR.TRISTATE_DISABLED? -b.setAttribute("aria-disabled",!0):b.removeAttribute("aria-disabled");c&&c.setAttribute("aria-expanded",a==CKEDITOR.TRISTATE_ON);this._.state=a}},getState:function(){return this._.state},enable:function(){this._.state==CKEDITOR.TRISTATE_DISABLED&&this.setState(this._.lastState)},disable:function(){this._.state!=CKEDITOR.TRISTATE_DISABLED&&(this._.lastState=this._.state,this.setState(CKEDITOR.TRISTATE_DISABLED))},destroy:function(){CKEDITOR.tools.array.forEach(this._.listeners,function(a){a.removeListener()}); -this._.listeners=[]},select:function(a){if(!CKEDITOR.tools.isEmpty(this._.items))for(var b in this._.items)if(a({value:b,text:this._.items[b]})){this.setValue(b);break}}},statics:{handler:{create:function(a){return new CKEDITOR.ui.richCombo(a)}}}});CKEDITOR.ui.prototype.addRichCombo=function(a,b){this.add(a,CKEDITOR.UI_RICHCOMBO,b)}})();(function(){function k(a,b){var c=a.config,e=b.lang,d=new CKEDITOR.style(b.styleDefinition),f=new l({entries:b.entries,styleVariable:b.styleVariable,styleDefinition:b.styleDefinition}),g;a.addCommand(b.commandName,{exec:function(a,b){var c=b.newStyle,d=b.oldStyle,e=a.getSelection().getRanges()[0],f=void 0===c;if(d||c)d&&e.collapsed&&m({editor:a,range:e,style:d}),f?a.removeStyle(d):(d&&!n(d,c)&&a.removeStyle(d),a.applyStyle(c))},refresh:function(a,b){d.checkApplicable(b,a,a.activeFilter)||this.setState(CKEDITOR.TRISTATE_DISABLED)}}); -g=a.getCommand(b.commandName);a.ui.addRichCombo(b.comboName,{label:e.label,title:e.panelTitle,command:b.commandName,toolbar:"styles,"+b.order,defaultValue:"cke-default",allowedContent:d,requiredContent:d,contentTransformations:"span"===b.styleDefinition.element?[[{element:"font",check:"span",left:function(a){return!!a.attributes.size||!!a.attributes.align||!!a.attributes.face},right:function(a){var b=" x-small small medium large x-large xx-large 48px".split(" ");a.name="span";a.attributes.size&&(a.styles["font-size"]= -b[a.attributes.size],delete a.attributes.size);a.attributes.align&&(a.styles["text-align"]=a.attributes.align,delete a.attributes.align);a.attributes.face&&(a.styles["font-family"]=a.attributes.face,delete a.attributes.face)}}]]:null,panel:{css:[CKEDITOR.skin.getPath("editor")].concat(c.contentsCss),multiSelect:!1,attributes:{"aria-label":e.panelTitle}},init:function(){var b="("+a.lang.common.optionDefault+")";this.startGroup(e.panelTitle);this.add(this.defaultValue,b,b);f.addToCombo(this)},onClick:function(c){var d= -this.getValue();a.focus();a.fire("saveSnapshot");a.execCommand(b.commandName,{newStyle:f.getStyle(c),oldStyle:f.getStyle(d)});a.fire("saveSnapshot")},onRender:function(){a.on("selectionChange",function(c){var d=this.getValue();(c=f.getMatchingValue(a,c.data.path))?c!=d&&this.setValue(c):this.setValue("",b.defaultLabel)},this);g.on("state",function(){this.setState(g.state)},this)},refresh:function(){this.setState(g.state)}})}function n(a,b){if(!(a instanceof CKEDITOR.style&&b instanceof CKEDITOR.style))return!1; -var c=function(a,b){var c=a.getDefinition().attributes,e=b.getDefinition().attributes;return CKEDITOR.tools.objectCompare(c,e)}(a,b),e=function(a,b){return CKEDITOR.style.getStyleText(a.getDefinition())===CKEDITOR.style.getStyleText(b.getDefinition())}(a,b);return c&&e}function m(a){var b=a.editor,c=a.range,e=a.style,d,f,g;d=b.elementPath();if(a=d.contains(function(a){return e.checkElementRemovable(a)})){f=c.checkBoundaryOfElement(a,CKEDITOR.START);g=c.checkBoundaryOfElement(a,CKEDITOR.END);if(f&& -g){for(f=c.createBookmark();d=a.getFirst();)d.insertBefore(a);a.remove();c.moveToBookmark(f)}else f||g?c.moveToPosition(a,f?CKEDITOR.POSITION_BEFORE_START:CKEDITOR.POSITION_AFTER_END):(c.splitElement(a),c.moveToPosition(a,CKEDITOR.POSITION_AFTER_END)),h(c,d.elements.slice(),a);b.getSelection().selectRanges([c])}}function h(a,b,c){var e=b.pop();if(e){if(c)return h(a,b,e.equals(c)?null:c);c=e.clone();a.insertNode(c);a.moveToPosition(c,CKEDITOR.POSITION_AFTER_START);h(a,b)}}var l=CKEDITOR.tools.createClass({$:function(a){var b= -a.entries.split(";");this._.data={};this._.names=[];for(var c=0;cCKEDITOR.env.version&&b.enterMode!=CKEDITOR.ENTER_DIV&&e("div");if(CKEDITOR.env.webkit||CKEDITOR.env.ie&&10this.$.offsetHeight){var c=b.createRange();c[33==d?"moveToElementEditStart":"moveToElementEditEnd"](this);c.select();a.data.preventDefault()}});CKEDITOR.env.ie&&this.attachListener(c,"blur",function(){try{c.$.selection.empty()}catch(a){}});CKEDITOR.env.iOS&&this.attachListener(c,"touchend",function(){a.focus()});f=b.document.getElementsByTag("title").getItem(0); -f.data("cke-title",f.getText());CKEDITOR.env.ie&&(b.document.$.title=this._.docTitle);CKEDITOR.tools.setTimeout(function(){"unloaded"==this.status&&(this.status="ready");b.fire("contentDom");this._.isPendingFocus&&(b.focus(),this._.isPendingFocus=!1);setTimeout(function(){b.fire("dataReady")},0)},0,this)}}function w(a){function e(){var d;a.editable().attachListener(a,"selectionChange",function(){var c=a.getSelection().getSelectedElement();c&&(d&&(d.detachEvent("onresizestart",b),d=null),c.$.attachEvent("onresizestart", -b),d=c.$)})}function b(a){a.returnValue=!1}if(CKEDITOR.env.gecko)try{var c=a.document.$;c.execCommand("enableObjectResizing",!1,!a.config.disableObjectResizing);c.execCommand("enableInlineTableEditing",!1,!a.config.disableNativeTableHandles)}catch(f){}else CKEDITOR.env.ie&&11>CKEDITOR.env.version&&a.config.disableObjectResizing&&e()}function x(){var a=[];if(8<=CKEDITOR.document.$.documentMode){a.push("html.CSS1Compat [contenteditable\x3dfalse]{min-height:0 !important}");var e=[],b;for(b in CKEDITOR.dtd.$removeEmpty)e.push("html.CSS1Compat "+ -b+"[contenteditable\x3dfalse]");a.push(e.join(",")+"{display:inline-block}")}else CKEDITOR.env.gecko&&(a.push("html{height:100% !important}"),a.push("img:-moz-broken{-moz-force-broken-image-icon:1;min-width:24px;min-height:24px}"));a.push("html{cursor:text;*cursor:auto}");a.push("img,input,textarea{cursor:default}");return a.join("\n")}var l;CKEDITOR.plugins.add("wysiwygarea",{init:function(a){a.config.fullPage&&a.addFeature({allowedContent:"html head title; style [media,type]; body (*)[id]; meta link [*]", -requiredContent:"body"});a.addMode("wysiwyg",function(e){function b(b){b&&b.removeListener();if(!a.isDestroyed()&&!a.isDetached()&&(a.editable(new l(a,g.getFrameDocument().getBody())),a.setData(a.getData(1),e),t)){if(u)a.on("mode",c,{iframe:g,editor:a,callback:e});a.on("mode",function(){a.status="ready"});f()}}function c(a){a&&a.removeListener();g.on("load",function(){p&&(p=!1,d())})}function f(){m=new MutationObserver(function(b){for(var c=0;c/,'\x3cstyle data-cke-temp\x3d"1"\x3e');f||(h+=CKEDITOR.tools.buildStyleHtml(b.config.contentsCss));var g=c.baseHref?'\x3cbase href\x3d"'+c.baseHref+'" data-cke-temp\x3d"1" /\x3e':"";f&&(a=a.replace(/]*>/i,function(a){b.docType= -d=a;return""}).replace(/<\?xml\s[^\?]*\?>/i,function(a){b.xmlDeclaration=a;return""}));a=b.dataProcessor.toHtml(a);f?(/]/.test(a)||(a="\x3cbody\x3e"+a),/]/.test(a)||(a="\x3chtml\x3e"+a+"\x3c/html\x3e"),/]/.test(a)?/]/.test(a)||(a=a.replace(/]*>/,"$\x26\x3ctitle\x3e\x3c/title\x3e")):a=a.replace(/]*>/,"$\x26\x3chead\x3e\x3ctitle\x3e\x3c/title\x3e\x3c/head\x3e"),g&&(a=a.replace(/]*?>/,"$\x26"+g)),a=a.replace(/<\/head\s*>/,h+"$\x26"),a= -d+a):a=c.docType+'\x3chtml dir\x3d"'+c.contentsLangDirection+'" lang\x3d"'+(c.contentsLanguage||b.langCode)+'"\x3e\x3chead\x3e\x3ctitle\x3e'+this._.docTitle+"\x3c/title\x3e"+g+h+"\x3c/head\x3e\x3cbody"+(c.bodyId?' id\x3d"'+c.bodyId+'"':"")+(c.bodyClass?' class\x3d"'+c.bodyClass+'"':"")+"\x3e"+a+"\x3c/body\x3e\x3c/html\x3e";CKEDITOR.env.gecko&&(a=a.replace(/CKEDITOR.env.version&&(a=a.replace(/]*>/,"$\x26\x3c!-- cke-content-start --\x3e"))); -a=a.replace(/CKEDITOR.env.version&&(c+='\x3cscript id\x3d"cke_shimscrpt"\x3ewindow.parent.CKEDITOR.tools.enableHtml5Elements(document)\x3c/script\x3e');g&&CKEDITOR.env.ie&&10>CKEDITOR.env.version&&(c+='\x3cscript id\x3d"cke_basetagscrpt"\x3evar baseTag \x3d document.querySelector( "base" );baseTag.href \x3d baseTag.href;\x3c/script\x3e');a=a.replace(/(?=\s*<\/(:?head)>)/, -c);this.clearCustomData();this.clearListeners();b.fire("contentDomUnload");var l=this.getDocument();try{l.write(a)}catch(k){setTimeout(function(){l.write(a)},0)}}},getData:function(a){if(a)return this.getHtml();a=this.editor;var e=a.config,b=e.fullPage,c=b&&a.docType,f=b&&a.xmlDeclaration,d=this.getDocument(),d=b?d.getDocumentElement().getOuterHtml():d.getBody().getHtml();CKEDITOR.env.gecko&&e.enterMode!=CKEDITOR.ENTER_BR&&(d=d.replace(/
(?=\s*(:?$|<\/body>))/,""));b&&(d=d.replace(/(a+=l?1:-1))return;a=Math.min(a,c.length);a=Math.max(a,0);b.$.className=CKEDITOR.tools.ltrim(b.$.className.replace(this.classNameRegex,""));0a)return;a=Math.max(a, -0);a=Math.ceil(a/g)*g;b.setStyle(c,a?a+(d.config.indentUnit||"px"):"");""===b.getAttribute("style")&&b.removeAttribute("style")}CKEDITOR.dom.element.setMarker(this.database,b,"indent_processed",1)}}function m(b,c){return"ltr"==(c||b.getComputedStyle("direction"))?"margin-left":"margin-right"}var h=CKEDITOR.dtd.$listItem,p=CKEDITOR.dtd.$list,k=CKEDITOR.TRISTATE_DISABLED,n=CKEDITOR.TRISTATE_OFF;CKEDITOR.plugins.add("indentblock",{requires:"indent",init:function(b){function c(){a.specificDefinition.apply(this, -arguments);this.allowedContent={"div h1 h2 h3 h4 h5 h6 ol p pre ul":{propertiesOnly:!0,styles:d?null:"margin-left,margin-right",classes:d||null}};this.contentTransformations=[["div: splitMarginShorthand"],["h1: splitMarginShorthand"],["h2: splitMarginShorthand"],["h3: splitMarginShorthand"],["h4: splitMarginShorthand"],["h5: splitMarginShorthand"],["h6: splitMarginShorthand"],["ol: splitMarginShorthand"],["p: splitMarginShorthand"],["pre: splitMarginShorthand"],["ul: splitMarginShorthand"]];this.enterBr&& -(this.allowedContent.div=!0);this.requiredContent=(this.enterBr?"div":"p")+(d?"("+d.join(",")+")":"{margin-left}");this.jobs={20:{refresh:function(a,b){var e=b.block||b.blockLimit;if(!e.is(h))var c=e.getAscendant(h),e=c&&b.contains(c)||e;e.is(h)&&(e=e.getParent());if(this.enterBr||this.getContext(b)){if(d){var c=d,e=e.$.className.match(this.classNameRegex),f=this.isIndent,c=e?f?e[1]!=c.slice(-1):!0:f;return c?n:k}return this.isIndent?n:e?CKEDITOR[0>=(parseInt(e.getStyle(m(e)),10)||0)?"TRISTATE_DISABLED": -"TRISTATE_OFF"]:k}return k},exec:function(a){var b=a.getSelection(),b=b&&b.getRanges()[0],c;if(c=a.elementPath().contains(p))f.call(this,c,d);else for(b=b.createIterator(),a=a.config.enterMode,b.enforceRealBlocks=!0,b.enlargeBr=a!=CKEDITOR.ENTER_BR;c=b.getNextParagraph(a==CKEDITOR.ENTER_P?"p":"div");)c.isReadOnly()||f.call(this,c,d);return!0}}}}var a=CKEDITOR.plugins.indent,d=b.config.indentClasses;a.registerCommands(b,{indentblock:new c(b,"indentblock",!0),outdentblock:new c(b,"outdentblock")}); -CKEDITOR.tools.extend(c.prototype,a.specificDefinition.prototype,{context:{div:1,dl:1,h1:1,h2:1,h3:1,h4:1,h5:1,h6:1,ul:1,ol:1,p:1,pre:1,table:1},classNameRegex:d?new RegExp("(?:^|\\s+)("+d.join("|")+")(?\x3d$|\\s)"):null})}})})();(function(){function w(f){function g(b){for(var e=c.startContainer,a=c.endContainer;e&&!e.getParent().equals(b);)e=e.getParent();for(;a&&!a.getParent().equals(b);)a=a.getParent();if(!e||!a)return!1;for(var d=[],h=!1;!h;)e.equals(a)&&(h=!0),d.push(e),e=e.getNext();if(1>d.length)return!1;e=b.getParents(!0);for(a=0;am;a++)h[a].indent+=e;e=CKEDITOR.plugins.list.arrayToList(h,q,null,f.config.enterMode,b.getDirection());if(!k.isIndent){var t;if((t=b.getParent())&&t.is("li"))for(var d=e.listNode.getChildren(), -r=[],l,a=d.count()-1;0<=a;a--)(l=d.getItem(a))&&l.is&&l.is("li")&&r.push(l)}e&&e.listNode.replace(b);if(r&&r.length)for(a=0;ag.length)){f=g[g.length-1].getNext();b=e.createElement(this.type);for(d.push(b);g.length;)d=g.shift(),a=e.createElement("li"),c=d,c.is("pre")||M.test(c.getName())||"false"==c.getAttribute("contenteditable")?d.appendTo(a):(d.copyAttributes(a),h&&d.getDirection()&&(a.removeStyle("direction"), -a.removeAttribute("dir")),d.moveChildren(a),d.remove()),a.appendTo(b);h&&k&&b.setAttribute("dir",h);f?b.insertBefore(f):b.appendTo(l)}}function N(a,l,d){function f(b){if(!(!(c=k[b?"getFirst":"getLast"]())||c.is&&c.isBlockBoundary()||!(p=l.root[b?"getPrevious":"getNext"](CKEDITOR.dom.walker.invisible(!0)))||p.is&&p.isBlockBoundary({br:1})))a.document.createElement("br")[b?"insertBefore":"insertAfter"](c)}for(var e=CKEDITOR.plugins.list.listToArray(l.root,d),g=[],b=0;be[b-1].indent+1){g=e[b-1].indent+1-e[b].indent;for(h=e[b].indent;e[b]&&e[b].indent>=h;)e[b].indent+=g,b++;b--}var k=CKEDITOR.plugins.list.arrayToList(e,d,null,a.config.enterMode,l.root.getAttribute("dir")).listNode,c,p; -f(!0);f();k.replace(l.root);a.fire("contentDomInvalidated")}function C(a,l){this.name=a;this.context=this.type=l;this.allowedContent=l+" li";this.requiredContent=l}function F(a,l,d,f){for(var e,g;e=a[f?"getLast":"getFirst"](O);)(g=e.getDirection(1))!==l.getDirection(1)&&e.setAttribute("dir",g),e.remove(),d?e[f?"insertBefore":"insertAfter"](d):l.append(e,f),d=e}function G(a){function l(d){var f=a[d?"getPrevious":"getNext"](t);f&&f.type==CKEDITOR.NODE_ELEMENT&&f.is(a.getName())&&(F(a,f,null,!d),a.remove(), -a=f)}l();l(1)}function H(a){return a.type==CKEDITOR.NODE_ELEMENT&&(a.getName()in CKEDITOR.dtd.$block||a.getName()in CKEDITOR.dtd.$listItem)&&CKEDITOR.dtd[a.getName()]["#"]}function D(a,l,d){a.fire("saveSnapshot");d.enlarge(CKEDITOR.ENLARGE_LIST_ITEM_CONTENTS);var f=d.extractContents();l.trim(!1,!0);var e=l.createBookmark(),g=new CKEDITOR.dom.elementPath(l.startContainer),b=g.block,g=g.lastElement.getAscendant("li",1)||b,h=new CKEDITOR.dom.elementPath(d.startContainer),k=h.contains(CKEDITOR.dtd.$listItem), -h=h.contains(CKEDITOR.dtd.$list);b?(b=b.getBogus())&&b.remove():h&&(b=h.getPrevious(t))&&z(b)&&b.remove();(b=f.getLast())&&b.type==CKEDITOR.NODE_ELEMENT&&b.is("br")&&b.remove();(b=l.startContainer.getChild(l.startOffset))?f.insertBefore(b):l.startContainer.append(f);k&&(f=A(k))&&(g.contains(k)?(F(f,k.getParent(),k),f.remove()):g.append(f));for(;d.checkStartOfBlock()&&d.checkEndOfBlock();){h=d.startPath();f=h.block;if(!f)break;f.is("li")&&(g=f.getParent(),f.equals(g.getLast(t))&&f.equals(g.getFirst(t))&& -(f=g));d.moveToPosition(f,CKEDITOR.POSITION_BEFORE_START);f.remove()}d=d.clone();f=a.editable();d.setEndAt(f,CKEDITOR.POSITION_BEFORE_END);d=new CKEDITOR.dom.walker(d);d.evaluator=function(a){return t(a)&&!z(a)};(d=d.next())&&d.type==CKEDITOR.NODE_ELEMENT&&d.getName()in CKEDITOR.dtd.$list&&G(d);l.moveToBookmark(e);l.select();a.fire("saveSnapshot")}function A(a){return(a=a.getLast(t))&&a.type==CKEDITOR.NODE_ELEMENT&&a.getName()in u?a:null}var u={ol:1,ul:1},P=CKEDITOR.dom.walker.whitespaces(),I=CKEDITOR.dom.walker.bookmark(), -t=function(a){return!(P(a)||I(a))},z=CKEDITOR.dom.walker.bogus();CKEDITOR.plugins.list={listToArray:function(a,l,d,f,e){if(!u[a.getName()])return[];f||(f=0);d||(d=[]);for(var g=0,b=a.getChildCount();g=b.$.documentMode&&m.append(b.createText(" ")),m.append(c.listNode),c=c.nextIndex;else if(-1==q.indent&&!d&&g){u[g.getName()]?(m=q.element.clone(!1,!0),n!=g.getDirection(1)&&m.setAttribute("dir",n)):m=new CKEDITOR.dom.documentFragment(b);var k=g.getDirection(1)!=n,w=q.element,B=w.getAttribute("class"),E=w.getAttribute("style"),J=m.type==CKEDITOR.NODE_DOCUMENT_FRAGMENT&&(f!=CKEDITOR.ENTER_BR||k||E||B),v,z=q.contents.length,x;for(g=0;gc&&at.version?" ":J,f=a.hotNode&&a.hotNode.getText()==d&&a.element.equals(a.hotNode)&&a.lastCmdDirection===!!c;S(a,function(d){f&&a.hotNode&&a.hotNode.remove();d[c?"insertAfter":"insertBefore"](b);d.setAttributes({"data-cke-magicline-hot":1,"data-cke-magicline-dir":!!c});a.lastCmdDirection=!!c});t.ie||a.enterMode==CKEDITOR.ENTER_BR||a.hotNode.scrollIntoView();a.line.detach()}return function(b){b=b.getSelection().getStartElement(); -var e;b=b.getAscendant(Z,1);if(!aa(a,b)&&b&&!b.equals(a.editable)&&!b.contains(a.editable)){(e=P(b))&&"false"==e.getAttribute("contenteditable")&&(b=e);a.element=b;e=w(a,b,!c);var f;n(e)&&e.is(a.triggers)&&e.is(ma)&&(!w(a,e,!c)||(f=w(a,e,!c))&&n(f)&&f.is(a.triggers))?d(e):(f=O(a,b),n(f)&&(w(a,f,!c)?(b=w(a,f,!c))&&n(b)&&b.is(a.triggers)&&d(f):d(f)))}}}()}}function A(a,c){if(!c||c.type!=CKEDITOR.NODE_ELEMENT||!c.$)return!1;var d=a.line;return d.wrap.equals(c)||d.wrap.contains(c)}function n(a){return a&& -a.type==CKEDITOR.NODE_ELEMENT&&a.$}function u(a){if(!n(a))return!1;var c;(c=ba(a))||(n(a)?(c={left:1,right:1,center:1},c=!(!c[a.getComputedStyle("float")]&&!c[a.getAttribute("align")])):c=!1);return c}function ba(a){return!!{absolute:1,fixed:1}[a.getComputedStyle("position")]}function L(a,c){return n(c)?c.is(a.triggers):null}function aa(a,c){if(!c)return!1;for(var d=c.getParents(1),b=d.length;b--;)for(var e=a.tabuList.length;e--;)if(d[b].hasAttribute(a.tabuList[e]))return!0;return!1}function na(a, -c,d){c=c[d?"getLast":"getFirst"](function(b){return a.isRelevant(b)&&!b.is(oa)});if(!c)return!1;r(a,c);return d?c.size.top>a.mouse.y:c.size.bottom(a.inInlineMode?b.editable.top+b.editable.height/2:Math.min(b.editable.height,b.pane.height)/2),c=c[f?"getLast":"getFirst"](function(a){return!(E(a)||F(a))});if(!c)return null;A(a,c)&&(c=a.line.wrap[f?"getPrevious":"getNext"](function(a){return!(E(a)||F(a))})); -if(!n(c)||u(c)||!L(a,c))return null;r(a,c);return!f&&0<=c.size.top&&q(d.y,0,c.size.top+e)?(a=a.inInlineMode||0===b.scroll.y?C:x,new z([null,c,I,M,a])):f&&c.size.bottom<=b.pane.height&&q(d.y,c.size.bottom-e,b.pane.height)?(a=a.inInlineMode||q(c.size.bottom,b.pane.height-e,b.pane.height)?D:x,new z([c,null,da,M,a])):null}function ea(a){var c=a.mouse,d=a.view,b=a.triggerOffset,e=O(a);if(!e)return null;r(a,e);var b=Math.min(b,0|e.size.outerHeight/2),f=[],k,h;if(q(c.y,e.size.top-1,e.size.top+b))h=!1;else if(q(c.y, -e.size.bottom-b,e.size.bottom+1))h=!0;else return null;if(u(e)||na(a,e,h)||e.getParent().is(fa))return null;var g=w(a,e,!h);if(g){if(g&&g.type==CKEDITOR.NODE_TEXT)return null;if(n(g)){if(u(g)||!L(a,g)||g.getParent().is(fa))return null;f=[g,e][h?"reverse":"concat"]().concat([T,M])}}else e.equals(a.editable[h?"getLast":"getFirst"](a.isRelevant))?(H(a),h&&q(c.y,e.size.bottom-b,d.pane.height)&&q(e.size.bottom,d.pane.height-b,d.pane.height)?k=D:q(c.y,0,e.size.top+b)&&(k=C)):k=x,f=[null,e][h?"reverse": -"concat"]().concat([h?da:I,M,k,e.equals(a.editable[h?"getLast":"getFirst"](a.isRelevant))?h?D:C:x]);return 0 in f?new z(f):null}function U(a,c,d,b){for(var e=c.getDocumentPosition(),f={},k={},h={},g={},l=y.length;l--;)f[y[l]]=parseInt(c.getComputedStyle.call(c,"border-"+y[l]+"-width"),10)||0,h[y[l]]=parseInt(c.getComputedStyle.call(c,"padding-"+y[l]),10)||0,k[y[l]]=parseInt(c.getComputedStyle.call(c,"margin-"+y[l]),10)||0;d&&!b||N(a,b);g.top=e.y-(d?0:a.view.scroll.y);g.left=e.x-(d?0:a.view.scroll.x); -g.outerWidth=c.$.offsetWidth;g.outerHeight=c.$.offsetHeight;g.height=g.outerHeight-(h.top+h.bottom+f.top+f.bottom);g.width=g.outerWidth-(h.left+h.right+f.left+f.right);g.bottom=g.top+g.outerHeight;g.right=g.left+g.outerWidth;a.inInlineMode&&(g.scroll={top:c.$.scrollTop,left:c.$.scrollLeft});return v({border:f,padding:h,margin:k,ignoreScroll:d},g,!0)}function r(a,c,d){if(!n(c))return c.size=null;if(!c.size)c.size={};else if(c.size.ignoreScroll==d&&c.size.date>new Date-ga)return null;return v(c.size, -U(a,c,d),{date:+new Date},!0)}function H(a,c){a.view.editable=U(a,a.editable,c,!0)}function N(a,c){a.view||(a.view={});var d=a.view;if(!(!c&&d&&d.date>new Date-ga)){var b=a.win,d=b.getScrollPosition(),b=b.getViewPaneSize();v(a.view,{scroll:{x:d.x,y:d.y,width:a.doc.$.documentElement.scrollWidth-b.width,height:a.doc.$.documentElement.scrollHeight-b.height},pane:{width:b.width,height:b.height,bottom:b.height+d.y},date:+new Date},!0)}}function pa(a,c,d,b){for(var e=b,f=b,k=0,h=!1,g=!1,l=a.view.pane.height, -p=a.mouse;p.y+ke.left-f.x&&de.top-f.y&&cCKEDITOR.env.version,B=CKEDITOR.dtd,K={},I=128,da=64,T=32,M=16,C=4,D=2,x=1,J=" ",fa=B.$listItem,oa=B.$tableContent,ma=v({},B.$nonEditable,B.$empty),Z=B.$block,ga=100,Q="width:0px;height:0px;padding:0px;margin:0px;display:block;z-index:9999;color:#fff;position:absolute;font-size: 0px;line-height:0px;", -X=Q+"border-color:transparent;display:block;border-style:solid;",W="\x3cspan\x3e"+J+"\x3c/span\x3e";K[CKEDITOR.ENTER_BR]="br";K[CKEDITOR.ENTER_P]="p";K[CKEDITOR.ENTER_DIV]="div";z.prototype={set:function(a,c,d){this.properties=a+c+(d||x);return this},is:function(a){return(this.properties&a)==a}};var ha=function(){function a(a,d){var b=a.$.elementFromPoint(d.x,d.y);return b&&b.nodeType?new CKEDITOR.dom.element(b):null}return function(c,d,b){if(!c.mouse)return null;var e=c.doc,f=c.line.wrap;b=b||c.mouse; -var k=a(e,b);d&&A(c,k)&&(f.hide(),k=a(e,b),f.show());return!k||k.type!=CKEDITOR.NODE_ELEMENT||!k.$||t.ie&&9>t.version&&!c.boundary.equals(k)&&!c.boundary.contains(k)?null:k}}(),E=CKEDITOR.dom.walker.whitespaces(),F=CKEDITOR.dom.walker.nodeType(CKEDITOR.NODE_COMMENT),ia=function(){function a(a){var b=a.element,e,f,k;if(!n(b)||b.contains(a.editable)||b.isReadOnly())return null;k=pa(a,function(a,b){return!b.equals(a)},function(a,b){return ha(a,!0,b)},b);e=k.upper;f=k.lower;if(V(a,e,f))return k.set(T, -8);if(e&&b.contains(e))for(;!e.getParent().equals(b);)e=e.getParent();else e=b.getFirst(function(b){return c(a,b)});if(f&&b.contains(f))for(;!f.getParent().equals(b);)f=f.getParent();else f=b.getLast(function(b){return c(a,b)});if(!e||!f)return null;r(a,e);r(a,f);if(!q(a.mouse.y,e.size.top,f.size.bottom))return null;for(var b=Number.MAX_VALUE,h,g,l,p;f&&!f.equals(e)&&(g=e.getNext(a.isRelevant));)h=Math.abs(ka(a,e,g)-a.mouse.y),h|<\/font>)/,b=b?"microsoft"=== -b:d.test(a);return a&&(f||b)},handle:function(e,b){var d=e.data,c=CKEDITOR.plugins.pastetools.getClipboardData(d,"text/html"),g=CKEDITOR.plugins.pastetools.getClipboardData(d,"text/rtf"),c={dataValue:c,dataTransfer:{"text/rtf":g}};if(!1!==a.fire("pasteFromWord",c)||f){d.dontFilter=!0;if(f||!a.config.pasteFromWordPromptCleanup||confirm(a.lang.pastefromword.confirmCleanup))c.dataValue=CKEDITOR.cleanWord(c.dataValue,a),CKEDITOR.plugins.clipboard.isCustomDataTypesSupported&&k&&CKEDITOR.pasteFilters.image&& -(c.dataValue=CKEDITOR.pasteFilters.image(c.dataValue,a,g)),a.fire("afterPasteFromWord",c),d.dataValue=c.dataValue,!0===a.config.forcePasteAsPlainText?d.type="text":CKEDITOR.plugins.clipboard.isCustomCopyCutSupported||"allow-word"!==a.config.forcePasteAsPlainText||(d.type="html");f=0;b()}}})}})})();(function(){function k(a,f){var g=CKEDITOR.plugins.getPath("preview"),b=a.config,e=a.title,h=function(){var a=location.origin,c=location.pathname;if(!b.baseHref&&!CKEDITOR.env.gecko)return"";if(b.baseHref)return'\x3cbase href\x3d"{HREF}"\x3e'.replace("{HREF}",b.baseHref);c=c.split("/");c.pop();c=c.join("/");return'\x3cbase href\x3d"{HREF}"\x3e'.replace("{HREF}",a+c+"/")}();return b.fullPage?a.getData().replace(//,"$\x26"+h).replace(/[^>]*(?=<\/title>)/,"$\x26 \x26mdash; "+e):b.docType+'\x3chtml dir\x3d"'+ -b.contentsLangDirection+'"\x3e\x3chead\x3e'+h+"\x3ctitle\x3e"+e+"\x3c/title\x3e"+CKEDITOR.tools.buildStyleHtml(b.contentsCss)+'\x3clink rel\x3d"stylesheet" media\x3d"screen" href\x3d"'+g+'styles/screen.css"\x3e\x3c/head\x3e'+function(){var b="\x3cbody\x3e",c=a.document&&a.document.getBody();if(!c)return b;c.getAttribute("id")&&(b=b.replace("\x3e",' id\x3d"'+c.getAttribute("id")+'"\x3e'));c.getAttribute("class")&&(b=b.replace("\x3e",' class\x3d"'+c.getAttribute("class")+'"\x3e'));return b}()+a.getData()+ -(f?"\x3cscript\x3e"+(CKEDITOR.env.ie?"window.onload":"document.onreadystatechange")+" \x3d function() { previewCallback(); } \x3c/script\x3e":"")+"\x3c/body\x3e\x3c/html\x3e"}function l(){var a=window.screen;return{width:Math.round(.8*a.width),height:Math.round(.7*a.height),left:Math.round(.1*a.width)}}function m(){var a=CKEDITOR.plugins.getPath("preview");return CKEDITOR.env.gecko?CKEDITOR.getUrl(a+"preview.html"):""}CKEDITOR.plugins.add("preview",{init:function(a){a.addCommand("preview",{modes:{wysiwyg:1}, -canUndo:!1,readOnly:1,exec:function(){CKEDITOR.plugins.preview.createPreview(a)}});a.ui.addButton&&a.ui.addButton("Preview",{label:a.lang.preview.preview,command:"preview",toolbar:"document,40"})}});CKEDITOR.plugins.preview={createPreview:function(a,f){var g={dataValue:k(a,f)},b=l(),e;e=CKEDITOR.env.ie||CKEDITOR.env.gecko?"javascript:void( (function(){document.open();"+("("+CKEDITOR.tools.fixDomain+")();").replace(/\/\/.*?\n/g,"").replace(/parent\./g,"window.opener.")+"document.write( window.opener._cke_htmlToLoad );document.close();window.opener._cke_htmlToLoad \x3d null;})() )": -null;var h=m(),d,c;if(!1===a.fire("contentPreview",g))return!1;if(e||h)window._cke_htmlToLoad=g.dataValue;d=window.open(h,null,["toolbar\x3dyes,location\x3dno,status\x3dyes,menubar\x3dyes,scrollbars\x3dyes,resizable\x3dyes","width\x3d"+b.width,"height\x3d"+b.height,"left\x3d"+b.left].join());c=new CKEDITOR.dom.window(d);e&&d&&(d.location=e);window._cke_htmlToLoad||(b=d.document,b.open(),b.write(g.dataValue),b.close());f&&(d.previewCallback=function(){"complete"===d.document.readyState&&f(c)},d.previewCallback()); -return c}}})();(function(){CKEDITOR.plugins.add("print",{requires:"preview",init:function(a){a.addCommand("print",CKEDITOR.plugins.print);a.ui.addButton&&a.ui.addButton("Print",{label:a.lang.print.toolbar,command:"print",toolbar:"document,50"})}});CKEDITOR.plugins.print={exec:function(a){CKEDITOR.plugins.preview.createPreview(a,function(a){a=a.$;CKEDITOR.env.gecko?a.print():a.document.execCommand("Print");a.close()})},canUndo:!1,readOnly:1,modes:{wysiwyg:1}}})();CKEDITOR.plugins.add("removeformat",{init:function(a){a.addCommand("removeFormat",CKEDITOR.plugins.removeformat.commands.removeformat);a.ui.addButton&&a.ui.addButton("RemoveFormat",{label:a.lang.removeformat.toolbar,command:"removeFormat",toolbar:"cleanup,10"})}}); -CKEDITOR.plugins.removeformat={commands:{removeformat:{exec:function(a){for(var h=a._.removeFormatRegex||(a._.removeFormatRegex=new RegExp("^(?:"+a.config.removeFormatTags.replace(/,/g,"|")+")$","i")),c=a._.removeAttributes||(a._.removeAttributes=a.config.removeFormatAttributes.split(",")),e=CKEDITOR.plugins.removeformat.filter,m=a.getSelection().getRanges(),n=m.createIterator(),p=function(a){return a.type==CKEDITOR.NODE_ELEMENT},f;f=n.getNextRange();){f.enlarge(CKEDITOR.ENLARGE_INLINE);var l=f.createBookmark(), -b=l.startNode,d=l.endNode,k=function(b){for(var c=a.elementPath(b),f=c.elements,d=1,g;(g=f[d])&&!g.equals(c.block)&&!g.equals(c.blockLimit);d++)h.test(g.getName())&&e(a,g)&&b.breakParent(g)};k(b);if(d)for(k(d),b=b.getNextSourceNode(!0,CKEDITOR.NODE_ELEMENT);b&&!b.equals(d);)if(b.isReadOnly()){if(b.getPosition(d)&CKEDITOR.POSITION_CONTAINS)break;b=b.getNext(p)}else k=b.getNextSourceNode(!1,CKEDITOR.NODE_ELEMENT),"img"==b.getName()&&b.data("cke-realelement")||!e(a,b)||(h.test(b.getName())?b.remove(1): -(b.removeAttributes(c),a.fire("removeFormatCleanup",b))),b=k;f.moveToBookmark(l)}a.forceNextSelectionCheck();a.getSelection().selectRanges(m)}}},filter:function(a,h){for(var c=a._.removeFormatFilters||[],e=0;eCKEDITOR.env.version),g=l?":not([contenteditable\x3dfalse]):not(.cke_show_blocks_off)":"",d,h;for(c=b=e=f="";d=a.pop();)h=a.length?",":"",c+=".cke_show_blocks "+d+g+h,e+=".cke_show_blocks.cke_contents_ltr "+d+g+h,f+=".cke_show_blocks.cke_contents_rtl "+d+g+h,b+=".cke_show_blocks "+d+g+"{background-image:url("+CKEDITOR.getUrl(k+"images/block_"+d+".png")+")}";CKEDITOR.addCss((c+"{background-repeat:no-repeat;border:1px dotted gray;padding-top:8px}").concat(b,e+"{background-position:top left;padding-left:8px}", -f+"{background-position:top right;padding-right:8px}"));l||CKEDITOR.addCss(".cke_show_blocks [contenteditable\x3dfalse],.cke_show_blocks .cke_show_blocks_off{border:none;padding-top:0;background-image:none}.cke_show_blocks.cke_contents_rtl [contenteditable\x3dfalse],.cke_show_blocks.cke_contents_rtl .cke_show_blocks_off{padding-right:0}.cke_show_blocks.cke_contents_ltr [contenteditable\x3dfalse],.cke_show_blocks.cke_contents_ltr .cke_show_blocks_off{padding-left:0}")},init:function(a){function c(){b.refresh(a)} -if(!a.blockless){var b=a.addCommand("showblocks",k);b.canUndo=!1;a.config.startupOutlineBlocks&&b.setState(CKEDITOR.TRISTATE_ON);a.ui.addButton&&a.ui.addButton("ShowBlocks",{label:a.lang.showblocks.toolbar,command:"showblocks",toolbar:"tools,20"});a.on("mode",function(){b.state!=CKEDITOR.TRISTATE_DISABLED&&b.refresh(a)});a.elementMode==CKEDITOR.ELEMENT_MODE_INLINE&&(a.on("focus",c),a.on("blur",c));a.on("contentDom",function(){b.state!=CKEDITOR.TRISTATE_DISABLED&&b.refresh(a)})}}})})();(function(){var f={preserveState:!0,editorFocus:!1,readOnly:1,exec:function(a){this.toggleState();this.refresh(a)},refresh:function(a){if(a.document){var b=this.state==CKEDITOR.TRISTATE_ON?"attachClass":"removeClass";a.editable()[b]("cke_show_borders")}}};CKEDITOR.plugins.add("showborders",{modes:{wysiwyg:1},onLoad:function(){var a;a=(CKEDITOR.env.ie6Compat?[".%1 table.%2,",".%1 table.%2 td, .%1 table.%2 th","{","border : #d3d3d3 1px dotted","}"]:".%1 table.%2,;.%1 table.%2 \x3e tr \x3e td, .%1 table.%2 \x3e tr \x3e th,;.%1 table.%2 \x3e tbody \x3e tr \x3e td, .%1 table.%2 \x3e tbody \x3e tr \x3e th,;.%1 table.%2 \x3e thead \x3e tr \x3e td, .%1 table.%2 \x3e thead \x3e tr \x3e th,;.%1 table.%2 \x3e tfoot \x3e tr \x3e td, .%1 table.%2 \x3e tfoot \x3e tr \x3e th;{;border : #d3d3d3 1px dotted;}".split(";")).join("").replace(/%2/g, -"cke_show_border").replace(/%1/g,"cke_show_borders ");CKEDITOR.addCss(a)},init:function(a){var b=a.addCommand("showborders",f);b.canUndo=!1;!1!==a.config.startupShowBorders&&b.setState(CKEDITOR.TRISTATE_ON);a.on("mode",function(){b.state!=CKEDITOR.TRISTATE_DISABLED&&b.refresh(a)},null,null,100);a.on("contentDom",function(){b.state!=CKEDITOR.TRISTATE_DISABLED&&b.refresh(a)});a.on("removeFormatCleanup",function(d){d=d.data;a.getCommand("showborders").state==CKEDITOR.TRISTATE_ON&&d.is("table")&&(!d.hasAttribute("border")|| -0>=parseInt(d.getAttribute("border"),10))&&d.addClass("cke_show_border")})},afterInit:function(a){var b=a.dataProcessor;a=b&&b.dataFilter;b=b&&b.htmlFilter;a&&a.addRules({elements:{table:function(a){a=a.attributes;var b=a["class"],c=parseInt(a.border,10);c&&!(0>=c)||b&&-1!=b.indexOf("cke_show_border")||(a["class"]=(b||"")+" cke_show_border")}}});b&&b.addRules({elements:{table:function(a){a=a.attributes;var b=a["class"];b&&(a["class"]=b.replace("cke_show_border","").replace(/\s{2}/," ").replace(/^\s+|\s+$/, -""))}}})}});CKEDITOR.on("dialogDefinition",function(a){var b=a.data.name;if("table"==b||"tableProperties"==b)if(a=a.data.definition,b=a.getContents("info").get("txtBorder"),b.commit=CKEDITOR.tools.override(b.commit,function(a){return function(b,c){a.apply(this,arguments);var e=parseInt(this.getValue(),10);c[!e||0>=e?"addClass":"removeClass"]("cke_show_border")}}),a=(a=a.getContents("advanced"))&&a.get("advCSSClasses"))a.setup=CKEDITOR.tools.override(a.setup,function(a){return function(){a.apply(this, -arguments);this.setValue(this.getValue().replace(/cke_show_border/,""))}}),a.commit=CKEDITOR.tools.override(a.commit,function(a){return function(b,c){a.apply(this,arguments);parseInt(c.getAttribute("border"),10)||c.addClass("cke_show_border")}})})})();(function(){CKEDITOR.plugins.add("sourcearea",{init:function(a){function d(){var a=e&&this.equals(CKEDITOR.document.getActive());this.hide();this.setStyle("height",this.getParent().$.clientHeight+"px");this.setStyle("width",this.getParent().$.clientWidth+"px");this.show();a&&this.focus()}if(a.elementMode!=CKEDITOR.ELEMENT_MODE_INLINE){var f=CKEDITOR.plugins.sourcearea;a.addMode("source",function(e){var b=a.ui.space("contents").getDocument().createElement("textarea");b.setStyles(CKEDITOR.tools.extend({width:CKEDITOR.env.ie7Compat? -"99%":"100%",height:"100%",resize:"none",outline:"none","text-align":"left"},CKEDITOR.tools.cssVendorPrefix("tab-size",a.config.sourceAreaTabSize||4)));b.setAttribute("dir","ltr");b.addClass("cke_source").addClass("cke_reset").addClass("cke_enable_context_menu");a.ui.space("contents").append(b);b=a.editable(new c(a,b));b.setData(a.getData(1));CKEDITOR.env.ie&&(b.attachListener(a,"resize",d,b),b.attachListener(CKEDITOR.document.getWindow(),"resize",d,b),CKEDITOR.tools.setTimeout(d,0,b));a.fire("ariaWidget", -this);e()});a.addCommand("source",f.commands.source);a.ui.addButton&&a.ui.addButton("Source",{isToggle:!0,label:a.lang.sourcearea.toolbar,command:"source",toolbar:"mode,10"});a.on("mode",function(){a.getCommand("source").setState("source"==a.mode?CKEDITOR.TRISTATE_ON:CKEDITOR.TRISTATE_OFF)});var e=CKEDITOR.env.ie&&9==CKEDITOR.env.version}}});var c=CKEDITOR.tools.createClass({base:CKEDITOR.editable,proto:{setData:function(a){this.setValue(a);this.status="ready";this.editor.fire("dataReady")},getData:function(){return this.getValue()}, -insertHtml:function(){},insertElement:function(){},insertText:function(){},setReadOnly:function(a){this[(a?"set":"remove")+"Attribute"]("readOnly","readonly")},detach:function(){c.baseProto.detach.call(this);this.clearCustomData();this.remove()}}})})(); -CKEDITOR.plugins.sourcearea={commands:{source:{modes:{wysiwyg:1,source:1},editorFocus:!1,readOnly:1,exec:function(c){"wysiwyg"==c.mode&&c.fire("saveSnapshot");c.getCommand("source").setState(CKEDITOR.TRISTATE_DISABLED);c.setMode("source"==c.mode?"wysiwyg":"source")},canUndo:!1}}};CKEDITOR.plugins.add("specialchar",{availableLangs:{af:1,ar:1,az:1,bg:1,ca:1,cs:1,cy:1,da:1,de:1,"de-ch":1,el:1,en:1,"en-au":1,"en-ca":1,"en-gb":1,eo:1,es:1,"es-mx":1,et:1,eu:1,fa:1,fi:1,fr:1,"fr-ca":1,gl:1,he:1,hr:1,hu:1,id:1,it:1,ja:1,km:1,ko:1,ku:1,lt:1,lv:1,nb:1,nl:1,no:1,oc:1,pl:1,pt:1,"pt-br":1,ro:1,ru:1,si:1,sk:1,sl:1,sq:1,sr:1,"sr-latn":1,sv:1,th:1,tr:1,tt:1,ug:1,uk:1,vi:1,zh:1,"zh-cn":1},requires:"dialog",init:function(a){var c=this;CKEDITOR.dialog.add("specialchar",this.path+"dialogs/specialchar.js"); -a.addCommand("specialchar",{exec:function(){var b=a.langCode,b=c.availableLangs[b]?b:c.availableLangs[b.replace(/-.*/,"")]?b.replace(/-.*/,""):"en";CKEDITOR.scriptLoader.load(CKEDITOR.getUrl(c.path+"dialogs/lang/"+b+".js"),function(){CKEDITOR.tools.extend(a.lang.specialchar,c.langEntries[b]);a.openDialog("specialchar")})},modes:{wysiwyg:1},canUndo:!1});a.ui.addButton&&a.ui.addButton("SpecialChar",{label:a.lang.specialchar.toolbar,command:"specialchar",toolbar:"insert,50"})}}); -CKEDITOR.config.specialChars="! \x26quot; # $ % \x26amp; ' ( ) * + - . / 0 1 2 3 4 5 6 7 8 9 : ; \x26lt; \x3d \x26gt; ? @ A B C D E F G H I J K L M N O P Q R S T U V W X Y Z [ ] ^ _ ` a b c d e f g h i j k l m n o p q r s t u v w x y z { | } ~ \x26euro; \x26lsquo; \x26rsquo; \x26ldquo; \x26rdquo; \x26ndash; \x26mdash; \x26iexcl; \x26cent; \x26pound; \x26curren; \x26yen; \x26brvbar; \x26sect; \x26uml; \x26copy; \x26ordf; \x26laquo; \x26not; \x26reg; \x26macr; \x26deg; \x26sup2; \x26sup3; \x26acute; \x26micro; \x26para; \x26middot; \x26cedil; \x26sup1; \x26ordm; \x26raquo; \x26frac14; \x26frac12; \x26frac34; \x26iquest; \x26Agrave; \x26Aacute; \x26Acirc; \x26Atilde; \x26Auml; \x26Aring; \x26AElig; \x26Ccedil; \x26Egrave; \x26Eacute; \x26Ecirc; \x26Euml; \x26Igrave; \x26Iacute; \x26Icirc; \x26Iuml; \x26ETH; \x26Ntilde; \x26Ograve; \x26Oacute; \x26Ocirc; \x26Otilde; \x26Ouml; \x26times; \x26Oslash; \x26Ugrave; \x26Uacute; \x26Ucirc; \x26Uuml; \x26Yacute; \x26THORN; \x26szlig; \x26agrave; \x26aacute; \x26acirc; \x26atilde; \x26auml; \x26aring; \x26aelig; \x26ccedil; \x26egrave; \x26eacute; \x26ecirc; \x26euml; \x26igrave; \x26iacute; \x26icirc; \x26iuml; \x26eth; \x26ntilde; \x26ograve; \x26oacute; \x26ocirc; \x26otilde; \x26ouml; \x26divide; \x26oslash; \x26ugrave; \x26uacute; \x26ucirc; \x26uuml; \x26yacute; \x26thorn; \x26yuml; \x26OElig; \x26oelig; \x26#372; \x26#374 \x26#373 \x26#375; \x26sbquo; \x26#8219; \x26bdquo; \x26hellip; \x26trade; \x26#9658; \x26bull; \x26rarr; \x26rArr; \x26hArr; \x26diams; \x26asymp;".split(" ");CKEDITOR.plugins.add("scayt",{requires:"menubutton,dialog",tabToOpen:null,dialogName:"scaytDialog",onLoad:function(a){"moono-lisa"==(CKEDITOR.skinName||a.config.skin)&&CKEDITOR.document.appendStyleSheet(CKEDITOR.getUrl(this.path+"skins/"+CKEDITOR.skin.name+"/scayt.css"));CKEDITOR.document.appendStyleSheet(CKEDITOR.getUrl(this.path+"dialogs/dialog.css"));var c=!1;CKEDITOR.on("instanceLoaded",function(a){if(!c&&CKEDITOR.plugins.autocomplete){c=!0;var b=CKEDITOR.plugins.autocomplete.prototype.getModel; -CKEDITOR.plugins.autocomplete.prototype.getModel=function(a){var d=this.editor;a=b.bind(this)(a);a.on("change-isActive",function(a){a.data?d.fire("autocompletePanelShow"):d.fire("autocompletePanelHide")});return a}}})},init:function(a){var c=this,d=CKEDITOR.plugins.scayt;this.bindEvents(a);this.parseConfig(a);this.addRule(a);CKEDITOR.dialog.add(this.dialogName,CKEDITOR.getUrl(this.path+"dialogs/options.js"));this.addMenuItems(a);var b=a.lang.scayt,e=CKEDITOR.env;a.ui.add("Scayt",CKEDITOR.UI_MENUBUTTON, -{label:b.text_title,title:a.plugins.wsc?a.lang.wsc.title:b.text_title,modes:{wysiwyg:!(e.ie&&(8>e.version||e.quirks))},toolbar:"spellchecker,20",refresh:function(){var b=a.ui.instances.Scayt.getState();a.scayt&&(b=d.state.scayt[a.name]?CKEDITOR.TRISTATE_ON:CKEDITOR.TRISTATE_OFF);a.fire("scaytButtonState",b)},onRender:function(){var b=this;a.on("scaytButtonState",function(a){void 0!==typeof a.data&&b.setState(a.data)})},onMenu:function(){var b=a.scayt;a.getMenuItem("scaytToggle").label=a.lang.scayt[b&& -d.state.scayt[a.name]?"btn_disable":"btn_enable"];var c={scaytToggle:CKEDITOR.TRISTATE_OFF,scaytOptions:b?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED,scaytLangs:b?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED,scaytDict:b?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED,scaytAbout:b?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED,WSC:a.plugins.wsc?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED};a.config.scayt_uiTabs[0]||delete c.scaytOptions;a.config.scayt_uiTabs[1]||delete c.scaytLangs; -a.config.scayt_uiTabs[2]||delete c.scaytDict;b&&!CKEDITOR.plugins.scayt.isNewUdSupported(b)&&(delete c.scaytDict,a.config.scayt_uiTabs[2]=0,CKEDITOR.plugins.scayt.alarmCompatibilityMessage());return c}});a.contextMenu&&a.addMenuItems&&(a.contextMenu.addListener(function(b,d){var e=a.scayt,l,m;e&&(m=e.getSelectionNode())&&(l=c.menuGenerator(a,m),e.showBanner("."+a.contextMenu._.definition.panel.className.split(" ").join(" .")));return l}),a.contextMenu._.onHide=CKEDITOR.tools.override(a.contextMenu._.onHide, -function(b){return function(){var d=a.scayt;d&&d.hideBanner();return b.apply(this)}}))},addMenuItems:function(a){var c=this,d=CKEDITOR.plugins.scayt;a.addMenuGroup("scaytButton");for(var b=a.config.scayt_contextMenuItemsOrder.split("|"),e=0;ea.config.scayt_maxSuggestions)a.config.scayt_maxSuggestions=3;if(void 0=== -a.config.scayt_minWordLength||"number"!=typeof a.config.scayt_minWordLength||1>a.config.scayt_minWordLength)a.config.scayt_minWordLength=3;if(void 0===a.config.scayt_customDictionaryIds||"string"!==typeof a.config.scayt_customDictionaryIds)a.config.scayt_customDictionaryIds="";if(void 0===a.config.scayt_userDictionaryName||"string"!==typeof a.config.scayt_userDictionaryName)a.config.scayt_userDictionaryName=null;if("string"===typeof a.config.scayt_uiTabs&&3===a.config.scayt_uiTabs.split(",").length){var d= -[],b=[];a.config.scayt_uiTabs=a.config.scayt_uiTabs.split(",");CKEDITOR.tools.search(a.config.scayt_uiTabs,function(a){1===Number(a)||0===Number(a)?(b.push(!0),d.push(Number(a))):b.push(!1)});null===CKEDITOR.tools.search(b,!1)?a.config.scayt_uiTabs=d:a.config.scayt_uiTabs=[1,1,1]}else a.config.scayt_uiTabs=[1,1,1];"string"!=typeof a.config.scayt_serviceProtocol&&(a.config.scayt_serviceProtocol=null);"string"!=typeof a.config.scayt_serviceHost&&(a.config.scayt_serviceHost=null);"string"!=typeof a.config.scayt_servicePort&& -(a.config.scayt_servicePort=null);"string"!=typeof a.config.scayt_servicePath&&(a.config.scayt_servicePath=null);a.config.scayt_moreSuggestions||(a.config.scayt_moreSuggestions="on");"string"!==typeof a.config.scayt_customerId&&(a.config.scayt_customerId="1:WvF0D4-UtPqN1-43nkD4-NKvUm2-daQqk3-LmNiI-z7Ysb4-mwry24-T8YrS3-Q2tpq2");"string"!==typeof a.config.scayt_customPunctuation&&(a.config.scayt_customPunctuation="-");"string"!==typeof a.config.scayt_srcUrl&&(a.config.scayt_srcUrl="https://svc.webspellchecker.net/spellcheck31/wscbundle/wscbundle.js"); -"boolean"!==typeof CKEDITOR.config.scayt_handleCheckDirty&&(CKEDITOR.config.scayt_handleCheckDirty=!0);"boolean"!==typeof CKEDITOR.config.scayt_handleUndoRedo&&(CKEDITOR.config.scayt_handleUndoRedo=!0);CKEDITOR.config.scayt_handleUndoRedo=CKEDITOR.plugins.undo?CKEDITOR.config.scayt_handleUndoRedo:!1;a.config.scayt_ignoreAllCapsWords&&"boolean"!==typeof a.config.scayt_ignoreAllCapsWords&&(a.config.scayt_ignoreAllCapsWords=!1);a.config.scayt_ignoreDomainNames&&"boolean"!==typeof a.config.scayt_ignoreDomainNames&& -(a.config.scayt_ignoreDomainNames=!1);a.config.scayt_ignoreWordsWithMixedCases&&"boolean"!==typeof a.config.scayt_ignoreWordsWithMixedCases&&(a.config.scayt_ignoreWordsWithMixedCases=!1);a.config.scayt_ignoreWordsWithNumbers&&"boolean"!==typeof a.config.scayt_ignoreWordsWithNumbers&&(a.config.scayt_ignoreWordsWithNumbers=!1);if(a.config.scayt_disableOptionsStorage){var c=CKEDITOR.tools.isArray(a.config.scayt_disableOptionsStorage)?a.config.scayt_disableOptionsStorage:"string"===typeof a.config.scayt_disableOptionsStorage? -[a.config.scayt_disableOptionsStorage]:void 0,e="all options lang ignore-all-caps-words ignore-domain-names ignore-words-with-mixed-cases ignore-words-with-numbers".split(" "),f=["lang","ignore-all-caps-words","ignore-domain-names","ignore-words-with-mixed-cases","ignore-words-with-numbers"],g=CKEDITOR.tools.search,k=CKEDITOR.tools.indexOf;a.config.scayt_disableOptionsStorage=function(a){for(var b=[],d=0;de)return b;if(fthis.warningCounter&&(console.warn("You are using the latest version of SCAYT plugin for CKEditor with the old application version. In order to have access to the newest features, it is recommended to upgrade the application version to latest one as well. Contact us for more details at support@webspellchecker.net."), -this.warningCounter+=1)},isNewUdSupported:function(a){return a.getUserDictionary?!0:!1},reloadMarkup:function(a){var c;a&&(c=a.getScaytLangList(),a.reloadMarkup?a.reloadMarkup():(this.alarmCompatibilityMessage(),c&&c.ltr&&c.rtl&&a.fire("startSpellCheck, startGrammarCheck")))},replaceOldOptionsNames:function(a){for(var c in a)c in this.backCompatibilityMap&&(a[this.backCompatibilityMap[c]]=a[c],delete a[c])},createScayt:function(a){var c=this,d=CKEDITOR.plugins.scayt;this.loadScaytLibrary(a,function(a){function e(a){return new SCAYT.CKSCAYT(a, -function(){},function(){})}var f;a.window&&(f="BODY"==a.editable().$.nodeName?a.window.getFrame():a.editable());if(f){f={lang:a.config.scayt_sLang,container:f.$,customDictionary:a.config.scayt_customDictionaryIds,userDictionaryName:a.config.scayt_userDictionaryName,localization:a.langCode,customer_id:a.config.scayt_customerId,customPunctuation:a.config.scayt_customPunctuation,debug:a.config.scayt_debug,data_attribute_name:c.options.data_attribute_name,misspelled_word_class:c.options.misspelled_word_class, -problem_grammar_data_attribute:c.options.problem_grammar_data_attribute,problem_grammar_class:c.options.problem_grammar_class,"options-to-restore":a.config.scayt_disableOptionsStorage,focused:a.editable().hasFocus,ignoreElementsRegex:a.config.scayt_elementsToIgnore,ignoreGraytElementsRegex:a.config.grayt_elementsToIgnore,minWordLength:a.config.scayt_minWordLength,graytAutoStartup:a.config.grayt_autoStartup,charsToObserve:d.charsToObserve};a.config.scayt_serviceProtocol&&(f.service_protocol=a.config.scayt_serviceProtocol); -a.config.scayt_serviceHost&&(f.service_host=a.config.scayt_serviceHost);a.config.scayt_servicePort&&(f.service_port=a.config.scayt_servicePort);a.config.scayt_servicePath&&(f.service_path=a.config.scayt_servicePath);"boolean"===typeof a.config.scayt_ignoreAllCapsWords&&(f["ignore-all-caps-words"]=a.config.scayt_ignoreAllCapsWords);"boolean"===typeof a.config.scayt_ignoreDomainNames&&(f["ignore-domain-names"]=a.config.scayt_ignoreDomainNames);"boolean"===typeof a.config.scayt_ignoreWordsWithMixedCases&& -(f["ignore-words-with-mixed-cases"]=a.config.scayt_ignoreWordsWithMixedCases);"boolean"===typeof a.config.scayt_ignoreWordsWithNumbers&&(f["ignore-words-with-numbers"]=a.config.scayt_ignoreWordsWithNumbers);var g;try{g=e(f)}catch(k){c.alarmCompatibilityMessage(),delete f.charsToObserve,g=e(f)}g.subscribe("suggestionListSend",function(a){for(var b={},d=[],c=0;c=g)for(b=this.getNextSourceNode(k,CKEDITOR.NODE_ELEMENT);b;){if(b.isVisible()&&0===b.getTabIndex()){d=b;break}b=b.getNextSourceNode(!1,CKEDITOR.NODE_ELEMENT)}else for(b=this.getDocument().getBody().getFirst();b=b.getNextSourceNode(!1,CKEDITOR.NODE_ELEMENT);){if(!f)if(!c&&b.equals(this)){if(c=!0,k){if(!(b=b.getNextSourceNode(!0,CKEDITOR.NODE_ELEMENT)))break;f=1}}else c&&!this.contains(b)&& -(f=1);if(b.isVisible()&&!(0>(a=b.getTabIndex()))){if(f&&a==g){d=b;break}a>g&&(!d||!e||a(b=a.getTabIndex())))if(0>=g){if(f&&0===b){d=a;break}b>e&&(d=a,e=b)}else{if(f&&b==g){d=a;break}be)&&(d=a,e=b)}}d&&d.focus()};CKEDITOR.plugins.add("table",{requires:"dialog",init:function(a){function f(c){return CKEDITOR.tools.extend(c||{},{contextSensitive:1,refresh:function(c,b){this.setState(b.contains("table",1)?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED)}})}if(!a.blockless){var e=a.lang.table;a.addCommand("table",new CKEDITOR.dialogCommand("table",{context:"table",allowedContent:"table{width,height,border-collapse}[align,border,cellpadding,cellspacing,summary];caption tbody thead tfoot;th td tr[scope];td{border*,background-color,vertical-align,width,height}[colspan,rowspan];"+ -(a.plugins.dialogadvtab?"table"+a.plugins.dialogadvtab.allowedContent():""),requiredContent:"table",contentTransformations:[["table{width}: sizeToStyle","table[width]: sizeToAttribute"],["td: splitBorderShorthand"],[{element:"table",right:function(c){if(c.styles){var a;if(c.styles.border)a=CKEDITOR.tools.style.parse.border(c.styles.border);else if(CKEDITOR.env.ie&&8===CKEDITOR.env.version){var b=c.styles;b["border-left"]&&b["border-left"]===b["border-right"]&&b["border-right"]===b["border-top"]&& -b["border-top"]===b["border-bottom"]&&(a=CKEDITOR.tools.style.parse.border(b["border-top"]))}a&&a.style&&"solid"===a.style&&a.width&&0!==parseFloat(a.width)&&(c.attributes.border=1);"collapse"==c.styles["border-collapse"]&&(c.attributes.cellspacing=0)}}}]]}));a.addCommand("tableProperties",new CKEDITOR.dialogCommand("tableProperties",f()));a.addCommand("tableDelete",f({exec:function(a){var d=a.elementPath().contains("table",1);if(d){var b=d.getParent(),e=a.editable();1!=b.getChildCount()||b.is("td", -"th")||b.equals(e)||(d=b);a=a.createRange();a.moveToPosition(d,CKEDITOR.POSITION_BEFORE_START);d.remove();a.select()}}}));a.ui.addButton&&a.ui.addButton("Table",{label:e.toolbar,command:"table",toolbar:"insert,30"});CKEDITOR.dialog.add("table",this.path+"dialogs/table.js");CKEDITOR.dialog.add("tableProperties",this.path+"dialogs/table.js");a.addMenuItems&&a.addMenuItems({table:{label:e.menu,command:"tableProperties",group:"table",order:5},tabledelete:{label:e.deleteTable,command:"tableDelete",group:"table", -order:1}});a.on("doubleclick",function(a){a.data.element.is("table")&&(a.data.dialog="tableProperties")});a.contextMenu&&a.contextMenu.addListener(function(){return{tabledelete:CKEDITOR.TRISTATE_OFF,table:CKEDITOR.TRISTATE_OFF}})}}});(function(){function q(d,f){function b(a){return f?f.contains(a)&&a.getAscendant("table",!0).equals(f):!0}function c(a){var b=/^(?:td|th)$/;0b)b=e}return b}function u(d,f){for(var b= -D(d)?d:q(d),c=b[0].getAscendant("table"),e=w(b,1),b=w(b),h=f?e:b,a=CKEDITOR.tools.buildTableMap(c),c=[],e=[],b=[],k=a.length,g=0;gg?new CKEDITOR.dom.element(a[0][g+1]):k&&-1!==a[0][k-1].cellIndex?new CKEDITOR.dom.element(a[0][k-1]):new CKEDITOR.dom.element(c.$.parentNode); -m.length==d&&(b[0].moveToPosition(c,CKEDITOR.POSITION_AFTER_END),b[0].select(),c.remove());return k}function t(d,f){var b=d.getStartElement().getAscendant({td:1,th:1},!0);if(b){var c=b.clone();c.appendBogus();f?c.insertBefore(b):c.insertAfter(b)}}function z(d){if(d instanceof CKEDITOR.dom.selection){var f=d.getRanges(),b=q(d),c=b[0]&&b[0].getAscendant("table"),e;a:{var h=0;e=b.length-1;for(var a={},k,g;k=b[h++];)CKEDITOR.dom.element.setMarker(a,k,"delete_cell",!0);for(h=0;k=b[h++];)if((g=k.getPrevious())&& -!g.getCustomData("delete_cell")||(g=k.getNext())&&!g.getCustomData("delete_cell")){CKEDITOR.dom.element.clearAllMarkers(a);e=g;break a}CKEDITOR.dom.element.clearAllMarkers(a);h=b[0].getParent();(h=h.getPrevious())?e=h.getLast():(h=b[e].getParent(),e=(h=h.getNext())?h.getChild(0):null)}d.reset();for(d=b.length-1;0<=d;d--)z(b[d]);e?p(e,!0):c&&(f[0].moveToPosition(c,CKEDITOR.POSITION_BEFORE_START),f[0].select(),c.remove())}else d instanceof CKEDITOR.dom.element&&(f=d.getParent(),1==f.getChildCount()? -f.remove():d.remove())}function p(d,f){var b=d.getDocument(),c=CKEDITOR.document;CKEDITOR.env.ie&&10==CKEDITOR.env.version&&(c.focus(),b.focus());b=new CKEDITOR.dom.range(b);b["moveToElementEdit"+(f?"End":"Start")](d)||(b.selectNodeContents(d),b.collapse(f?!1:!0));b.select(!0)}function A(d,f,b){d=d[f];if("undefined"==typeof b)return d;for(f=0;d&&fc.length)||(e=d.getCommonAncestor())&&e.type==CKEDITOR.NODE_ELEMENT&&e.is("table"))return!1;d=c[0];e=d.getAscendant("table");var h=CKEDITOR.tools.buildTableMap(e),a=h.length,k=h[0].length,g=d.getParent().$.rowIndex,m=A(h,g,d),l;if(f){var n;try{var p=parseInt(d.getAttribute("rowspan"),10)||1;l=parseInt(d.getAttribute("colspan"),10)||1;n=h["up"==f?g-p:"down"==f?g+p:g]["left"==f?m-l:"right"==f?m+l:m]}catch(x){return!1}if(!n||d.$==n)return!1;c["up"==f||"left"==f?"unshift":"push"](new CKEDITOR.dom.element(n))}f= -d.getDocument();var r=g,p=n=0,u=!b&&new CKEDITOR.dom.documentFragment(f),w=0;for(f=0;f=k?d.removeAttribute("rowSpan"):d.$.rowSpan=n;n>=a?d.removeAttribute("colSpan"):d.$.colSpan=p;b=new CKEDITOR.dom.nodeList(e.$.rows);c=b.count();for(f=c-1;0<=f;f--)e=b.getItem(f),e.$.cells.length||(e.remove(),c++);return d}function C(d,f){var b=q(d);if(1k){c.insertBefore(new CKEDITOR.dom.element(l));break}else l=null;l||e.append(c)}else for(g=m=1,e=c.clone(),e.insertAfter(c),e.append(c=b.clone()),l=A(h,a),k=0;kv);x++){y[u+x]||(y[u+x]=[]);for(var C=0;C=w)break}}return y}; -CKEDITOR.config.tabletools_scopedHeaders=!1;(function(){function n(a,b){return CKEDITOR.tools.array.reduce(b,function(a,b){return b(a)},a)}var g=[CKEDITOR.CTRL+90,CKEDITOR.CTRL+89,CKEDITOR.CTRL+CKEDITOR.SHIFT+90],p={8:1,46:1};CKEDITOR.plugins.add("undo",{init:function(a){function b(a){d.enabled&&!1!==a.data.command.canUndo&&d.save()}function c(){d.enabled=a.readOnly?!1:"wysiwyg"==a.mode;d.onChange()}var d=a.undoManager=new e(a),l=d.editingHandler=new k(d),f=a.addCommand("undo",{exec:function(){d.undo()&&(a.selectionChange(),this.fire("afterUndo"))}, -startDisabled:!0,canUndo:!1}),h=a.addCommand("redo",{exec:function(){d.redo()&&(a.selectionChange(),this.fire("afterRedo"))},startDisabled:!0,canUndo:!1});a.setKeystroke([[g[0],"undo"],[g[1],"redo"],[g[2],"redo"]]);d.onChange=function(){f.setState(d.undoable()?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED);h.setState(d.redoable()?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED)};a.on("beforeCommandExec",b);a.on("afterCommandExec",b);a.on("saveSnapshot",function(a){d.save(a.data&&a.data.contentOnly)}); -a.on("contentDom",l.attachListeners,l);a.on("instanceReady",function(){a.fire("saveSnapshot")});a.on("beforeModeUnload",function(){"wysiwyg"==a.mode&&d.save(!0)});a.on("mode",c);a.on("readOnly",c);a.ui.addButton&&(a.ui.addButton("Undo",{label:a.lang.undo.undo,command:"undo",toolbar:"undo,10"}),a.ui.addButton("Redo",{label:a.lang.undo.redo,command:"redo",toolbar:"undo,20"}));a.resetUndo=function(){d.reset();a.fire("saveSnapshot")};a.on("updateSnapshot",function(){d.currentImage&&d.update()});a.on("lockSnapshot", -function(a){a=a.data;d.lock(a&&a.dontUpdate,a&&a.forceUpdate)});a.on("unlockSnapshot",d.unlock,d)}});CKEDITOR.plugins.undo={};var e=CKEDITOR.plugins.undo.UndoManager=function(a){this.strokesRecorded=[0,0];this.locked=null;this.previousKeyGroup=-1;this.limit=a.config.undoStackSize||20;this.strokesLimit=25;this._filterRules=[];this.editor=a;this.reset();CKEDITOR.env.ie&&this.addFilterRule(function(a){return a.replace(/\s+data-cke-expando=".*?"/g,"")})};e.prototype={type:function(a,b){var c=e.getKeyGroup(a), -d=this.strokesRecorded[c]+1;b=b||d>=this.strokesLimit;this.typing||(this.hasUndo=this.typing=!0,this.hasRedo=!1,this.onChange());b?(d=0,this.editor.fire("saveSnapshot")):this.editor.fire("change");this.strokesRecorded[c]=d;this.previousKeyGroup=c},keyGroupChanged:function(a){return e.getKeyGroup(a)!=this.previousKeyGroup},reset:function(){this.snapshots=[];this.index=-1;this.currentImage=null;this.hasRedo=this.hasUndo=!1;this.locked=null;this.resetType()},resetType:function(){this.strokesRecorded= -[0,0];this.typing=!1;this.previousKeyGroup=-1},refreshState:function(){this.hasUndo=!!this.getNextImage(!0);this.hasRedo=!!this.getNextImage(!1);this.resetType();this.onChange()},save:function(a,b,c){var d=this.editor;if(this.locked||"ready"!=d.status||"wysiwyg"!=d.mode)return!1;var e=d.editable();if(!e||"ready"!=e.status)return!1;e=this.snapshots;b||(b=new f(d));if(!1===b.contents)return!1;if(this.currentImage)if(b.equalsContent(this.currentImage)){if(a||b.equalsSelection(this.currentImage))return!1}else!1!== -c&&d.fire("change");e.splice(this.index+1,e.length-this.index-1);e.length==this.limit&&e.shift();this.index=e.push(b)-1;this.currentImage=b;!1!==c&&this.refreshState();return!0},restoreImage:function(a){var b=this.editor,c;a.bookmarks&&(b.focus(),c=b.getSelection());this.locked={level:999};this.editor.loadSnapshot(a.contents);a.bookmarks?c.selectBookmarks(a.bookmarks):CKEDITOR.env.ie&&(c=this.editor.document.getBody().$.createTextRange(),c.collapse(!0),c.select());this.locked=null;this.index=a.index; -this.currentImage=this.snapshots[this.index];this.update();this.refreshState();b.fire("change")},getNextImage:function(a){var b=this.snapshots,c=this.currentImage,d;if(c)if(a)for(d=this.index-1;0<=d;d--){if(a=b[d],!c.equalsContent(a))return a.index=d,a}else for(d=this.index+1;d=this.undoManager.strokesLimit&&(this.undoManager.type(a.keyCode,!0),this.keyEventsStack.resetInputs())}},onKeyup:function(a){var b=this.undoManager;a=a.data.getKey();var c=this.keyEventsStack.getTotalInputs();this.keyEventsStack.remove(a);if(!(e.ieFunctionalKeysBug(a)&&this.lastKeydownImage&&this.lastKeydownImage.equalsContent(new f(b.editor, -!0))))if(0=this.rect.right||a<=this.rect.top||a>=this.rect.bottom)&&this.hideVisible();(0>=b||b>=this.winTopPane.width||0>=a||a>=this.winTopPane.height)&&this.hideVisible()},this);b.attachListener(a,"resize",c);b.attachListener(a,"mode",g);a.on("destroy",g);this.lineTpl=(new CKEDITOR.template('\x3cdiv data-cke-lineutils-line\x3d"1" class\x3d"cke_reset_all" style\x3d"{lineStyle}"\x3e\x3cspan style\x3d"{tipLeftStyle}"\x3e\x26nbsp;\x3c/span\x3e\x3cspan style\x3d"{tipRightStyle}"\x3e\x26nbsp;\x3c/span\x3e\x3c/div\x3e')).output({lineStyle:CKEDITOR.tools.writeCssText(CKEDITOR.tools.extend({}, -t,this.lineStyle,!0)),tipLeftStyle:CKEDITOR.tools.writeCssText(CKEDITOR.tools.extend({},q,{left:"0px","border-left-color":"red","border-width":"6px 0 6px 6px"},this.tipCss,this.tipLeftStyle,!0)),tipRightStyle:CKEDITOR.tools.writeCssText(CKEDITOR.tools.extend({},q,{right:"0px","border-right-color":"red","border-width":"6px 6px 6px 0"},this.tipCss,this.tipRightStyle,!0))})}function l(a){var d;if(d=a&&a.type==CKEDITOR.NODE_ELEMENT)d=!(r[a.getComputedStyle("float")]||r[a.getAttribute("align")]);return d&& -!u[a.getComputedStyle("position")]}CKEDITOR.plugins.add("lineutils");CKEDITOR.LINEUTILS_BEFORE=1;CKEDITOR.LINEUTILS_AFTER=2;CKEDITOR.LINEUTILS_INSIDE=4;m.prototype={start:function(a){var d=this,b=this.editor,c=this.doc,e,g,f,h,k=CKEDITOR.tools.eventsBuffer(50,function(){b.readOnly||"wysiwyg"!=b.mode||(d.relations={},(g=c.$.elementFromPoint(f,h))&&g.nodeType&&(e=new CKEDITOR.dom.element(g),d.traverseSearch(e),isNaN(f+h)||d.pixelSearch(e,f,h),a&&a(d.relations,f,h)))});this.listener=this.editable.attachListener(this.target, -"mousemove",function(a){f=a.data.$.clientX;h=a.data.$.clientY;k.input()});this.editable.attachListener(this.inline?this.editable:this.frame,"mouseout",function(){k.reset()})},stop:function(){this.listener&&this.listener.removeListener()},getRange:function(){var a={};a[CKEDITOR.LINEUTILS_BEFORE]=CKEDITOR.POSITION_BEFORE_START;a[CKEDITOR.LINEUTILS_AFTER]=CKEDITOR.POSITION_AFTER_END;a[CKEDITOR.LINEUTILS_INSIDE]=CKEDITOR.POSITION_AFTER_START;return function(d){var b=this.editor.createRange();b.moveToPosition(this.relations[d.uid].element, -a[d.type]);return b}}(),store:function(){function a(a,b,c){var e=a.getUniqueId();e in c?c[e].type|=b:c[e]={element:a,type:b}}return function(d,b){var c;b&CKEDITOR.LINEUTILS_AFTER&&l(c=d.getNext())&&c.isVisible()&&(a(c,CKEDITOR.LINEUTILS_BEFORE,this.relations),b^=CKEDITOR.LINEUTILS_AFTER);b&CKEDITOR.LINEUTILS_INSIDE&&l(c=d.getFirst())&&c.isVisible()&&(a(c,CKEDITOR.LINEUTILS_BEFORE,this.relations),b^=CKEDITOR.LINEUTILS_INSIDE);a(d,b,this.relations)}}(),traverseSearch:function(a){var d,b,c;do if(c=a.$["data-cke-expando"], -!(c&&c in this.relations)){if(a.equals(this.editable))break;if(l(a))for(d in this.lookups)(b=this.lookups[d](a))&&this.store(a,b)}while((!a||a.type!=CKEDITOR.NODE_ELEMENT||"true"!=a.getAttribute("contenteditable"))&&(a=a.getParent()))},pixelSearch:function(){function a(a,c,e,g,f){for(var h=0,k;f(e);){e+=g;if(25==++h)break;if(k=this.doc.$.elementFromPoint(c,e))if(k==a)h=0;else if(d(a,k)&&(h=0,l(k=new CKEDITOR.dom.element(k))))return k}}var d=CKEDITOR.env.ie||CKEDITOR.env.webkit?function(a,c){return a.contains(c)}: -function(a,c){return!!(a.compareDocumentPosition(c)&16)};return function(b,c,d){var g=this.win.getViewPaneSize().height,f=a.call(this,b.$,c,d,-1,function(a){return 0this.rect.bottom)return!1;this.inline? -e.left=b.elementRect.left-this.rect.relativeX:(0[^<]*c});0>d&&(d=a._.upcasts.length);a._.upcasts.splice(d,0,[CKEDITOR.tools.bind(b,e),e.name,c])}var e=b.upcast,f=b.upcastPriority||10;e&&("string"==typeof e?d(c,b,f):d(e,b,f))}function x(a,b){a.focused=null;if(b.isInited()){var c=b.editor.checkDirty();a.fire("widgetBlurred", -{widget:b});b.setFocused(!1);!c&&b.editor.resetDirty()}}function T(a){a=a.data;if("wysiwyg"==this.editor.mode){var b=this.editor.editable(),c=this.instances,d,e,f,g;if(b){for(d in c)c[d].isReady()&&!b.contains(c[d].wrapper)&&this.destroy(c[d],!0);if(a&&a.initOnlyNew)c=this.initOnAll();else{var l=b.find(".cke_widget_wrapper"),c=[];d=0;for(e=l.count();da.selected.length||G(c,"cut"===b.name)}var c=a.editor;c.on("contentDom",function(){var a=c.editable(); -a.attachListener(a,"copy",b);a.attachListener(a,"cut",b)})}function U(a){function b(){var a=e.getSelection();if(a&&(a=a.getRanges()[0])&&!a.collapsed){var b=c(a.startContainer),d=c(a.endContainer);!b&&d?(a.setEndBefore(d.wrapper),a.select()):b&&!d&&(a.setStartAfter(b.wrapper),a.select())}}function c(a){return a?a.type==CKEDITOR.NODE_TEXT?c(a.getParent()):e.widgets.getByElement(a):null}function d(){a.fire("checkSelection")}var e=a.editor;e.on("selectionCheck",d);e.on("contentDom",function(){e.editable().attachListener(e, -"key",function(){setTimeout(d,10)})});if(!CKEDITOR.env.ie)a.on("checkSelection",b);a.on("checkSelection",a.checkSelection,a);e.on("selectionChange",function(b){var c=(b=h.getNestedEditable(e.editable(),b.data.selection.getStartElement()))&&a.getByElement(b),d=a.widgetHoldingFocusedEditable;d?d===c&&d.focusedEditable.equals(b)||(p(a,d,null),c&&b&&p(a,c,b)):c&&b&&p(a,c,b)});e.on("dataReady",function(){H(a).commit()});e.on("blur",function(){var b;(b=a.focused)&&x(a,b);(b=a.widgetHoldingFocusedEditable)&& -p(a,b,null)})}function S(a){var b=a.editor,c={};b.on("toDataFormat",function(b){var e=CKEDITOR.tools.getNextNumber(),f=[];b.data.downcastingSessionId=e;c[e]=f;b.data.dataValue.forEach(function(b){var c=b.attributes,e;if("data-cke-widget-white-space"in c){e=z(b);var d=A(b);e.parent.attributes["data-cke-white-space-first"]&&(e.value=e.value.replace(/^ /g," "));d.parent.attributes["data-cke-white-space-last"]&&(d.value=d.value.replace(/ $/g," "))}if("data-cke-widget-id"in c){if(c=a.instances[c["data-cke-widget-id"]])e= -b.getFirst(h.isParserWidgetElement),f.push({wrapper:b,element:e,widget:c,editables:{}}),e&&"1"!=e.attributes["data-cke-widget-keep-attr"]&&delete e.attributes["data-widget"]}else if("data-cke-widget-editable"in c)return 0CKEDITOR.tools.indexOf(b,a)&&c.push(a);a=CKEDITOR.tools.indexOf(d,a);0<=a&&d.splice(a,1);return this},focus:function(a){e=a;return this},commit:function(){var f=a.focused!==e,g,l;a.editor.fire("lockSnapshot");for(f&&(g=a.focused)&&x(a,g);g=d.pop();)b.splice(CKEDITOR.tools.indexOf(b, -g),1),g.isInited()&&(l=g.editor.checkDirty(),g.setSelected(!1),!l&&g.editor.resetDirty());f&&e&&(l=a.editor.checkDirty(),a.focused=e,a.fire("widgetFocused",{widget:e}),e.setFocused(!0),!l&&a.editor.resetDirty());for(;g=c.pop();)b.push(g),g.setSelected(!0);a.editor.fire("unlockSnapshot")}}}function ha(a){a&&a.addFilterRule(function(a){return a.replace(/\s*cke_widget_selected/g,"").replace(/\s*cke_widget_focused/g,"")})}function I(a,b,c){var d=0;b=J(b);var e=a.data.classes||{},f;if(b){for(e=CKEDITOR.tools.clone(e);f= -b.pop();)c?e[f]||(d=e[f]=1):e[f]&&(delete e[f],d=1);d&&a.setData("classes",e)}}function K(a){a.cancel()}function L(a,b){var c=function(a){return a==CKEDITOR.ENTER_BR?"br":a==CKEDITOR.ENTER_DIV?"div":"p"}(a.editor.config.enterMode),d=new CKEDITOR.dom.element(c);"br"!==c&&d.appendBogus();"after"===b?d.insertAfter(a.wrapper):d.insertBefore(a.wrapper);(function(b){var c=a.editor.createRange();c.setStart(b,0);a.editor.getSelection().selectRanges([c])})(d)}function G(a,b){var c=a.widgets.focused,d,e,f; -u.hasCopyBin(a)||(e=new u(a,{beforeDestroy:function(){!b&&c&&c.focus();f&&a.getSelection().selectBookmarks(f);d&&CKEDITOR.plugins.widgetselection.addFillers(a.editable())},afterDestroy:function(){b&&!a.readOnly&&(c?a.widgets.del(c):a.extractSelectedHtml(),a.fire("saveSnapshot"))}}),c||(d=CKEDITOR.env.webkit&&CKEDITOR.plugins.widgetselection.isWholeContentSelected(a.editable()),f=a.getSelection().createBookmarks(!0)),e.handle(F(a)))}function J(a){return(a=(a=a.getDefinition().attributes)&&a["class"])? -a.split(/\s+/):null}function M(){var a=CKEDITOR.document.getActive(),b=this.editor,c=b.editable();(c.isInline()?c:b.document.getWindow().getFrame()).equals(a)&&b.focusManager.focus(c)}function N(){CKEDITOR.env.gecko&&this.editor.unlockSelection();CKEDITOR.env.webkit||(this.editor.forceNextSelectionCheck(),this.editor.selectionChange(1))}function F(a){var b=a.getSelectedHtml(!0);if(a.widgets.focused)return a.widgets.focused.getClipboardHtml();a.once("toDataFormat",function(a){a.data.widgetsCopy=!0}, -null,null,-1);return a.dataProcessor.toDataFormat(b)}function Z(a,b){var c=a.editor.config.widget_keystrokeInsertLineBefore,d=a.editor.config.widget_keystrokeInsertLineAfter;ia(a);O(a);ja(a);P(a);ka(a);la(a);ma(a);if(CKEDITOR.env.ie&&9>CKEDITOR.env.version)a.wrapper.on("dragstart",function(b){var c=b.data.getTarget();h.getNestedEditable(a,c)||a.inline&&h.isDomDragHandler(c)||b.data.preventDefault()});a.wrapper.removeClass("cke_widget_new");a.element.addClass("cke_widget_element");a.on("key",function(b){b= -b.data.keyCode;if(b==c)L(a,"before"),a.editor.fire("saveSnapshot");else if(b==d)L(a,"after"),a.editor.fire("saveSnapshot");else if(13==b)a.edit();else{if(b==CKEDITOR.CTRL+67||b==CKEDITOR.CTRL+88){G(a.editor,b==CKEDITOR.CTRL+88);return}if(b in Q||CKEDITOR.CTRL&b||CKEDITOR.ALT&b)return}return!1},null,null,999);a.on("doubleclick",function(b){a.edit()&&b.cancel()});if(b.data)a.on("data",b.data);if(b.edit)a.on("edit",b.edit)}function ia(a){(a.wrapper=a.element.getParent()).setAttribute("data-cke-widget-id", -a.id)}function O(a,b){a.partSelectors||(a.partSelectors=a.parts);if(a.parts){var c={},d,e;for(e in a.partSelectors)b||!a.parts[e]||"string"==typeof a.parts[e]?(d=a.wrapper.findOne(a.partSelectors[e]),c[e]=d):c[e]=a.parts[e];a.parts=c}}function ja(a){var b=a.editables,c,d;a.editables={};if(a.editables)for(c in b)d=b[c],a.initEditable(c,"string"==typeof d?{selector:d}:d)}function P(a){if(!0===a.mask)na(a);else if(a.mask){var b=new CKEDITOR.tools.buffers.throttle(250,oa,a),c=CKEDITOR.env.gecko?300:0, -d,e;a.on("focus",function(){b.input();d=a.editor.on("change",b.input);e=a.on("blur",function(){d.removeListener();e.removeListener()})});a.editor.on("instanceReady",function(){setTimeout(function(){b.input()},c)});a.editor.on("mode",function(){setTimeout(function(){b.input()},c)});if(CKEDITOR.env.gecko){var f=a.element.find("img");CKEDITOR.tools.array.forEach(f.toArray(),function(a){a.on("load",function(){b.input()})})}for(var g in a.editables)a.editables[g].on("focus",function(){a.editor.on("change", -b.input);e&&e.removeListener()}),a.editables[g].on("blur",function(){a.editor.removeListener("change",b.input)});b.input()}}function na(a){var b=a.wrapper.findOne(".cke_widget_mask");b||(b=new CKEDITOR.dom.element("img",a.editor.document),b.setAttributes({src:CKEDITOR.tools.transparentImageData,"class":"cke_reset cke_widget_mask"}),a.wrapper.append(b));a.mask=b}function oa(){if(this.wrapper){this.maskPart=this.maskPart||this.mask;var a=this.parts[this.maskPart],b;if(a&&"string"!=typeof a){b=this.wrapper.findOne(".cke_widget_partial_mask"); -b||(b=new CKEDITOR.dom.element("img",this.editor.document),b.setAttributes({src:CKEDITOR.tools.transparentImageData,"class":"cke_reset cke_widget_partial_mask"}),this.wrapper.append(b));this.mask=b;var c=b.$,d=a.$,e=!(c.offsetTop==d.offsetTop&&c.offsetLeft==d.offsetLeft);if(c.offsetWidth!=d.offsetWidth||c.offsetHeight!=d.offsetHeight||e)c=a.getParent(),d=CKEDITOR.plugins.widget.isDomWidget(c),b.setStyles({top:a.$.offsetTop+(d?0:c.$.offsetTop)+"px",left:a.$.offsetLeft+(d?0:c.$.offsetLeft)+"px",width:a.$.offsetWidth+ -"px",height:a.$.offsetHeight+"px"})}}}function ka(a){if(a.draggable){var b=a.editor,c=a.wrapper.getLast(h.isDomDragHandlerContainer),d;c?d=c.findOne("img"):(c=new CKEDITOR.dom.element("span",b.document),c.setAttributes({"class":"cke_reset cke_widget_drag_handler_container",style:"background:rgba(220,220,220,0.5);background-image:url("+b.plugins.widget.path+"images/handle.png);display:none;"}),d=new CKEDITOR.dom.element("img",b.document),d.setAttributes({"class":"cke_reset cke_widget_drag_handler", -"data-cke-widget-drag-handler":"1",src:CKEDITOR.tools.transparentImageData,width:15,title:b.lang.widget.move,height:15,role:"presentation"}),a.inline&&d.setAttribute("draggable","true"),c.append(d),a.wrapper.append(c));a.wrapper.on("dragover",function(a){a.data.preventDefault()});a.wrapper.on("mouseenter",a.updateDragHandlerPosition,a);setTimeout(function(){a.on("data",a.updateDragHandlerPosition,a)},50);if(!a.inline&&(d.on("mousedown",pa,a),CKEDITOR.env.ie&&9>CKEDITOR.env.version))d.on("dragstart", -function(a){a.data.preventDefault(!0)});a.dragHandlerContainer=c}}function pa(a){function b(){var b;for(r.reset();b=l.pop();)b.removeListener();var c=k;b=a.sender;var d=this.repository.finder,e=this.repository.liner,f=this.editor,g=this.editor.editable();CKEDITOR.tools.isEmpty(e.visible)||(c=d.getRange(c[0]),this.focus(),f.fire("drop",{dropRange:c,target:c.startContainer}));g.removeClass("cke_widget_dragging");e.hideVisible();f.fire("dragend",{target:b})}if(CKEDITOR.tools.getMouseButton(a)===CKEDITOR.MOUSE_BUTTON_LEFT){var c= -this.repository.finder,d=this.repository.locator,e=this.repository.liner,f=this.editor,g=f.editable(),l=[],k=[],h,m;this.repository._.draggedWidget=this;var w=c.greedySearch(),r=CKEDITOR.tools.eventsBuffer(50,function(){h=d.locate(w);k=d.sort(m,1);k.length&&(e.prepare(w,h),e.placeLine(k[0]),e.cleanup())});g.addClass("cke_widget_dragging");l.push(g.on("mousemove",function(a){m=a.data.$.clientY;r.input()}));f.fire("dragstart",{target:a.sender});l.push(f.document.once("mouseup",b,this));g.isInline()|| -l.push(CKEDITOR.document.once("mouseup",b,this))}}function la(a){var b=null;a.on("data",function(){var a=this.data.classes,d;if(b!=a){for(d in b)a&&a[d]||this.removeClass(d);for(d in a)this.addClass(d);b=a}})}function ma(a){a.on("data",function(){if(a.wrapper){var b=this.getLabel?this.getLabel():this.editor.lang.widget.label.replace(/%1/,this.pathName||this.element.getName());a.wrapper.setAttribute("role","region");a.wrapper.setAttribute("aria-label",b)}},null,null,9999)}function v(a){a.element.data("cke-widget-data", -encodeURIComponent(JSON.stringify(a.data)))}function qa(){function a(){}function b(a,b,c){return c&&this.checkElement(a)?(a=c.widgets.getByElement(a,!0))&&a.checkStyleActive(this):!1}function c(a){function b(a,c,d){for(var e=a.length,f=0;f)?(?:<(?:div|span)(?: style="[^"]+")?>)?]*data-cke-copybin-start="1"[^>]*>.?<\/span>([\s\S]+)]*data-cke-copybin-end="1"[^>]*>.?<\/span>(?:<\/(?:div|span)>)?(?:<\/(?:div|span)>)?$/i, -Q={37:1,38:1,39:1,40:1,8:1,46:1};Q[CKEDITOR.SHIFT+121]=1;var u=CKEDITOR.tools.createClass({$:function(a,b){this._.createCopyBin(a,b);this._.createListeners(b)},_:{createCopyBin:function(a){var b=a.document,c=CKEDITOR.env.edge&&16<=CKEDITOR.env.version,d=!a.blockless&&!CKEDITOR.env.ie||c?"div":"span",c=b.createElement(d),b=b.createElement(d);b.setAttributes({id:"cke_copybin","data-cke-temp":"1"});c.setStyles({position:"absolute",width:"1px",height:"1px",overflow:"hidden"});c.setStyle("ltr"==a.config.contentsLangDirection? -"left":"right","-5000px");this.editor=a;this.copyBin=c;this.container=b},createListeners:function(a){a&&(a.beforeDestroy&&(this.beforeDestroy=a.beforeDestroy),a.afterDestroy&&(this.afterDestroy=a.afterDestroy))}},proto:{handle:function(a){var b=this.copyBin,c=this.editor,d=this.container,e=CKEDITOR.env.ie&&9>CKEDITOR.env.version,f=c.document.getDocumentElement().$,g=c.createRange(),h=this,k=CKEDITOR.env.mac&&CKEDITOR.env.webkit,n=k?100:0,m=window.requestAnimationFrame&&!k?requestAnimationFrame:setTimeout, -p,r,q;b.setHtml('\x3cspan data-cke-copybin-start\x3d"1"\x3e​\x3c/span\x3e'+a+'\x3cspan data-cke-copybin-end\x3d"1"\x3e​\x3c/span\x3e');c.fire("lockSnapshot");d.append(b);c.editable().append(d);p=c.on("selectionChange",K,null,null,0);r=c.widgets.on("checkSelection",K,null,null,0);e&&(q=f.scrollTop);g.selectNodeContents(b);g.select();e&&(f.scrollTop=q);return new CKEDITOR.tools.promise(function(a){m(function(){h.beforeDestroy&&h.beforeDestroy();d.remove();p.removeListener();r.removeListener();c.fire("unlockSnapshot"); -h.afterDestroy&&h.afterDestroy();a()},n)})}},statics:{hasCopyBin:function(a){return!!u.getCopyBin(a)},getCopyBin:function(a){return a.document.getById("cke_copybin")}}});CKEDITOR.plugins.widget=h;h.repository=q;h.nestedEditable=t})();CKEDITOR.config.widget_keystrokeInsertLineBefore=CKEDITOR.SHIFT+CKEDITOR.ALT+13;CKEDITOR.config.widget_keystrokeInsertLineAfter=CKEDITOR.SHIFT+13;CKEDITOR.config.plugins='dialogui,dialog,about,a11yhelp,dialogadvtab,basicstyles,bidi,blockquote,notification,button,toolbar,clipboard,panelbutton,panel,floatpanel,colorbutton,colordialog,xml,ajax,templates,menu,contextmenu,copyformatting,div,resize,elementspath,enterkey,entities,popup,filetools,filebrowser,find,floatingspace,listblock,richcombo,font,fakeobjects,forms,format,horizontalrule,htmlwriter,iframe,wysiwygarea,image,indent,indentblock,indentlist,smiley,justify,menubutton,language,link,list,liststyle,magicline,maximize,newpage,pagebreak,pastetext,pastetools,pastefromword,preview,print,removeformat,save,selectall,showblocks,showborders,sourcearea,specialchar,scayt,stylescombo,tab,table,tabletools,undo,flash,lineutils,widgetselection,widget';CKEDITOR.config.skin='moono-lisa';(function() {var setIcons = function(icons, strip) {var path = CKEDITOR.getUrl( 'plugins/' + strip );icons = icons.split( ',' );for ( var i = 0; i < icons.length; i++ )CKEDITOR.skin.icons[ icons[ i ] ] = { path: path, offset: -icons[ ++i ], bgsize : icons[ ++i ] };};if (CKEDITOR.env.hidpi) setIcons('about,0,,bold,24,,italic,48,,strike,72,,subscript,96,,superscript,120,,underline,144,,bidiltr,168,,bidirtl,192,,blockquote,216,,copy-rtl,240,,copy,264,,cut-rtl,288,,cut,312,,paste-rtl,336,,paste,360,,bgcolor,384,,textcolor,408,,templates-rtl,432,,templates,456,,copyformatting,480,,creatediv,504,,find-rtl,528,,find,552,,replace,576,,button,600,,checkbox,624,,form,648,,hiddenfield,672,,imagebutton,696,,radio,720,,select-rtl,744,,select,768,,textarea-rtl,792,,textarea,816,,textfield-rtl,840,,textfield,864,,horizontalrule,888,,iframe,912,,image,936,,indent-rtl,960,,indent,984,,outdent-rtl,1008,,outdent,1032,,smiley,1056,,justifyblock,1080,,justifycenter,1104,,justifyleft,1128,,justifyright,1152,,language,1176,,anchor-rtl,1200,,anchor,1224,,link,1248,,unlink,1272,,bulletedlist-rtl,1296,,bulletedlist,1320,,numberedlist-rtl,1344,,numberedlist,1368,,maximize,1392,,newpage-rtl,1416,,newpage,1440,,pagebreak-rtl,1464,,pagebreak,1488,,pastetext-rtl,1512,,pastetext,1536,,pastefromword-rtl,1560,,pastefromword,1584,,preview-rtl,1608,,preview,1632,,print,1656,,removeformat,1680,,save,1704,,selectall,1728,,showblocks-rtl,1752,,showblocks,1776,,source-rtl,1800,,source,1824,,specialchar,1848,,scayt,1872,,table,1896,,redo-rtl,1920,,redo,1944,,undo-rtl,1968,,undo,1992,','icons_hidpi.png');else setIcons('about,0,auto,bold,24,auto,italic,48,auto,strike,72,auto,subscript,96,auto,superscript,120,auto,underline,144,auto,bidiltr,168,auto,bidirtl,192,auto,blockquote,216,auto,copy-rtl,240,auto,copy,264,auto,cut-rtl,288,auto,cut,312,auto,paste-rtl,336,auto,paste,360,auto,bgcolor,384,auto,textcolor,408,auto,templates-rtl,432,auto,templates,456,auto,copyformatting,480,auto,creatediv,504,auto,find-rtl,528,auto,find,552,auto,replace,576,auto,button,600,auto,checkbox,624,auto,form,648,auto,hiddenfield,672,auto,imagebutton,696,auto,radio,720,auto,select-rtl,744,auto,select,768,auto,textarea-rtl,792,auto,textarea,816,auto,textfield-rtl,840,auto,textfield,864,auto,horizontalrule,888,auto,iframe,912,auto,image,936,auto,indent-rtl,960,auto,indent,984,auto,outdent-rtl,1008,auto,outdent,1032,auto,smiley,1056,auto,justifyblock,1080,auto,justifycenter,1104,auto,justifyleft,1128,auto,justifyright,1152,auto,language,1176,auto,anchor-rtl,1200,auto,anchor,1224,auto,link,1248,auto,unlink,1272,auto,bulletedlist-rtl,1296,auto,bulletedlist,1320,auto,numberedlist-rtl,1344,auto,numberedlist,1368,auto,maximize,1392,auto,newpage-rtl,1416,auto,newpage,1440,auto,pagebreak-rtl,1464,auto,pagebreak,1488,auto,pastetext-rtl,1512,auto,pastetext,1536,auto,pastefromword-rtl,1560,auto,pastefromword,1584,auto,preview-rtl,1608,auto,preview,1632,auto,print,1656,auto,removeformat,1680,auto,save,1704,auto,selectall,1728,auto,showblocks-rtl,1752,auto,showblocks,1776,auto,source-rtl,1800,auto,source,1824,auto,specialchar,1848,auto,scayt,1872,auto,table,1896,auto,redo-rtl,1920,auto,redo,1944,auto,undo-rtl,1968,auto,undo,1992,auto','icons.png');})();CKEDITOR.lang.languages={"af":1,"sq":1,"ar":1,"az":1,"eu":1,"bn":1,"bs":1,"bg":1,"ca":1,"zh-cn":1,"zh":1,"hr":1,"cs":1,"da":1,"nl":1,"en":1,"en-au":1,"en-ca":1,"en-gb":1,"eo":1,"et":1,"fo":1,"fi":1,"fr":1,"fr-ca":1,"gl":1,"ka":1,"de":1,"de-ch":1,"el":1,"gu":1,"he":1,"hi":1,"hu":1,"is":1,"id":1,"it":1,"ja":1,"km":1,"ko":1,"ku":1,"lv":1,"lt":1,"mk":1,"ms":1,"mn":1,"no":1,"nb":1,"oc":1,"fa":1,"pl":1,"pt-br":1,"pt":1,"ro":1,"ru":1,"sr":1,"sr-latn":1,"si":1,"sk":1,"sl":1,"es":1,"sv":1,"tt":1,"th":1,"tr":1,"ug":1,"uk":1,"vi":1,"cy":1};}()); - -/***/ }), - -/***/ "./private/js/ckeditor4_plugins/cmsdialog/plugin.js": -/*!**********************************************************!*\ - !*** ./private/js/ckeditor4_plugins/cmsdialog/plugin.js ***! - \**********************************************************/ -/***/ (() => { - -(function ($) { -if (CKEDITOR && CKEDITOR.plugins && CKEDITOR.plugins.registered && CKEDITOR.plugins.registered.cmsdialog) { - return; -} -/** - * Modified version of the dialog plugin to support touch events. - * - * @license Copyright (c) 2003-2020, CKSource - Frederico Knabben. All rights reserved. - * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license - */ - -/** - * @fileOverview The floating dialog plugin. - */ - -/** - * No resize for this dialog. - * - * @readonly - * @property {Number} [=0] - * @member CKEDITOR - */ -CKEDITOR.DIALOG_RESIZE_NONE = 0; - -/** - * Only allow horizontal resizing for this dialog, disable vertical resizing. - * - * @readonly - * @property {Number} [=1] - * @member CKEDITOR - */ -CKEDITOR.DIALOG_RESIZE_WIDTH = 1; - -/** - * Only allow vertical resizing for this dialog, disable horizontal resizing. - * - * @readonly - * @property {Number} [=2] - * @member CKEDITOR - */ -CKEDITOR.DIALOG_RESIZE_HEIGHT = 2; - -/** - * Allow the dialog to be resized in both directions. - * - * @readonly - * @property {Number} [=3] - * @member CKEDITOR - */ -CKEDITOR.DIALOG_RESIZE_BOTH = 3; - -/** - * Dialog state when idle. - * - * @readonly - * @property {Number} [=1] - * @member CKEDITOR - */ -CKEDITOR.DIALOG_STATE_IDLE = 1; - -/** - * Dialog state when busy. - * - * @readonly - * @property {Number} [=2] - * @member CKEDITOR - */ -CKEDITOR.DIALOG_STATE_BUSY = 2; - -( function() { - 'use strict'; - - var cssLength = CKEDITOR.tools.cssLength, - defaultDialogDefinition, - currentCover; - - function focusActiveTab( dialog ) { - dialog._.tabBarMode = true; - dialog._.tabs[ dialog._.currentTabId ][ 0 ].focus(); - dialog._.currentFocusIndex = -1; - } - - function isTabVisible( tabId ) { - return !!this._.tabs[ tabId ][ 0 ].$.offsetHeight; - } - - function getPreviousVisibleTab() { - var tabId = this._.currentTabId, - length = this._.tabIdList.length, - tabIndex = CKEDITOR.tools.indexOf( this._.tabIdList, tabId ) + length; - - for ( var i = tabIndex - 1; i > tabIndex - length; i-- ) { - if ( isTabVisible.call( this, this._.tabIdList[ i % length ] ) ) - return this._.tabIdList[ i % length ]; - } - - return null; - } - - function getNextVisibleTab() { - var tabId = this._.currentTabId, - length = this._.tabIdList.length, - tabIndex = CKEDITOR.tools.indexOf( this._.tabIdList, tabId ); - - for ( var i = tabIndex + 1; i < tabIndex + length; i++ ) { - if ( isTabVisible.call( this, this._.tabIdList[ i % length ] ) ) - return this._.tabIdList[ i % length ]; - } - - return null; - } - - - function clearOrRecoverTextInputValue( container, isRecover ) { - var inputs = container.$.getElementsByTagName( 'input' ); - for ( var i = 0, length = inputs.length; i < length; i++ ) { - var item = new CKEDITOR.dom.element( inputs[ i ] ); - - if ( item.getAttribute( 'type' ).toLowerCase() == 'text' ) { - if ( isRecover ) { - item.setAttribute( 'value', item.getCustomData( 'fake_value' ) || '' ); - item.removeCustomData( 'fake_value' ); - } else { - item.setCustomData( 'fake_value', item.getAttribute( 'value' ) ); - item.setAttribute( 'value', '' ); - } - } - } - } - - // Handle dialog element validation state UI changes. - function handleFieldValidated( isValid, msg ) { - var input = this.getInputElement(); - if ( input ) - isValid ? input.removeAttribute( 'aria-invalid' ) : input.setAttribute( 'aria-invalid', true ); - - if ( !isValid ) { - if ( this.select ) - this.select(); - else - this.focus(); - } - - msg && alert( msg ); // jshint ignore:line - - this.fire( 'validated', { valid: isValid, msg: msg } ); - } - - function resetField() { - var input = this.getInputElement(); - input && input.removeAttribute( 'aria-invalid' ); - } - - var useFlex = !CKEDITOR.env.ie || CKEDITOR.env.edge, - templateSource = ''; - - function buildDialog( editor ) { - var element = CKEDITOR.dom.element.createFromHtml( CKEDITOR.addTemplate( 'dialog', templateSource ).output( { - id: CKEDITOR.tools.getNextNumber(), - editorId: editor.id, - langDir: editor.lang.dir, - langCode: editor.langCode, - editorDialogClass: 'cke_editor_' + editor.name.replace( /\./g, '\\.' ) + '_dialog', - closeTitle: editor.lang.common.close, - hidpi: CKEDITOR.env.hidpi ? 'cke_hidpi' : '' - } ) ); - - // TODO: Change this to getById(), so it'll support custom templates. - var body = element.getChild( [ 0, 0, 0, 0, 0 ] ), - title = body.getChild( 0 ), - close = body.getChild( 1 ); - - // Don't allow dragging on dialog (https://dev.ckeditor.com/ticket/13184). - // disabled for django-CMS: editor.plugins.clipboard && CKEDITOR.plugins.clipboard.preventDefaultDropOnElement( body ); - - // IFrame shim for dialog that masks activeX in IE. (https://dev.ckeditor.com/ticket/7619) - if ( CKEDITOR.env.ie && !CKEDITOR.env.quirks && !CKEDITOR.env.edge ) { - var src = 'javascript:void(function(){' + encodeURIComponent( 'document.open();(' + CKEDITOR.tools.fixDomain + ')();document.close();' ) + '}())', // jshint ignore:line - iframe = CKEDITOR.dom.element.createFromHtml( '' ); - iframe.appendTo( body.getParent() ); - } - - // Make the Title and Close Button unselectable. - title.unselectable(); - close.unselectable(); - - return { - element: element, - parts: { - dialog: element.getChild( 0 ), - title: title, - close: close, - tabs: body.getChild( 2 ), - contents: body.getChild( [ 3, 0, 0, 0 ] ), - footer: body.getChild( [ 3, 0, 1, 0 ] ) - } - }; - } - - /** - * This is the base class for runtime dialog objects. An instance of this - * class represents a single named dialog for a single editor instance. - * - * var dialogObj = new CKEDITOR.dialog( editor, 'smiley' ); - * - * @class - * @constructor Creates a dialog class instance. - * @param {Object} editor The editor which created the dialog. - * @param {String} dialogName The dialog's registered name. - */ - CKEDITOR.dialog = function( editor, dialogName ) { - // Load the dialog definition. - var definition = CKEDITOR.dialog._.dialogDefinitions[ dialogName ], - defaultDefinition = CKEDITOR.tools.clone( defaultDialogDefinition ), - buttonsOrder = editor.config.dialog_buttonsOrder || 'OS', - dir = editor.lang.dir, - tabsToRemove = {}, - i, processed, stopPropagation; - - if ( ( buttonsOrder == 'OS' && CKEDITOR.env.mac ) || // The buttons in MacOS Apps are in reverse order (https://dev.ckeditor.com/ticket/4750) - ( buttonsOrder == 'rtl' && dir == 'ltr' ) || ( buttonsOrder == 'ltr' && dir == 'rtl' ) ) - defaultDefinition.buttons.reverse(); - - - // Completes the definition with the default values. - definition = CKEDITOR.tools.extend( definition( editor ), defaultDefinition ); - - // Clone a functionally independent copy for this dialog. - definition = CKEDITOR.tools.clone( definition ); - - // Create a complex definition object, extending it with the API - // functions. - definition = new definitionObject( this, definition ); - - var themeBuilt = buildDialog( editor ); - - // Initialize some basic parameters. - this._ = { - editor: editor, - element: themeBuilt.element, - name: dialogName, - model: null, - contentSize: { width: 0, height: 0 }, - size: { width: 0, height: 0 }, - contents: {}, - buttons: {}, - accessKeyMap: {}, - // Default value is 0.5 which means a centered dialog. - viewportRatio: { - width: 0.5, - height: 0.5 - }, - - // Initialize the tab and page map. - tabs: {}, - tabIdList: [], - currentTabId: null, - currentTabIndex: null, - pageCount: 0, - lastTab: null, - tabBarMode: false, - - // Initialize the tab order array for input widgets. - focusList: [], - currentFocusIndex: 0, - hasFocus: false - }; - - this.parts = themeBuilt.parts; - - CKEDITOR.tools.setTimeout( function() { - editor.fire( 'ariaWidget', this.parts.contents ); - }, 0, this ); - - // Set the startup styles for the dialog, avoiding it enlarging the - // page size on the dialog creation. - var startStyles = { - top: 0, - visibility: 'hidden' - }; - - if ( CKEDITOR.env.ie6Compat ) { - startStyles.position = 'absolute'; - } - - startStyles[ dir == 'rtl' ? 'right' : 'left' ] = 0; - this.parts.dialog.setStyles( startStyles ); - - - // Call the CKEDITOR.event constructor to initialize this instance. - CKEDITOR.event.call( this ); - - // Fire the "dialogDefinition" event, making it possible to customize - // the dialog definition. - this.definition = definition = CKEDITOR.fire( 'dialogDefinition', { - name: dialogName, - definition: definition, - dialog: this - }, editor ).definition; - - // Cache tabs that should be removed. - if ( !( 'removeDialogTabs' in editor._ ) && editor.config.removeDialogTabs ) { - var removeContents = editor.config.removeDialogTabs.split( ';' ); - - for ( i = 0; i < removeContents.length; i++ ) { - var parts = removeContents[ i ].split( ':' ); - if ( parts.length == 2 ) { - var removeDialogName = parts[ 0 ]; - if ( !tabsToRemove[ removeDialogName ] ) - tabsToRemove[ removeDialogName ] = []; - tabsToRemove[ removeDialogName ].push( parts[ 1 ] ); - } - } - editor._.removeDialogTabs = tabsToRemove; - } - - // Remove tabs of this dialog. - if ( editor._.removeDialogTabs && ( tabsToRemove = editor._.removeDialogTabs[ dialogName ] ) ) { - for ( i = 0; i < tabsToRemove.length; i++ ) - definition.removeContents( tabsToRemove[ i ] ); - } - - // Initialize load, show, hide, ok and cancel events. - if ( definition.onLoad ) - this.on( 'load', definition.onLoad ); - - if ( definition.onShow ) - this.on( 'show', definition.onShow ); - - if ( definition.onHide ) - this.on( 'hide', definition.onHide ); - - if ( definition.onOk ) { - this.on( 'ok', function( evt ) { - // Dialog confirm might probably introduce content changes (https://dev.ckeditor.com/ticket/5415). - editor.fire( 'saveSnapshot' ); - setTimeout( function() { - editor.fire( 'saveSnapshot' ); - }, 0 ); - if ( definition.onOk.call( this, evt ) === false ) - evt.data.hide = false; - } ); - } - - // Set default dialog state. - this.state = CKEDITOR.DIALOG_STATE_IDLE; - - if ( definition.onCancel ) { - this.on( 'cancel', function( evt ) { - if ( definition.onCancel.call( this, evt ) === false ) - evt.data.hide = false; - } ); - } - - var me = this; - - // Iterates over all items inside all content in the dialog, calling a - // function for each of them. - var iterContents = function( func ) { - var contents = me._.contents, - stop = false; - - for ( var i in contents ) { - for ( var j in contents[ i ] ) { - stop = func.call( this, contents[ i ][ j ] ); - if ( stop ) - return; - } - } - }; - - this.on( 'ok', function( evt ) { - iterContents( function( item ) { - if ( item.validate ) { - var retval = item.validate( this ), - invalid = ( typeof retval == 'string' ) || retval === false; - - if ( invalid ) { - evt.data.hide = false; - evt.stop(); - } - - handleFieldValidated.call( item, !invalid, typeof retval == 'string' ? retval : undefined ); - return invalid; - } - } ); - }, this, null, 0 ); - - this.on( 'cancel', function( evt ) { - iterContents( function( item ) { - if ( item.isChanged() ) { - if ( !editor.config.dialog_noConfirmCancel && !confirm( editor.lang.common.confirmCancel ) ) // jshint ignore:line - evt.data.hide = false; - return true; - } - } ); - }, this, null, 0 ); - - this.parts.close.on( 'click', function( evt ) { - if ( this.fire( 'cancel', { hide: true } ).hide !== false ) - this.hide(); - evt.data.preventDefault(); - }, this ); - - // Sort focus list according to tab order definitions. - function setupFocus() { - var focusList = me._.focusList; - focusList.sort( function( a, b ) { - // Mimics browser tab order logics; - if ( a.tabIndex != b.tabIndex ) - return b.tabIndex - a.tabIndex; - // Sort is not stable in some browsers, - // fall-back the comparator to 'focusIndex'; - else - return a.focusIndex - b.focusIndex; - } ); - - var size = focusList.length; - for ( var i = 0; i < size; i++ ) - focusList[ i ].focusIndex = i; - } - - // Expects 1 or -1 as an offset, meaning direction of the offset change. - function changeFocus( offset ) { - var focusList = me._.focusList; - offset = offset || 0; - - if ( focusList.length < 1 ) - return; - - var startIndex = me._.currentFocusIndex; - - if ( me._.tabBarMode && offset < 0 ) { - // If we are in tab mode, we need to mimic that we started tabbing back from the first - // focusList (so it will go to the last one). - startIndex = 0; - } - - // Trigger the 'blur' event of any input element before anything, - // since certain UI updates may depend on it. - try { - focusList[ startIndex ].getInputElement().$.blur(); - } catch ( e ) {} - - var currentIndex = startIndex, - hasTabs = me._.pageCount > 1; - - do { - currentIndex = currentIndex + offset; - - if ( hasTabs && !me._.tabBarMode && ( currentIndex == focusList.length || currentIndex == -1 ) ) { - // If the dialog was not in tab mode, then focus the first tab (https://dev.ckeditor.com/ticket/13027). - me._.tabBarMode = true; - me._.tabs[ me._.currentTabId ][ 0 ].focus(); - me._.currentFocusIndex = -1; - - // Early return, in order to avoid accessing focusList[ -1 ]. - return; - } - - currentIndex = ( currentIndex + focusList.length ) % focusList.length; - - if ( currentIndex == startIndex ) { - break; - } - } while ( offset && !focusList[ currentIndex ].isFocusable() ); - - focusList[ currentIndex ].focus(); - - // Select whole field content. - if ( focusList[ currentIndex ].type == 'text' ) - focusList[ currentIndex ].select(); - } - - this.changeFocus = changeFocus; - - - function keydownHandler( evt ) { - // If I'm not the top dialog, ignore. - if ( me != CKEDITOR.dialog._.currentTop ) - return; - - var keystroke = evt.data.getKeystroke(), - rtl = editor.lang.dir == 'rtl', - arrowKeys = [ 37, 38, 39, 40 ], - button; - - processed = stopPropagation = 0; - - if ( keystroke == 9 || keystroke == CKEDITOR.SHIFT + 9 ) { - var shiftPressed = ( keystroke == CKEDITOR.SHIFT + 9 ); - changeFocus( shiftPressed ? -1 : 1 ); - processed = 1; - } else if ( keystroke == CKEDITOR.ALT + 121 && !me._.tabBarMode && me.getPageCount() > 1 ) { - // Alt-F10 puts focus into the current tab item in the tab bar. - focusActiveTab( me ); - processed = 1; - } else if ( CKEDITOR.tools.indexOf( arrowKeys, keystroke ) != -1 && me._.tabBarMode ) { - // Array with key codes that activate previous tab. - var prevKeyCodes = [ - // Depending on the lang dir: right or left key - rtl ? 39 : 37, - // Top/bot arrow: actually for both cases it's the same. - 38 - ], - nextId = CKEDITOR.tools.indexOf( prevKeyCodes, keystroke ) != -1 ? getPreviousVisibleTab.call( me ) : getNextVisibleTab.call( me ); - - me.selectPage( nextId ); - me._.tabs[ nextId ][ 0 ].focus(); - processed = 1; - } else if ( ( keystroke == 13 || keystroke == 32 ) && me._.tabBarMode ) { - this.selectPage( this._.currentTabId ); - this._.tabBarMode = false; - this._.currentFocusIndex = -1; - changeFocus( 1 ); - processed = 1; - } - // If user presses enter key in a text box, it implies clicking OK for the dialog. - else if ( keystroke == 13 /*ENTER*/ ) { - // Don't do that for a target that handles ENTER. - var target = evt.data.getTarget(); - if ( !target.is( 'a', 'button', 'select', 'textarea' ) && ( !target.is( 'input' ) || target.$.type != 'button' ) ) { - button = this.getButton( 'ok' ); - button && CKEDITOR.tools.setTimeout( button.click, 0, button ); - processed = 1; - } - stopPropagation = 1; // Always block the propagation (https://dev.ckeditor.com/ticket/4269) - } else if ( keystroke == 27 /*ESC*/ ) { - button = this.getButton( 'cancel' ); - - // If there's a Cancel button, click it, else just fire the cancel event and hide the dialog. - if ( button ) - CKEDITOR.tools.setTimeout( button.click, 0, button ); - else { - if ( this.fire( 'cancel', { hide: true } ).hide !== false ) - this.hide(); - } - stopPropagation = 1; // Always block the propagation (https://dev.ckeditor.com/ticket/4269) - } else { - return; - } - - keypressHandler( evt ); - } - - function keypressHandler( evt ) { - if ( processed ) - evt.data.preventDefault( 1 ); - else if ( stopPropagation ) - evt.data.stopPropagation(); - } - - var dialogElement = this._.element; - - editor.focusManager.add( dialogElement, 1 ); - - // Add the dialog keyboard handlers. - this.on( 'show', function() { - dialogElement.on( 'keydown', keydownHandler, this ); - - // Some browsers instead, don't cancel key events in the keydown, but in the - // keypress. So we must do a longer trip in those cases. (https://dev.ckeditor.com/ticket/4531,https://dev.ckeditor.com/ticket/8985) - if ( CKEDITOR.env.gecko ) - dialogElement.on( 'keypress', keypressHandler, this ); - - } ); - this.on( 'hide', function() { - dialogElement.removeListener( 'keydown', keydownHandler ); - if ( CKEDITOR.env.gecko ) - dialogElement.removeListener( 'keypress', keypressHandler ); - - // Reset fields state when closing dialog. - iterContents( function( item ) { - resetField.apply( item ); - } ); - } ); - this.on( 'iframeAdded', function( evt ) { - var doc = new CKEDITOR.dom.document( evt.data.iframe.$.contentWindow.document ); - doc.on( 'keydown', keydownHandler, this, null, 0 ); - } ); - - // Auto-focus logic in dialog. - this.on( 'show', function() { - // Setup tabIndex on showing the dialog instead of on loading - // to allow dynamic tab order happen in dialog definition. - setupFocus(); - - var hasTabs = me._.pageCount > 1; - - if ( editor.config.dialog_startupFocusTab && hasTabs ) { - me._.tabBarMode = true; - me._.tabs[ me._.currentTabId ][ 0 ].focus(); - me._.currentFocusIndex = -1; - } else if ( !this._.hasFocus ) { - // https://dev.ckeditor.com/ticket/13114#comment:4. - this._.currentFocusIndex = hasTabs ? -1 : this._.focusList.length - 1; - - // Decide where to put the initial focus. - if ( definition.onFocus ) { - var initialFocus = definition.onFocus.call( this ); - // Focus the field that the user specified. - initialFocus && initialFocus.focus(); - } - // Focus the first field in layout order. - else { - changeFocus( 1 ); - } - } - }, this, null, 0xffffffff ); - - // IE6 BUG: Text fields and text areas are only half-rendered the first time the dialog appears in IE6 (https://dev.ckeditor.com/ticket/2661). - // This is still needed after [2708] and [2709] because text fields in hidden TR tags are still broken. - if ( CKEDITOR.env.ie6Compat ) { - this.on( 'load', function() { - var outer = this.getElement(), - inner = outer.getFirst(); - inner.remove(); - inner.appendTo( outer ); - }, this ); - } - - initDragAndDrop( this ); - initResizeHandles( this ); - - // Insert the title. - ( new CKEDITOR.dom.text( definition.title, CKEDITOR.document ) ).appendTo( this.parts.title ); - - // Insert the tabs and contents. - for ( i = 0; i < definition.contents.length; i++ ) { - var page = definition.contents[ i ]; - page && this.addPage( page ); - } - - this.parts.tabs.on( 'click', function( evt ) { - var target = evt.data.getTarget(); - // If we aren't inside a tab, bail out. - if ( target.hasClass( 'cke_dialog_tab' ) ) { - // Get the ID of the tab, without the 'cke_' prefix and the unique number suffix. - var id = target.$.id; - this.selectPage( id.substring( 4, id.lastIndexOf( '_' ) ) ); - - focusActiveTab( this ); - - evt.data.preventDefault(); - } - }, this ); - - // Insert buttons. - var buttonsHtml = [], - buttons = CKEDITOR.dialog._.uiElementBuilders.hbox.build( this, { - type: 'hbox', - className: 'cke_dialog_footer_buttons', - widths: [], - children: definition.buttons - }, buttonsHtml ).getChild(); - this.parts.footer.setHtml( buttonsHtml.join( '' ) ); - - for ( i = 0; i < buttons.length; i++ ) - this._.buttons[ buttons[ i ].id ] = buttons[ i ]; - - /** - * Current state of the dialog. Use the {@link #setState} method to update it. - * See the {@link #event-state} event to know more. - * - * @readonly - * @property {Number} [state=CKEDITOR.DIALOG_STATE_IDLE] - */ - }; - - // Focusable interface. Use it via dialog.addFocusable. - function Focusable( dialog, element, index ) { - this.element = element; - this.focusIndex = index; - // TODO: support tabIndex for focusables. - this.tabIndex = 0; - this.isFocusable = function() { - return !element.getAttribute( 'disabled' ) && element.isVisible(); - }; - this.focus = function() { - dialog._.currentFocusIndex = this.focusIndex; - this.element.focus(); - }; - // Bind events - element.on( 'keydown', function( e ) { - if ( e.data.getKeystroke() in { 32: 1, 13: 1 } ) - this.fire( 'click' ); - } ); - element.on( 'focus', function() { - this.fire( 'mouseover' ); - } ); - element.on( 'blur', function() { - this.fire( 'mouseout' ); - } ); - } - - // Re-layout the dialog on window resize. - function resizeWithWindow( dialog ) { - var win = CKEDITOR.document.getWindow(); - function resizeHandler() { - dialog.layout(); - } - win.on( 'resize', resizeHandler ); - dialog.on( 'hide', function() { - win.removeListener( 'resize', resizeHandler ); - } ); - } - - CKEDITOR.dialog.prototype = { - destroy: function() { - this.hide(); - this._.element.remove(); - }, - - /** - * Resizes the dialog. - * - * dialogObj.resize( 800, 640 ); - * - * @method - * @param {Number} width The width of the dialog in pixels. - * @param {Number} height The height of the dialog in pixels. - */ - resize: function( width, height ) { - if ( this._.contentSize && this._.contentSize.width == width && this._.contentSize.height == height ) - return; - - CKEDITOR.dialog.fire( 'resize', { - dialog: this, - width: width, - height: height - }, this._.editor ); - - this.fire( 'resize', { - width: width, - height: height - }, this._.editor ); - - var contents = this.parts.contents; - contents.setStyles( { - width: width + 'px', - height: height + 'px' - } ); - - // Update dialog position when dimension get changed in RTL. - if ( this._.editor.lang.dir == 'rtl' && this._.position ) { - var containerWidth = this.parts.dialog.getParent().getClientSize().width; - - this._.position.x = containerWidth - this._.contentSize.width - parseInt( this._.element.getFirst().getStyle( 'right' ), 10 ); - } - - this._.contentSize = { width: width, height: height }; - }, - - /** - * Gets the current size of the dialog in pixels. - * - * var width = dialogObj.getSize().width; - * - * @returns {Object} - * @returns {Number} return.width - * @returns {Number} return.height - */ - getSize: function() { - var element = this._.element.getFirst(); - return { width: element.$.offsetWidth || 0, height: element.$.offsetHeight || 0 }; - }, - - /** - * Moves the dialog to an `(x, y)` coordinate relative to the window. - * - * dialogObj.move( 10, 40 ); - * - * @method - * @param {Number} x The target x-coordinate. - * @param {Number} y The target y-coordinate. - * @param {Boolean} save Flag indicate whether the dialog position should be remembered on next open up. - */ - move: function( x, y, save ) { - var element = this._.element.getFirst(), rtl = this._.editor.lang.dir == 'rtl'; - - // (https://dev.ckeditor.com/ticket/8888) In some cases of a very small viewport, dialog is incorrectly - // positioned in IE7. It also happens that it remains sticky and user cannot - // scroll down/up to reveal dialog's content below/above the viewport; this is - // cumbersome. - // The only way to fix this is to move mouse out of the browser and - // go back to see that dialog position is automagically fixed. No events, - // no style change - pure magic. This is a IE7 rendering issue, which can be - // fixed with dummy style redraw on each move. - if ( CKEDITOR.env.ie ) { - element.setStyle( 'zoom', '100%' ); - } - - var containerSize = this.parts.dialog.getParent().getClientSize(), - dialogSize = this.getSize(), - ratios = this._.viewportRatio, - freeSpace = { - width: Math.max( containerSize.width - dialogSize.width, 0 ), - height: Math.max( containerSize.height - dialogSize.height, 0 ) - }; - - if ( this._.position && this._.position.x == x && this._.position.y == y ) { - // If position didn't change window might have been resized. - x = Math.floor( freeSpace.width * ratios.width ); - y = Math.floor( freeSpace.height * ratios.height ); - } else { - updateRatios( this, x, y ); - } - - // Save the current position. - this._.position = { x: x, y: y }; - - // Translate coordinate for RTL. - if ( rtl ) { - x = freeSpace.width - x; - } - - var styles = { 'top': ( y > 0 ? y : 0 ) + 'px' }; - styles[ rtl ? 'right' : 'left' ] = ( x > 0 ? x : 0 ) + 'px'; - - element.setStyles( styles ); - - save && ( this._.moved = 1 ); - }, - - /** - * Gets the dialog's position in the window. - * - * var dialogX = dialogObj.getPosition().x; - * - * @returns {Object} - * @returns {Number} return.x - * @returns {Number} return.y - */ - getPosition: function() { - return CKEDITOR.tools.extend( {}, this._.position ); - }, - - /** - * Shows the dialog box. - * - * dialogObj.show(); - */ - show: function() { - // Insert the dialog's element to the root document. - var element = this._.element, - definition = this.definition, - documentBody = CKEDITOR.document.getBody(), - baseFloatZIndex = this._.editor.config.baseFloatZIndex + 10000000; - - if ( !( element.getParent() && element.getParent().equals( documentBody ) ) ) { - element.appendTo( documentBody ); - } else { - element.setStyle( 'display', useFlex ? 'flex' : 'block' ); - } - - // First, set the dialog to an appropriate size. - this.resize( - this._.contentSize && this._.contentSize.width || definition.width || definition.minWidth, - this._.contentSize && this._.contentSize.height || definition.height || definition.minHeight - ); - - // Reset all inputs back to their default value. - this.reset(); - - // Selects the first tab if no tab is already selected. - if ( this._.currentTabId === null ) { - this.selectPage( this.definition.contents[ 0 ].id ); - } - - // Set z-index to dialog and container (#3559). - if ( CKEDITOR.dialog._.currentZIndex === null ) { - CKEDITOR.dialog._.currentZIndex = baseFloatZIndex; - } - this._.element.getFirst().setStyle( 'z-index', CKEDITOR.dialog._.currentZIndex += 10 ); // to cover CMS' structure board - this.getElement().setStyle( 'z-index', CKEDITOR.dialog._.currentZIndex ); - - // Maintain the dialog ordering and dialog cover. - if ( CKEDITOR.dialog._.currentTop === null ) { - CKEDITOR.dialog._.currentTop = this; - this._.parentDialog = null; - showCover( this._.editor ); - } else { - this._.parentDialog = CKEDITOR.dialog._.currentTop; - - var parentElement = this._.parentDialog.getElement().getFirst(); - - parentElement.$.style.zIndex -= Math.floor( baseFloatZIndex / 2 ); - this._.parentDialog.getElement().setStyle( 'z-index', parentElement.$.style.zIndex ); - CKEDITOR.dialog._.currentTop = this; - } - - element.on( 'keydown', accessKeyDownHandler ); - element.on( 'keyup', accessKeyUpHandler ); - - // Reset the hasFocus state. - this._.hasFocus = false; - - for ( var i in definition.contents ) { - if ( !definition.contents[ i ] ) { - continue; - } - - var content = definition.contents[ i ], - tab = this._.tabs[ content.id ], - requiredContent = content.requiredContent, - enableElements = 0; - - if ( !tab ) { - continue; - } - - for ( var j in this._.contents[ content.id ] ) { - var elem = this._.contents[ content.id ][ j ]; - - if ( elem.type == 'hbox' || elem.type == 'vbox' || !elem.getInputElement() ) { - continue; - } - - if ( elem.requiredContent && !this._.editor.activeFilter.check( elem.requiredContent ) ) { - elem.disable(); - } else { - elem.enable(); - enableElements++; - } - } - - if ( !enableElements || ( requiredContent && !this._.editor.activeFilter.check( requiredContent ) ) ) { - tab[ 0 ].addClass( 'cke_dialog_tab_disabled' ); - } else { - tab[ 0 ].removeClass( 'cke_dialog_tab_disabled' ); - } - } - - CKEDITOR.tools.setTimeout( function() { - this.layout(); - resizeWithWindow( this ); - - this.parts.dialog.setStyle( 'visibility', '' ); - - // Execute onLoad for the first show. - this.fireOnce( 'load', {} ); - CKEDITOR.ui.fire( 'ready', this ); - - this.fire( 'show', {} ); - this._.editor.fire( 'dialogShow', this ); - - if ( !this._.parentDialog ) { - this._.editor.focusManager.lock(); - } - - // Save the initial values of the dialog. - this.foreach( function( contentObj ) { - contentObj.setInitValue && contentObj.setInitValue(); - } ); - - }, 100, this ); - }, - - /** - * Rearrange the dialog to its previous position or the middle of the window. - * - * @since 3.5.0 - */ - layout: function() { - var el = this.parts.dialog; - - if ( !this._.moved && useFlex ) { - return; - } - - var dialogSize = this.getSize(), - win = CKEDITOR.document.getWindow(), - viewSize = win.getViewPaneSize(), - posX, - posY; - - if ( this._.moved && this._.position ) { - posX = this._.position.x; - posY = this._.position.y; - } else { - posX = ( viewSize.width - dialogSize.width ) / 2; - posY = ( viewSize.height - dialogSize.height ) / 2; - } - - if ( !CKEDITOR.env.ie6Compat ) { - el.setStyle( 'position', 'absolute' ); - el.removeStyle( 'margin' ); - } - - posX = Math.floor( posX ); - posY = Math.floor( posY ); - - this.move( posX, posY ); - }, - - /** - * Executes a function for each UI element. - * - * @param {Function} fn Function to execute for each UI element. - * @returns {CKEDITOR.dialog} The current dialog object. - */ - foreach: function( fn ) { - for ( var i in this._.contents ) { - for ( var j in this._.contents[ i ] ) { - fn.call( this, this._.contents[i][j] ); - } - } - - return this; - }, - - /** - * Resets all input values in the dialog. - * - * dialogObj.reset(); - * - * @method - * @chainable - */ - reset: ( function() { - var fn = function( widget ) { - if ( widget.reset ) - widget.reset( 1 ); - }; - return function() { - this.foreach( fn ); - return this; - }; - } )(), - - - /** - * Calls the {@link CKEDITOR.dialog.definition.uiElement#setup} method of each - * of the UI elements, with the arguments passed through it. - * It is usually being called when the dialog is opened, to put the initial value inside the field. - * - * dialogObj.setupContent(); - * - * var timestamp = ( new Date() ).valueOf(); - * dialogObj.setupContent( timestamp ); - */ - setupContent: function() { - var args = arguments; - this.foreach( function( widget ) { - if ( widget.setup ) - widget.setup.apply( widget, args ); - } ); - }, - - /** - * Calls the {@link CKEDITOR.dialog.definition.uiElement#commit} method of each - * of the UI elements, with the arguments passed through it. - * It is usually being called when the user confirms the dialog, to process the values. - * - * dialogObj.commitContent(); - * - * var timestamp = ( new Date() ).valueOf(); - * dialogObj.commitContent( timestamp ); - */ - commitContent: function() { - var args = arguments; - this.foreach( function( widget ) { - // Make sure IE triggers "change" event on last focused input before closing the dialog. (https://dev.ckeditor.com/ticket/7915) - if ( CKEDITOR.env.ie && this._.currentFocusIndex == widget.focusIndex ) - widget.getInputElement().$.blur(); - - if ( widget.commit ) - widget.commit.apply( widget, args ); - } ); - }, - - /** - * Hides the dialog box. - * - * dialogObj.hide(); - */ - hide: function() { - if ( !this.parts.dialog.isVisible() ) { - return; - } - - this.fire( 'hide', {} ); - this._.editor.fire( 'dialogHide', this ); - // Reset the tab page. - this.selectPage( this._.tabIdList[ 0 ] ); - var element = this._.element; - element.setStyle( 'display', 'none' ); - this.parts.dialog.setStyle( 'visibility', 'hidden' ); - // Unregister all access keys associated with this dialog. - unregisterAccessKey( this ); - - // Close any child(top) dialogs first. - while ( CKEDITOR.dialog._.currentTop != this ) { - CKEDITOR.dialog._.currentTop.hide(); - } - - // Maintain dialog ordering and remove cover if needed. - if ( !this._.parentDialog ) { - hideCover( this._.editor ); - } else { - var parentElement = this._.parentDialog.getElement().getFirst(); - this._.parentDialog.getElement().removeStyle( 'z-index' ); - parentElement.setStyle( 'z-index', parseInt( parentElement.$.style.zIndex, 10 ) + Math.floor( this._.editor.config.baseFloatZIndex / 2 ) ); - } - CKEDITOR.dialog._.currentTop = this._.parentDialog; - - // Deduct or clear the z-index. - if ( !this._.parentDialog ) { - CKEDITOR.dialog._.currentZIndex = null; - - // Remove access key handlers. - element.removeListener( 'keydown', accessKeyDownHandler ); - element.removeListener( 'keyup', accessKeyUpHandler ); - - var editor = this._.editor; - editor.focus(); - - // Give a while before unlock, waiting for focus to return to the editable. (https://dev.ckeditor.com/ticket/172) - setTimeout( function() { - editor.focusManager.unlock(); - - // Fixed iOS focus issue (https://dev.ckeditor.com/ticket/12381). - // Keep in mind that editor.focus() does not work in this case. - if ( CKEDITOR.env.iOS ) { - editor.window.focus(); - } - }, 0 ); - - } else { - CKEDITOR.dialog._.currentZIndex -= 10; - } - - delete this._.parentDialog; - // Reset the initial values of the dialog. - this.foreach( function( contentObj ) { - contentObj.resetInitValue && contentObj.resetInitValue(); - } ); - - // Reset dialog state back to IDLE, if busy (https://dev.ckeditor.com/ticket/13213). - this.setState( CKEDITOR.DIALOG_STATE_IDLE ); - }, - - /** - * Adds a tabbed page into the dialog. - * - * @param {Object} contents Content definition. - */ - addPage: function( contents ) { - if ( contents.requiredContent && !this._.editor.filter.check( contents.requiredContent ) ) { - return; - } - - var pageHtml = [], - titleHtml = contents.label ? ' title="' + CKEDITOR.tools.htmlEncode( contents.label ) + '"' : '', - vbox = CKEDITOR.dialog._.uiElementBuilders.vbox.build( this, { - type: 'vbox', - className: 'cke_dialog_page_contents', - children: contents.elements, - expand: !!contents.expand, - padding: contents.padding, - style: contents.style || 'width: 100%;' - }, pageHtml ), - contentMap = this._.contents[ contents.id ] = {}, - cursor, - children = vbox.getChild(), - enabledFields = 0; - - while ( ( cursor = children.shift() ) ) { - // Count all allowed fields. - if ( !cursor.notAllowed && cursor.type != 'hbox' && cursor.type != 'vbox' ) { - enabledFields++; - } - - contentMap[ cursor.id ] = cursor; - if ( typeof cursor.getChild == 'function' ) { - children.push.apply( children, cursor.getChild() ); - } - } - - // If all fields are disabled (because they are not allowed) hide this tab. - if ( !enabledFields ) { - contents.hidden = true; - } - - // Create the HTML for the tab and the content block. - var page = CKEDITOR.dom.element.createFromHtml( pageHtml.join( '' ) ); - page.setAttribute( 'role', 'tabpanel' ); - page.setStyle( 'min-height', '100%' ); - - var env = CKEDITOR.env, - tabId = 'cke_' + contents.id + '_' + CKEDITOR.tools.getNextNumber(), - tab = CKEDITOR.dom.element.createFromHtml( [ - ' 0 ? ' cke_last' : 'cke_first' ), - titleHtml, - ( !!contents.hidden ? ' style="display:none"' : '' ), - ' id="', tabId, '"', - env.gecko && !env.hc ? '' : ' href="javascript:void(0)"', - ' tabIndex="-1"', - ' hidefocus="true"', - ' role="tab">', - contents.label, - '' - ].join( '' ) ); - - page.setAttribute( 'aria-labelledby', tabId ); - - // Take records for the tabs and elements created. - this._.tabs[ contents.id ] = [ tab, page ]; - this._.tabIdList.push( contents.id ); - !contents.hidden && this._.pageCount++; - this._.lastTab = tab; - this.updateStyle(); - - // Attach the DOM nodes. - - page.setAttribute( 'name', contents.id ); - page.appendTo( this.parts.contents ); - - tab.unselectable(); - this.parts.tabs.append( tab ); - - // Add access key handlers if access key is defined. - if ( contents.accessKey ) { - registerAccessKey( this, this, 'CTRL+' + contents.accessKey, tabAccessKeyDown, tabAccessKeyUp ); - this._.accessKeyMap[ 'CTRL+' + contents.accessKey ] = contents.id; - } - }, - - /** - * Activates a tab page in the dialog by its id. - * - * dialogObj.selectPage( 'tab_1' ); - * - * @param {String} id The id of the dialog tab to be activated. - */ - selectPage: function( id ) { - if ( this._.currentTabId == id ) - return; - - if ( this._.tabs[ id ][ 0 ].hasClass( 'cke_dialog_tab_disabled' ) ) - return; - - // If event was canceled - do nothing. - if ( this.fire( 'selectPage', { page: id, currentPage: this._.currentTabId } ) === false ) - return; - - // Hide the non-selected tabs and pages. - for ( var i in this._.tabs ) { - var tab = this._.tabs[ i ][ 0 ], - page = this._.tabs[ i ][ 1 ]; - if ( i != id ) { - tab.removeClass( 'cke_dialog_tab_selected' ); - tab.removeAttribute( 'aria-selected' ); - page.hide(); - } - page.setAttribute( 'aria-hidden', i != id ); - } - - var selected = this._.tabs[ id ]; - selected[ 0 ].addClass( 'cke_dialog_tab_selected' ); - selected[ 0 ].setAttribute( 'aria-selected', true ); - - // [IE] an invisible input[type='text'] will enlarge it's width - // if it's value is long when it shows, so we clear it's value - // before it shows and then recover it (https://dev.ckeditor.com/ticket/5649) - if ( CKEDITOR.env.ie6Compat || CKEDITOR.env.ie7Compat ) { - clearOrRecoverTextInputValue( selected[ 1 ] ); - selected[ 1 ].show(); - setTimeout( function() { - clearOrRecoverTextInputValue( selected[ 1 ], 1 ); - }, 0 ); - } else { - selected[ 1 ].show(); - } - - this._.currentTabId = id; - this._.currentTabIndex = CKEDITOR.tools.indexOf( this._.tabIdList, id ); - }, - - /** - * Dialog state-specific style updates. - */ - updateStyle: function() { - // If only a single page shown, a different style is used in the central pane. - this.parts.dialog[ ( this._.pageCount === 1 ? 'add' : 'remove' ) + 'Class' ]( 'cke_single_page' ); - }, - - /** - * Hides a page's tab away from the dialog. - * - * dialog.hidePage( 'tab_3' ); - * - * @param {String} id The page's Id. - */ - hidePage: function( id ) { - var tab = this._.tabs[ id ] && this._.tabs[ id ][ 0 ]; - if ( !tab || this._.pageCount == 1 || !tab.isVisible() ) - return; - // Switch to other tab first when we're hiding the active tab. - else if ( id == this._.currentTabId ) - this.selectPage( getPreviousVisibleTab.call( this ) ); - - tab.hide(); - this._.pageCount--; - this.updateStyle(); - }, - - /** - * Unhides a page's tab. - * - * dialog.showPage( 'tab_2' ); - * - * @param {String} id The page's Id. - */ - showPage: function( id ) { - var tab = this._.tabs[ id ] && this._.tabs[ id ][ 0 ]; - if ( !tab ) - return; - tab.show(); - this._.pageCount++; - this.updateStyle(); - }, - - /** - * Gets the root DOM element of the dialog. - * - * var dialogElement = dialogObj.getElement().getFirst(); - * dialogElement.setStyle( 'padding', '5px' ); - * - * @returns {CKEDITOR.dom.element} The `` element containing this dialog. - */ - getElement: function() { - return this._.element; - }, - - /** - * Gets the name of the dialog. - * - * var dialogName = dialogObj.getName(); - * - * @returns {String} The name of this dialog. - */ - getName: function() { - return this._.name; - }, - - /** - * Gets a dialog UI element object from a dialog page. - * - * dialogObj.getContentElement( 'tabId', 'elementId' ).setValue( 'Example' ); - * - * @param {String} pageId id of dialog page. - * @param {String} elementId id of UI element. - * @returns {CKEDITOR.ui.dialog.uiElement} The dialog UI element. - */ - getContentElement: function( pageId, elementId ) { - var page = this._.contents[ pageId ]; - return page && page[ elementId ]; - }, - - /** - * Gets the value of a dialog UI element. - * - * alert( dialogObj.getValueOf( 'tabId', 'elementId' ) ); - * - * @param {String} pageId id of dialog page. - * @param {String} elementId id of UI element. - * @returns {Object} The value of the UI element. - */ - getValueOf: function( pageId, elementId ) { - return this.getContentElement( pageId, elementId ).getValue(); - }, - - /** - * Sets the value of a dialog UI element. - * - * dialogObj.setValueOf( 'tabId', 'elementId', 'Example' ); - * - * @param {String} pageId id of the dialog page. - * @param {String} elementId id of the UI element. - * @param {Object} value The new value of the UI element. - */ - setValueOf: function( pageId, elementId, value ) { - return this.getContentElement( pageId, elementId ).setValue( value ); - }, - - /** - * Gets the UI element of a button in the dialog's button row. - * - * @returns {CKEDITOR.ui.dialog.button} The button object. - * - * @param {String} id The id of the button. - */ - getButton: function( id ) { - return this._.buttons[ id ]; - }, - - /** - * Simulates a click to a dialog button in the dialog's button row. - * - * @returns The return value of the dialog's `click` event. - * - * @param {String} id The id of the button. - */ - click: function( id ) { - return this._.buttons[ id ].click(); - }, - - /** - * Disables a dialog button. - * - * @param {String} id The id of the button. - */ - disableButton: function( id ) { - return this._.buttons[ id ].disable(); - }, - - /** - * Enables a dialog button. - * - * @param {String} id The id of the button. - */ - enableButton: function( id ) { - return this._.buttons[ id ].enable(); - }, - - /** - * Gets the number of pages in the dialog. - * - * @returns {Number} Page count. - */ - getPageCount: function() { - return this._.pageCount; - }, - - /** - * Gets the editor instance which opened this dialog. - * - * @returns {CKEDITOR.editor} Parent editor instances. - */ - getParentEditor: function() { - return this._.editor; - }, - - /** - * Gets the element that was selected when opening the dialog, if any. - * - * @returns {CKEDITOR.dom.element} The element that was selected, or `null`. - */ - getSelectedElement: function() { - return this.getParentEditor().getSelection().getSelectedElement(); - }, - - /** - * Adds element to dialog's focusable list. - * - * @param {CKEDITOR.dom.element} element - * @param {Number} [index] - */ - addFocusable: function( element, index ) { - if ( typeof index == 'undefined' ) { - index = this._.focusList.length; - this._.focusList.push( new Focusable( this, element, index ) ); - } else { - this._.focusList.splice( index, 0, new Focusable( this, element, index ) ); - for ( var i = index + 1; i < this._.focusList.length; i++ ) - this._.focusList[ i ].focusIndex++; - } - }, - - /** - * Sets the dialog {@link #property-state}. - * - * @since 4.5.0 - * @param {Number} state Either {@link CKEDITOR#DIALOG_STATE_IDLE} or {@link CKEDITOR#DIALOG_STATE_BUSY}. - */ - setState: function( state ) { - var oldState = this.state; - - if ( oldState == state ) { - return; - } - - this.state = state; - - if ( state == CKEDITOR.DIALOG_STATE_BUSY ) { - // Insert the spinner on demand. - if ( !this.parts.spinner ) { - var dir = this.getParentEditor().lang.dir, - spinnerDef = { - attributes: { - 'class': 'cke_dialog_spinner' - }, - styles: { - 'float': dir == 'rtl' ? 'right' : 'left' - } - }; - - spinnerDef.styles[ 'margin-' + ( dir == 'rtl' ? 'left' : 'right' ) ] = '8px'; - - this.parts.spinner = CKEDITOR.document.createElement( 'div', spinnerDef ); - - this.parts.spinner.setHtml( '⌛' ); - this.parts.spinner.appendTo( this.parts.title, 1 ); - } - - // Finally, show the spinner. - this.parts.spinner.show(); - - this.getButton( 'ok' ).disable(); - } else if ( state == CKEDITOR.DIALOG_STATE_IDLE ) { - // Hide the spinner. But don't do anything if there is no spinner yet. - this.parts.spinner && this.parts.spinner.hide(); - - this.getButton( 'ok' ).enable(); - } - - this.fire( 'state', state ); - }, - - /** - * @inheritdoc CKEDITOR.dialog.definition#getModel - */ - getModel: function( editor ) { - // Prioritize forced model. - if ( this._.model ) { - return this._.model; - } - - if ( this.definition.getModel ) { - return this.definition.getModel( editor ); - } - - return null; - }, - - /** - * Sets the given model as the subject of the dialog. - * - * For most plugins, like the `table` or `link` plugin, the given model should be a - * {@link CKEDITOR.dom.element DOM element instance} if there is an element related to the dialog. - * For widget plugins (`image2`, `placeholder`) you should provide a {@link CKEDITOR.plugins.widget} instance that - * is the subject of this dialog. - * - * @since 4.13.0 - * @private - * @param {CKEDITOR.dom.element/CKEDITOR.plugins.widget/Object/null} newModel The model to be set. - */ - setModel: function( newModel ) { - this._.model = newModel; - }, - - /** - * Returns the current dialog mode based on the state of the feature used with this dialog. - * - * In case if the dialog definition did not define the {@link CKEDITOR.dialog.definition#getMode} - * function, it will use the {@link #getModel} method to recognize the editor mode: - * - * The {@link CKEDITOR.dialog#EDITING_MODE editing mode} is used when the method returns: - * - * * A {@link CKEDITOR.dom.element} attached to the DOM. - * * A {@link CKEDITOR.plugins.widget} instance. - * - * Otherwise the {@link CKEDITOR.dialog#CREATION_MODE creation mode} is used. - * - * @since 4.13.0 - * @param {CKEDITOR.editor} editor - * @returns {Number} Dialog mode. - */ - getMode: function( editor ) { - if ( this.definition.getMode ) { - return this.definition.getMode( editor ); - } - - var model = this.getModel( editor ); - - if ( !model || ( model instanceof CKEDITOR.dom.element && !model.getParent() ) ) { - return CKEDITOR.dialog.CREATION_MODE; - } - - return CKEDITOR.dialog.EDITING_MODE; - } - }; - - CKEDITOR.tools.extend( CKEDITOR.dialog, { - - /** - * Indicates that the dialog is introducing new changes to the editor, for example inserting - * a newly created element as a part of a feature used with this dialog. - * - * @static - * @since 4.13.0 - */ - CREATION_MODE: 0, - - /** - * Indicates that the dialog is modifying the existing editor state, for example updating - * an existing element as a part of a feature used with this dialog. - * - * @static - * @since 4.13.0 - */ - EDITING_MODE: 1, - - /** - * Registers a dialog. - * - * // Full sample plugin, which does not only register a dialog window but also adds an item to the context menu. - * // To open the dialog window, choose "Open dialog" in the context menu. - * CKEDITOR.plugins.add( 'myplugin', { - * init: function( editor ) { - * editor.addCommand( 'mydialog',new CKEDITOR.dialogCommand( 'mydialog' ) ); - * - * if ( editor.contextMenu ) { - * editor.addMenuGroup( 'mygroup', 10 ); - * editor.addMenuItem( 'My Dialog', { - * label: 'Open dialog', - * command: 'mydialog', - * group: 'mygroup' - * } ); - * editor.contextMenu.addListener( function( element ) { - * return { 'My Dialog': CKEDITOR.TRISTATE_OFF }; - * } ); - * } - * - * CKEDITOR.dialog.add( 'mydialog', function( api ) { - * // CKEDITOR.dialog.definition - * var dialogDefinition = { - * title: 'Sample dialog', - * minWidth: 390, - * minHeight: 130, - * contents: [ - * { - * id: 'tab1', - * label: 'Label', - * title: 'Title', - * expand: true, - * padding: 0, - * elements: [ - * { - * type: 'html', - * html: '

This is some sample HTML content.

' - * }, - * { - * type: 'textarea', - * id: 'textareaId', - * rows: 4, - * cols: 40 - * } - * ] - * } - * ], - * buttons: [ CKEDITOR.dialog.okButton, CKEDITOR.dialog.cancelButton ], - * onOk: function() { - * // "this" is now a CKEDITOR.dialog object. - * // Accessing dialog elements: - * var textareaObj = this.getContentElement( 'tab1', 'textareaId' ); - * alert( "You have entered: " + textareaObj.getValue() ); - * } - * }; - * - * return dialogDefinition; - * } ); - * } - * } ); - * - * CKEDITOR.replace( 'editor1', { extraPlugins: 'myplugin' } ); - * - * @static - * @param {String} name The dialog's name. - * @param {Function/String} dialogDefinition - * A function returning the dialog's definition, or the URL to the `.js` file holding the function. - * The function should accept an argument `editor` which is the current editor instance, and - * return an object conforming to {@link CKEDITOR.dialog.definition}. - * @see CKEDITOR.dialog.definition - */ - add: function( name, dialogDefinition ) { - // Avoid path registration from multiple instances override definition. - if ( !this._.dialogDefinitions[ name ] || typeof dialogDefinition == 'function' ) - this._.dialogDefinitions[ name ] = dialogDefinition; - }, - - /** - * @static - * @todo - */ - exists: function( name ) { - return !!this._.dialogDefinitions[ name ]; - }, - - /** - * @static - * @todo - */ - getCurrent: function() { - return CKEDITOR.dialog._.currentTop; - }, - - /** - * Check whether tab wasn't removed by {@link CKEDITOR.config#removeDialogTabs}. - * - * @since 4.1.0 - * @static - * @param {CKEDITOR.editor} editor - * @param {String} dialogName - * @param {String} tabName - * @returns {Boolean} - */ - isTabEnabled: function( editor, dialogName, tabName ) { - var cfg = editor.config.removeDialogTabs; - - return !( cfg && cfg.match( new RegExp( '(?:^|;)' + dialogName + ':' + tabName + '(?:$|;)', 'i' ) ) ); - }, - - /** - * The default OK button for dialogs. Fires the `ok` event and closes the dialog if the event succeeds. - * - * @static - * @method - */ - okButton: ( function() { - var retval = function( editor, override ) { - override = override || {}; - return CKEDITOR.tools.extend( { - id: 'ok', - type: 'button', - label: editor.lang.common.ok, - 'class': 'cke_dialog_ui_button_ok', - onClick: function( evt ) { - var dialog = evt.data.dialog; - if ( dialog.fire( 'ok', { hide: true } ).hide !== false ) - dialog.hide(); - } - }, override, true ); - }; - retval.type = 'button'; - retval.override = function( override ) { - return CKEDITOR.tools.extend( function( editor ) { - return retval( editor, override ); - }, { type: 'button' }, true ); - }; - return retval; - } )(), - - /** - * The default cancel button for dialogs. Fires the `cancel` event and - * closes the dialog if no UI element value changed. - * - * @static - * @method - */ - cancelButton: ( function() { - var retval = function( editor, override ) { - override = override || {}; - return CKEDITOR.tools.extend( { - id: 'cancel', - type: 'button', - label: editor.lang.common.cancel, - 'class': 'cke_dialog_ui_button_cancel', - onClick: function( evt ) { - var dialog = evt.data.dialog; - if ( dialog.fire( 'cancel', { hide: true } ).hide !== false ) - dialog.hide(); - } - }, override, true ); - }; - retval.type = 'button'; - retval.override = function( override ) { - return CKEDITOR.tools.extend( function( editor ) { - return retval( editor, override ); - }, { type: 'button' }, true ); - }; - return retval; - } )(), - - /** - * Registers a dialog UI element. - * - * @static - * @param {String} typeName The name of the UI element. - * @param {Function} builder The function to build the UI element. - */ - addUIElement: function( typeName, builder ) { - this._.uiElementBuilders[ typeName ] = builder; - } - } ); - - CKEDITOR.dialog._ = { - uiElementBuilders: {}, - - dialogDefinitions: {}, - - currentTop: null, - - currentZIndex: null - }; - - // "Inherit" (copy actually) from CKEDITOR.event. - CKEDITOR.event.implementOn( CKEDITOR.dialog ); - CKEDITOR.event.implementOn( CKEDITOR.dialog.prototype ); - - defaultDialogDefinition = { - resizable: CKEDITOR.DIALOG_RESIZE_BOTH, - minWidth: 600, - minHeight: 400, - buttons: [ CKEDITOR.dialog.okButton, CKEDITOR.dialog.cancelButton ] - }; - - // Tool function used to return an item from an array based on its id - // property. - var getById = function( array, id, recurse ) { - for ( var i = 0, item; - ( item = array[ i ] ); i++ ) { - if ( item.id == id ) - return item; - if ( recurse && item[ recurse ] ) { - var retval = getById( item[ recurse ], id, recurse ); - if ( retval ) - return retval; - } - } - return null; - }; - - // Tool function used to add an item into an array. - var addById = function( array, newItem, nextSiblingId, recurse, nullIfNotFound ) { - if ( nextSiblingId ) { - for ( var i = 0, item; - ( item = array[ i ] ); i++ ) { - if ( item.id == nextSiblingId ) { - array.splice( i, 0, newItem ); - return newItem; - } - - if ( recurse && item[ recurse ] ) { - var retval = addById( item[ recurse ], newItem, nextSiblingId, recurse, true ); - if ( retval ) - return retval; - } - } - - if ( nullIfNotFound ) - return null; - } - - array.push( newItem ); - return newItem; - }; - - // Tool function used to remove an item from an array based on its id. - var removeById = function( array, id, recurse ) { - for ( var i = 0, item; - ( item = array[ i ] ); i++ ) { - if ( item.id == id ) - return array.splice( i, 1 ); - if ( recurse && item[ recurse ] ) { - var retval = removeById( item[ recurse ], id, recurse ); - if ( retval ) - return retval; - } - } - return null; - }; - - /** - * This class is not really part of the API. It is the `definition` property value - * passed to `dialogDefinition` event handlers. - * - * CKEDITOR.on( 'dialogDefinition', function( evt ) { - * var definition = evt.data.definition; - * var content = definition.getContents( 'page1' ); - * // ... - * } ); - * - * @private - * @class CKEDITOR.dialog.definitionObject - * @extends CKEDITOR.dialog.definition - * @constructor Creates a definitionObject class instance. - */ - function definitionObject( dialog, dialogDefinition ) { - // TODO : Check if needed. - this.dialog = dialog; - - // Transform the contents entries in contentObjects. - var contents = dialogDefinition.contents; - for ( var i = 0, content; - ( content = contents[ i ] ); i++ ) - contents[ i ] = content && new contentObject( dialog, content ); - - CKEDITOR.tools.extend( this, dialogDefinition ); - } - - definitionObject.prototype = { - /** - * Gets a content definition. - * - * @param {String} id The id of the content definition. - * @returns {CKEDITOR.dialog.definition.content} The content definition matching id. - */ - getContents: function( id ) { - return getById( this.contents, id ); - }, - - /** - * Gets a button definition. - * - * @param {String} id The id of the button definition. - * @returns {CKEDITOR.dialog.definition.button} The button definition matching id. - */ - getButton: function( id ) { - return getById( this.buttons, id ); - }, - - /** - * Adds a content definition object under this dialog definition. - * - * @param {CKEDITOR.dialog.definition.content} contentDefinition The - * content definition. - * @param {String} [nextSiblingId] The id of an existing content - * definition which the new content definition will be inserted - * before. Omit if the new content definition is to be inserted as - * the last item. - * @returns {CKEDITOR.dialog.definition.content} The inserted content definition. - */ - addContents: function( contentDefinition, nextSiblingId ) { - return addById( this.contents, contentDefinition, nextSiblingId ); - }, - - /** - * Adds a button definition object under this dialog definition. - * - * @param {CKEDITOR.dialog.definition.button} buttonDefinition The - * button definition. - * @param {String} [nextSiblingId] The id of an existing button - * definition which the new button definition will be inserted - * before. Omit if the new button definition is to be inserted as - * the last item. - * @returns {CKEDITOR.dialog.definition.button} The inserted button definition. - */ - addButton: function( buttonDefinition, nextSiblingId ) { - return addById( this.buttons, buttonDefinition, nextSiblingId ); - }, - - /** - * Removes a content definition from this dialog definition. - * - * @param {String} id The id of the content definition to be removed. - * @returns {CKEDITOR.dialog.definition.content} The removed content definition. - */ - removeContents: function( id ) { - removeById( this.contents, id ); - }, - - /** - * Removes a button definition from the dialog definition. - * - * @param {String} id The id of the button definition to be removed. - * @returns {CKEDITOR.dialog.definition.button} The removed button definition. - */ - removeButton: function( id ) { - removeById( this.buttons, id ); - } - }; - - /** - * This class is not really part of the API. It is the template of the - * objects representing content pages inside the - * CKEDITOR.dialog.definitionObject. - * - * CKEDITOR.on( 'dialogDefinition', function( evt ) { - * var definition = evt.data.definition; - * var content = definition.getContents( 'page1' ); - * content.remove( 'textInput1' ); - * // ... - * } ); - * - * @private - * @class CKEDITOR.dialog.definition.contentObject - * @constructor Creates a contentObject class instance. - */ - function contentObject( dialog, contentDefinition ) { - this._ = { - dialog: dialog - }; - - CKEDITOR.tools.extend( this, contentDefinition ); - } - - contentObject.prototype = { - /** - * Gets a UI element definition under the content definition. - * - * @param {String} id The id of the UI element definition. - * @returns {CKEDITOR.dialog.definition.uiElement} - */ - get: function( id ) { - return getById( this.elements, id, 'children' ); - }, - - /** - * Adds a UI element definition to the content definition. - * - * @param {CKEDITOR.dialog.definition.uiElement} elementDefinition The - * UI elemnet definition to be added. - * @param {String} nextSiblingId The id of an existing UI element - * definition which the new UI element definition will be inserted - * before. Omit if the new button definition is to be inserted as - * the last item. - * @returns {CKEDITOR.dialog.definition.uiElement} The element definition inserted. - */ - add: function( elementDefinition, nextSiblingId ) { - return addById( this.elements, elementDefinition, nextSiblingId, 'children' ); - }, - - /** - * Removes a UI element definition from the content definition. - * - * @param {String} id The id of the UI element definition to be removed. - * @returns {CKEDITOR.dialog.definition.uiElement} The element definition removed. - */ - remove: function( id ) { - removeById( this.elements, id, 'children' ); - } - }; - - function initDragAndDrop( dialog ) { - var lastCoords = null, - abstractDialogCoords = null, - editor = dialog.getParentEditor(), - magnetDistance = editor.config.dialog_magnetDistance, - margins = CKEDITOR.skin.margins || [ 0, 0, 0, 0 ]; - - if ( typeof magnetDistance == 'undefined' ) - magnetDistance = 20; - - function mouseMoveHandler( evt ) { - var dialogSize = dialog.getSize(), - containerSize = dialog.parts.dialog.getParent().getClientSize(), - x = evt.originalEvent.screenX, - y = evt.originalEvent.screenY, - dx = x - lastCoords.x, - dy = y - lastCoords.y, - realX, realY; - - lastCoords = { x: x, y: y }; - abstractDialogCoords.x += dx; - abstractDialogCoords.y += dy; - - if ( abstractDialogCoords.x + margins[ 3 ] < magnetDistance ) { - realX = -margins[ 3 ]; - } else if ( abstractDialogCoords.x - margins[ 1 ] > containerSize.width - dialogSize.width - magnetDistance ) { - realX = containerSize.width - dialogSize.width + ( editor.lang.dir == 'rtl' ? 0 : margins[ 1 ] ); - } else { - realX = abstractDialogCoords.x; - } - - if ( abstractDialogCoords.y + margins[ 0 ] < magnetDistance ) { - realY = -margins[ 0 ]; - } else if ( abstractDialogCoords.y - margins[ 2 ] > containerSize.height - dialogSize.height - magnetDistance ) { - realY = containerSize.height - dialogSize.height + margins[ 2 ]; - } else { - realY = abstractDialogCoords.y; - } - - realX = Math.floor( realX ); - realY = Math.floor( realY ); - - dialog.move( realX, realY, 1 ); - - evt.preventDefault(); - } - - function mouseUpHandler() { - CMS.$(CKEDITOR.document.$).off( 'pointermove', mouseMoveHandler ); - CMS.$(CKEDITOR.document.$).off( 'pointerup', mouseUpHandler ); - - if ( CKEDITOR.env.ie6Compat ) { - var coverDoc = currentCover.getChild( 0 ).getFrameDocument(); - coverDoc.removeListener( 'mousemove', mouseMoveHandler ); - coverDoc.removeListener( 'mouseup', mouseUpHandler ); - } - } - - CMS.$(dialog.parts.title.$).on( 'pointerdown', function( evt ) { - if ( !dialog._.moved ) { - var container = dialog._.element, - element = container.getFirst(); - - element.setStyle( 'position', 'absolute' ); - container.removeStyle( 'display' ); - - dialog._.moved = true; - dialog.layout(); - } - - lastCoords = { x: evt.originalEvent.screenX, y: evt.originalEvent.screenY }; - - CMS.$(CKEDITOR.document.$).on( 'pointermove', mouseMoveHandler ); - CMS.$(CKEDITOR.document.$).on( 'pointerup', mouseUpHandler ); - abstractDialogCoords = dialog.getPosition(); - - if ( CKEDITOR.env.ie6Compat ) { - var coverDoc = currentCover.getChild( 0 ).getFrameDocument(); - coverDoc.on( 'mousemove', mouseMoveHandler ); - coverDoc.on( 'mouseup', mouseUpHandler ); - } - - evt.preventDefault(); - }); - } - - function initResizeHandles( dialog ) { - var def = dialog.definition, - resizable = def.resizable; - - if ( resizable == CKEDITOR.DIALOG_RESIZE_NONE ) - return; - - var editor = dialog.getParentEditor(); - var wrapperWidth, wrapperHeight, viewSize, origin, startSize, dialogCover; - - var mouseDownFn = CKEDITOR.tools.addFunction( function( $event ) { - startSize = dialog.getSize(); - - var content = dialog.parts.contents, - iframeDialog = content.$.getElementsByTagName( 'iframe' ).length, - isBorderBox = !( CKEDITOR.env.gecko || CKEDITOR.env.ie && CKEDITOR.env.quirks ); - - // Shim to help capturing "mousemove" over iframe. - if ( iframeDialog ) { - CMS.$('.cke_dialog_resize_cover').remove(); - dialogCover = CKEDITOR.dom.element.createFromHtml( '
' ); - content.append( dialogCover ); - } - - // Calculate the offset between content and chrome size. - // Use size of current tab panel because we can't rely on size of contents container (#3144). - wrapperHeight = startSize.height - dialog.parts.contents.getFirst( isVisible ).getSize( 'height', isBorderBox ); - wrapperWidth = startSize.width - dialog.parts.contents.getFirst( isVisible ).getSize( 'width', 1 ); - - origin = { x: $event.screenX, y: $event.screenY }; - - viewSize = CKEDITOR.document.getWindow().getViewPaneSize(); - - CMS.$(CKEDITOR.document.$).on( 'pointermove', mouseMoveHandler ); - CMS.$(CKEDITOR.document.$).on( 'pointerup', mouseUpHandler ); - - if ( CKEDITOR.env.ie6Compat ) { - var coverDoc = currentCover.getChild( 0 ).getFrameDocument(); - coverDoc.on( 'mousemove', mouseMoveHandler ); - coverDoc.on( 'mouseup', mouseUpHandler ); - } - - $event.preventDefault && $event.preventDefault(); - - function isVisible( el ) { - return el.isVisible(); - } - } ); - - // Prepend the grip to the dialog. - dialog.on( 'load', function() { - var direction = ''; - if ( resizable == CKEDITOR.DIALOG_RESIZE_WIDTH ) - direction = ' cke_resizer_horizontal'; - else if ( resizable == CKEDITOR.DIALOG_RESIZE_HEIGHT ) - direction = ' cke_resizer_vertical'; - var resizer = CKEDITOR.dom.element.createFromHtml( - '' + - // BLACK LOWER RIGHT TRIANGLE (ltr) - // BLACK LOWER LEFT TRIANGLE (rtl) - ( editor.lang.dir == 'ltr' ? '\u25E2' : '\u25E3' ) + - '
' ); - dialog.parts.footer.append( resizer, 1 ); - } ); - editor.on( 'destroy', function() { - CKEDITOR.tools.removeFunction( mouseDownFn ); - } ); - - function mouseMoveHandler( evt ) { - var rtl = editor.lang.dir == 'rtl', - dx = ( evt.originalEvent.screenX - origin.x ) * ( rtl ? -1 : 1 ), - dy = evt.originalEvent.screenY - origin.y, - width = startSize.width, - height = startSize.height, - internalWidth = width + dx * ( dialog._.moved ? 1 : 2 ), - internalHeight = height + dy * ( dialog._.moved ? 1 : 2 ), - element = dialog._.element.getFirst(), - right = rtl && parseInt( element.getComputedStyle( 'right' ), 10 ), - position = dialog.getPosition(); - - position.x = position.x || 0; - position.y = position.y || 0; - - if ( position.y + internalHeight > viewSize.height ) { - internalHeight = viewSize.height - position.y; - } - - if ( ( rtl ? right : position.x ) + internalWidth > viewSize.width ) { - internalWidth = viewSize.width - ( rtl ? right : position.x ); - } - - internalHeight = Math.floor( internalHeight ); - internalWidth = Math.floor( internalWidth ); - - // Make sure the dialog will not be resized to the wrong side when it's in the leftmost position for RTL. - if ( resizable == CKEDITOR.DIALOG_RESIZE_WIDTH || resizable == CKEDITOR.DIALOG_RESIZE_BOTH ) { - width = Math.max( def.minWidth || 0, internalWidth - wrapperWidth ); - } - - if ( resizable == CKEDITOR.DIALOG_RESIZE_HEIGHT || resizable == CKEDITOR.DIALOG_RESIZE_BOTH ) { - height = Math.max( def.minHeight || 0, internalHeight - wrapperHeight ); - } - - dialog.resize( width, height ); - - if ( dialog._.moved ) { - var x = dialog._.position.x, - y = dialog._.position.y; - - updateRatios( dialog, x, y ); - } - - if ( !dialog._.moved ) - dialog.layout(); - - evt.preventDefault(); - } - - function mouseUpHandler() { - CMS.$(CKEDITOR.document.$).off( 'pointermove', mouseMoveHandler ); - CMS.$(CKEDITOR.document.$).off( 'pointerup', mouseUpHandler ); - - if ( dialogCover ) { - dialogCover.remove(); - dialogCover = null; - } - - if ( CKEDITOR.env.ie6Compat ) { - var coverDoc = currentCover.getChild( 0 ).getFrameDocument(); - coverDoc.removeListener( 'mouseup', mouseUpHandler ); - coverDoc.removeListener( 'mousemove', mouseMoveHandler ); - } - } - } - - function updateRatios( dialog, x, y ) { - var containerSize = dialog.parts.dialog.getParent().getClientSize(), - dialogSize = dialog.getSize(), - ratios = dialog._.viewportRatio, - freeSpace = { - width: Math.max( containerSize.width - dialogSize.width, 0 ), - height: Math.max( containerSize.height - dialogSize.height, 0 ) - }; - - ratios.width = freeSpace.width ? ( x / freeSpace.width ) : ratios.width; - ratios.height = freeSpace.height ? ( y / freeSpace.height ) : ratios.height; - - dialog._.viewportRatio = ratios; - } - - // Caching reusable covers and allowing only one cover on screen. - var covers = {}; - - function cancelEvent( ev ) { - ev.data.preventDefault( 1 ); - } - - function showCover( editor ) { - var config = editor.config, - skinName = ( CKEDITOR.skinName || editor.config.skin ), - backgroundColorStyle = config.dialog_backgroundCoverColor || ( skinName == 'moono-lisa' ? 'black' : 'white' ), - backgroundCoverOpacity = config.dialog_backgroundCoverOpacity, - baseFloatZIndex = config.baseFloatZIndex + 10000000, - coverKey = CKEDITOR.tools.genKey( backgroundColorStyle, backgroundCoverOpacity, baseFloatZIndex ), - coverElement = covers[ coverKey ]; - - CKEDITOR.document.getBody().addClass( 'cke_dialog_open' ); - CMS.$('.cke_dialog_background_cover:not(.cms-ckeditor-dialog-background-cover)').remove(); - - if ( !coverElement ) { - var html = [ - '
' - ]; - - if ( CKEDITOR.env.ie6Compat ) { - // Support for custom document.domain in IE. - var iframeHtml = ''; - - html.push( '' + - '' ); - } - - html.push( '
' ); - - coverElement = CKEDITOR.dom.element.createFromHtml( html.join( '' ) ); - coverElement.setOpacity( backgroundCoverOpacity !== undefined ? backgroundCoverOpacity : 0.5 ); - - coverElement.on( 'keydown', cancelEvent ); - coverElement.on( 'keypress', cancelEvent ); - coverElement.on( 'keyup', cancelEvent ); - - coverElement.appendTo( CKEDITOR.document.getBody() ); - covers[ coverKey ] = coverElement; - } else { - coverElement.show(); - } - - // Makes the dialog cover a focus holder as well. - editor.focusManager.add( coverElement ); - - currentCover = coverElement; - - // Using Safari/Mac, focus must be kept where it is (https://dev.ckeditor.com/ticket/7027) - if ( !( CKEDITOR.env.mac && CKEDITOR.env.webkit ) ) - coverElement.focus(); - } - - function hideCover( editor ) { - CMS.$('.cke_dialog_background_cover:not(.cms-ckeditor-dialog-background-cover)').remove(); - CKEDITOR.document.getBody().removeClass( 'cke_dialog_open' ); - if ( !currentCover ) - return; - - editor.focusManager.remove( currentCover ); - currentCover.hide(); - } - - function removeCovers() { - for ( var coverId in covers ) - covers[ coverId ].remove(); - covers = {}; - } - - var accessKeyProcessors = {}; - - function accessKeyDownHandler( evt ) { - var ctrl = evt.data.$.ctrlKey || evt.data.$.metaKey, - alt = evt.data.$.altKey, - shift = evt.data.$.shiftKey, - key = String.fromCharCode( evt.data.$.keyCode ), - keyProcessor = accessKeyProcessors[ ( ctrl ? 'CTRL+' : '' ) + ( alt ? 'ALT+' : '' ) + ( shift ? 'SHIFT+' : '' ) + key ]; - - if ( !keyProcessor || !keyProcessor.length ) - return; - - keyProcessor = keyProcessor[ keyProcessor.length - 1 ]; - keyProcessor.keydown && keyProcessor.keydown.call( keyProcessor.uiElement, keyProcessor.dialog, keyProcessor.key ); - evt.data.preventDefault(); - } - - function accessKeyUpHandler( evt ) { - var ctrl = evt.data.$.ctrlKey || evt.data.$.metaKey, - alt = evt.data.$.altKey, - shift = evt.data.$.shiftKey, - key = String.fromCharCode( evt.data.$.keyCode ), - keyProcessor = accessKeyProcessors[ ( ctrl ? 'CTRL+' : '' ) + ( alt ? 'ALT+' : '' ) + ( shift ? 'SHIFT+' : '' ) + key ]; - - if ( !keyProcessor || !keyProcessor.length ) - return; - - keyProcessor = keyProcessor[ keyProcessor.length - 1 ]; - if ( keyProcessor.keyup ) { - keyProcessor.keyup.call( keyProcessor.uiElement, keyProcessor.dialog, keyProcessor.key ); - evt.data.preventDefault(); - } - } - - function registerAccessKey( uiElement, dialog, key, downFunc, upFunc ) { - var procList = accessKeyProcessors[ key ] || ( accessKeyProcessors[ key ] = [] ); - procList.push( { - uiElement: uiElement, - dialog: dialog, - key: key, - keyup: upFunc || uiElement.accessKeyUp, - keydown: downFunc || uiElement.accessKeyDown - } ); - } - - function unregisterAccessKey( obj ) { - for ( var i in accessKeyProcessors ) { - var list = accessKeyProcessors[ i ]; - for ( var j = list.length - 1; j >= 0; j-- ) { - if ( list[ j ].dialog == obj || list[ j ].uiElement == obj ) - list.splice( j, 1 ); - } - if ( list.length === 0 ) - delete accessKeyProcessors[ i ]; - } - } - - function tabAccessKeyUp( dialog, key ) { - if ( dialog._.accessKeyMap[ key ] ) - dialog.selectPage( dialog._.accessKeyMap[ key ] ); - } - - function tabAccessKeyDown() {} - - ( function() { - CKEDITOR.ui.dialog = { - /** - * The base class of all dialog UI elements. - * - * @class CKEDITOR.ui.dialog.uiElement - * @constructor Creates a uiElement class instance. - * @param {CKEDITOR.dialog} dialog Parent dialog object. - * @param {CKEDITOR.dialog.definition.uiElement} elementDefinition Element - * definition. - * - * Accepted fields: - * - * * `id` (Required) The id of the UI element. See {@link CKEDITOR.dialog#getContentElement}. - * * `type` (Required) The type of the UI element. The - * value to this field specifies which UI element class will be used to - * generate the final widget. - * * `title` (Optional) The popup tooltip for the UI - * element. - * * `hidden` (Optional) A flag that tells if the element - * should be initially visible. - * * `className` (Optional) Additional CSS class names - * to add to the UI element. Separated by space. - * * `style` (Optional) Additional CSS inline styles - * to add to the UI element. A semicolon (;) is required after the last - * style declaration. - * * `accessKey` (Optional) The alphanumeric access key - * for this element. Access keys are automatically prefixed by CTRL. - * * `on*` (Optional) Any UI element definition field that - * starts with `on` followed immediately by a capital letter and - * probably more letters is an event handler. Event handlers may be further - * divided into registered event handlers and DOM event handlers. Please - * refer to {@link CKEDITOR.ui.dialog.uiElement#registerEvents} and - * {@link CKEDITOR.ui.dialog.uiElement#eventProcessors} for more information. - * - * @param {Array} htmlList - * List of HTML code to be added to the dialog's content area. - * @param {Function/String} [nodeNameArg='div'] - * A function returning a string, or a simple string for the node name for - * the root DOM node. - * @param {Function/Object} [stylesArg={}] - * A function returning an object, or a simple object for CSS styles applied - * to the DOM node. - * @param {Function/Object} [attributesArg={}] - * A fucntion returning an object, or a simple object for attributes applied - * to the DOM node. - * @param {Function/String} [contentsArg=''] - * A function returning a string, or a simple string for the HTML code inside - * the root DOM node. Default is empty string. - */ - uiElement: function( dialog, elementDefinition, htmlList, nodeNameArg, stylesArg, attributesArg, contentsArg ) { - if ( arguments.length < 4 ) - return; - - var nodeName = ( nodeNameArg.call ? nodeNameArg( elementDefinition ) : nodeNameArg ) || 'div', - html = [ '<', nodeName, ' ' ], - styles = ( stylesArg && stylesArg.call ? stylesArg( elementDefinition ) : stylesArg ) || {}, - attributes = ( attributesArg && attributesArg.call ? attributesArg( elementDefinition ) : attributesArg ) || {}, - innerHTML = ( contentsArg && contentsArg.call ? contentsArg.call( this, dialog, elementDefinition ) : contentsArg ) || '', - domId = this.domId = attributes.id || CKEDITOR.tools.getNextId() + '_uiElement', - i; - - if ( elementDefinition.requiredContent && !dialog.getParentEditor().filter.check( elementDefinition.requiredContent ) ) { - styles.display = 'none'; - this.notAllowed = true; - } - - // Set the id, a unique id is required for getElement() to work. - attributes.id = domId; - - // Set the type and definition CSS class names. - var classes = {}; - if ( elementDefinition.type ) - classes[ 'cke_dialog_ui_' + elementDefinition.type ] = 1; - if ( elementDefinition.className ) - classes[ elementDefinition.className ] = 1; - if ( elementDefinition.disabled ) - classes.cke_disabled = 1; - - var attributeClasses = ( attributes[ 'class' ] && attributes[ 'class' ].split ) ? attributes[ 'class' ].split( ' ' ) : []; - for ( i = 0; i < attributeClasses.length; i++ ) { - if ( attributeClasses[ i ] ) - classes[ attributeClasses[ i ] ] = 1; - } - var finalClasses = []; - for ( i in classes ) - finalClasses.push( i ); - attributes[ 'class' ] = finalClasses.join( ' ' ); - - // Set the popup tooltop. - if ( elementDefinition.title ) - attributes.title = elementDefinition.title; - - // Write the inline CSS styles. - var styleStr = ( elementDefinition.style || '' ).split( ';' ); - - // Element alignment support. - if ( elementDefinition.align ) { - var align = elementDefinition.align; - styles[ 'margin-left' ] = align == 'left' ? 0 : 'auto'; - styles[ 'margin-right' ] = align == 'right' ? 0 : 'auto'; - } - - for ( i in styles ) - styleStr.push( i + ':' + styles[ i ] ); - if ( elementDefinition.hidden ) - styleStr.push( 'display:none' ); - for ( i = styleStr.length - 1; i >= 0; i-- ) { - if ( styleStr[ i ] === '' ) - styleStr.splice( i, 1 ); - } - if ( styleStr.length > 0 ) - attributes.style = ( attributes.style ? ( attributes.style + '; ' ) : '' ) + styleStr.join( '; ' ); - - // Write the attributes. - for ( i in attributes ) - html.push( i + '="' + CKEDITOR.tools.htmlEncode( attributes[ i ] ) + '" ' ); - - // Write the content HTML. - html.push( '>', innerHTML, '' ); - - // Add contents to the parent HTML array. - htmlList.push( html.join( '' ) ); - - ( this._ || ( this._ = {} ) ).dialog = dialog; - - // Override isChanged if it is defined in element definition. - if ( typeof elementDefinition.isChanged == 'boolean' ) - this.isChanged = function() { - return elementDefinition.isChanged; - }; - if ( typeof elementDefinition.isChanged == 'function' ) - this.isChanged = elementDefinition.isChanged; - - // Overload 'get(set)Value' on definition. - if ( typeof elementDefinition.setValue == 'function' ) { - this.setValue = CKEDITOR.tools.override( this.setValue, function( org ) { - return function( val ) { - org.call( this, elementDefinition.setValue.call( this, val ) ); - }; - } ); - } - - if ( typeof elementDefinition.getValue == 'function' ) { - this.getValue = CKEDITOR.tools.override( this.getValue, function( org ) { - return function() { - return elementDefinition.getValue.call( this, org.call( this ) ); - }; - } ); - } - - // Add events. - CKEDITOR.event.implementOn( this ); - - this.registerEvents( elementDefinition ); - if ( this.accessKeyUp && this.accessKeyDown && elementDefinition.accessKey ) - registerAccessKey( this, dialog, 'CTRL+' + elementDefinition.accessKey ); - - var me = this; - dialog.on( 'load', function() { - var input = me.getInputElement(); - if ( input ) { - var focusClass = me.type in { 'checkbox': 1, 'ratio': 1 } && CKEDITOR.env.ie && CKEDITOR.env.version < 8 ? 'cke_dialog_ui_focused' : ''; - input.on( 'focus', function() { - dialog._.tabBarMode = false; - dialog._.hasFocus = true; - me.fire( 'focus' ); - focusClass && this.addClass( focusClass ); - - } ); - - input.on( 'blur', function() { - me.fire( 'blur' ); - focusClass && this.removeClass( focusClass ); - } ); - } - } ); - - // Completes this object with everything we have in the - // definition. - CKEDITOR.tools.extend( this, elementDefinition ); - - // Register the object as a tab focus if it can be included. - if ( this.keyboardFocusable ) { - this.tabIndex = elementDefinition.tabIndex || 0; - - this.focusIndex = dialog._.focusList.push( this ) - 1; - this.on( 'focus', function() { - dialog._.currentFocusIndex = me.focusIndex; - } ); - } - }, - - /** - * Horizontal layout box for dialog UI elements, auto-expends to available width of container. - * - * @class CKEDITOR.ui.dialog.hbox - * @extends CKEDITOR.ui.dialog.uiElement - * @constructor Creates a hbox class instance. - * @param {CKEDITOR.dialog} dialog Parent dialog object. - * @param {Array} childObjList - * Array of {@link CKEDITOR.ui.dialog.uiElement} objects inside this container. - * @param {Array} childHtmlList - * Array of HTML code that correspond to the HTML output of all the - * objects in childObjList. - * @param {Array} htmlList - * Array of HTML code that this element will output to. - * @param {CKEDITOR.dialog.definition.uiElement} elementDefinition - * The element definition. Accepted fields: - * - * * `widths` (Optional) The widths of child cells. - * * `height` (Optional) The height of the layout. - * * `padding` (Optional) The padding width inside child cells. - * * `align` (Optional) The alignment of the whole layout. - */ - hbox: function( dialog, childObjList, childHtmlList, htmlList, elementDefinition ) { - if ( arguments.length < 4 ) - return; - - this._ || ( this._ = {} ); - - var children = this._.children = childObjList, - widths = elementDefinition && elementDefinition.widths || null, - height = elementDefinition && elementDefinition.height || null, - styles = {}, - i; - /** @ignore */ - var innerHTML = function() { - var html = [ '' ]; - for ( i = 0; i < childHtmlList.length; i++ ) { - var className = 'cke_dialog_ui_hbox_child', - styles = []; - if ( i === 0 ) { - className = 'cke_dialog_ui_hbox_first'; - } - if ( i == childHtmlList.length - 1 ) { - className = 'cke_dialog_ui_hbox_last'; - } - - html.push( ' 0 ) { - html.push( 'style="' + styles.join( '; ' ) + '" ' ); - } - html.push( '>', childHtmlList[ i ], '' ); - } - html.push( '' ); - return html.join( '' ); - }; - - var attribs = { role: 'presentation' }; - elementDefinition && elementDefinition.align && ( attribs.align = elementDefinition.align ); - - CKEDITOR.ui.dialog.uiElement.call( this, dialog, elementDefinition || { type: 'hbox' }, htmlList, 'table', styles, attribs, innerHTML ); - }, - - /** - * Vertical layout box for dialog UI elements. - * - * @class CKEDITOR.ui.dialog.vbox - * @extends CKEDITOR.ui.dialog.hbox - * @constructor Creates a vbox class instance. - * @param {CKEDITOR.dialog} dialog Parent dialog object. - * @param {Array} childObjList - * Array of {@link CKEDITOR.ui.dialog.uiElement} objects inside this container. - * @param {Array} childHtmlList - * Array of HTML code that correspond to the HTML output of all the - * objects in childObjList. - * @param {Array} htmlList Array of HTML code that this element will output to. - * @param {CKEDITOR.dialog.definition.uiElement} elementDefinition - * The element definition. Accepted fields: - * - * * `width` (Optional) The width of the layout. - * * `heights` (Optional) The heights of individual cells. - * * `align` (Optional) The alignment of the layout. - * * `padding` (Optional) The padding width inside child cells. - * * `expand` (Optional) Whether the layout should expand - * vertically to fill its container. - */ - vbox: function( dialog, childObjList, childHtmlList, htmlList, elementDefinition ) { - if ( arguments.length < 3 ) - return; - - this._ || ( this._ = {} ); - - var children = this._.children = childObjList, - width = elementDefinition && elementDefinition.width || null, - heights = elementDefinition && elementDefinition.heights || null; - /** @ignore */ - var innerHTML = function() { - var html = [ '' ); - for ( var i = 0; i < childHtmlList.length; i++ ) { - var styles = []; - html.push( '' ); - } - html.push( '
0 ) - html.push( 'style="', styles.join( '; ' ), '" ' ); - html.push( ' class="cke_dialog_ui_vbox_child">', childHtmlList[ i ], '
' ); - return html.join( '' ); - }; - CKEDITOR.ui.dialog.uiElement.call( this, dialog, elementDefinition || { type: 'vbox' }, htmlList, 'div', null, { role: 'presentation' }, innerHTML ); - } - }; - } )(); - - /** @class CKEDITOR.ui.dialog.uiElement */ - CKEDITOR.ui.dialog.uiElement.prototype = { - /** - * Gets the root DOM element of this dialog UI object. - * - * uiElement.getElement().hide(); - * - * @returns {CKEDITOR.dom.element} Root DOM element of UI object. - */ - getElement: function() { - return CKEDITOR.document.getById( this.domId ); - }, - - /** - * Gets the DOM element that the user inputs values. - * - * This function is used by {@link #setValue}, {@link #getValue} and {@link #focus}. It should - * be overrided in child classes where the input element isn't the root - * element. - * - * var rawValue = textInput.getInputElement().$.value; - * - * @returns {CKEDITOR.dom.element} The element where the user input values. - */ - getInputElement: function() { - return this.getElement(); - }, - - /** - * Gets the parent dialog object containing this UI element. - * - * var dialog = uiElement.getDialog(); - * - * @returns {CKEDITOR.dialog} Parent dialog object. - */ - getDialog: function() { - return this._.dialog; - }, - - /** - * Sets the value of this dialog UI object. - * - * uiElement.setValue( 'Dingo' ); - * - * @chainable - * @param {Object} value The new value. - * @param {Boolean} noChangeEvent Internal commit, to supress `change` event on this element. - */ - setValue: function( value, noChangeEvent ) { - this.getInputElement().setValue( value ); - !noChangeEvent && this.fire( 'change', { value: value } ); - return this; - }, - - /** - * Gets the current value of this dialog UI object. - * - * var myValue = uiElement.getValue(); - * - * @returns {Object} The current value. - */ - getValue: function() { - return this.getInputElement().getValue(); - }, - - /** - * Tells whether the UI object's value has changed. - * - * if ( uiElement.isChanged() ) - * confirm( 'Value changed! Continue?' ); - * - * @returns {Boolean} `true` if changed, `false` if not changed. - */ - isChanged: function() { - // Override in input classes. - return false; - }, - - /** - * Selects the parent tab of this element. Usually called by focus() or overridden focus() methods. - * - * focus : function() { - * this.selectParentTab(); - * // do something else. - * } - * - * @chainable - */ - selectParentTab: function() { - var element = this.getInputElement(), - cursor = element, - tabId; - while ( ( cursor = cursor.getParent() ) && cursor.$.className.search( 'cke_dialog_page_contents' ) == -1 ) { - - } - - // Some widgets don't have parent tabs (e.g. OK and Cancel buttons). - if ( !cursor ) - return this; - - tabId = cursor.getAttribute( 'name' ); - // Avoid duplicate select. - if ( this._.dialog._.currentTabId != tabId ) - this._.dialog.selectPage( tabId ); - return this; - }, - - /** - * Puts the focus to the UI object. Switches tabs if the UI object isn't in the active tab page. - * - * uiElement.focus(); - * - * @chainable - */ - focus: function() { - this.selectParentTab().getInputElement().focus(); - return this; - }, - - /** - * Registers the `on*` event handlers defined in the element definition. - * - * The default behavior of this function is: - * - * 1. If the on* event is defined in the class's eventProcesors list, - * then the registration is delegated to the corresponding function - * in the eventProcessors list. - * 2. If the on* event is not defined in the eventProcessors list, then - * register the event handler under the corresponding DOM event of - * the UI element's input DOM element (as defined by the return value - * of {@link #getInputElement}). - * - * This function is only called at UI element instantiation, but can - * be overridded in child classes if they require more flexibility. - * - * @chainable - * @param {CKEDITOR.dialog.definition.uiElement} definition The UI element - * definition. - */ - registerEvents: function( definition ) { - var regex = /^on([A-Z]\w+)/, - match; - - var registerDomEvent = function( uiElement, dialog, eventName, func ) { - dialog.on( 'load', function() { - uiElement.getInputElement().on( eventName, func, uiElement ); - } ); - }; - - for ( var i in definition ) { - if ( !( match = i.match( regex ) ) ) - continue; - if ( this.eventProcessors[ i ] ) - this.eventProcessors[ i ].call( this, this._.dialog, definition[ i ] ); - else - registerDomEvent( this, this._.dialog, match[ 1 ].toLowerCase(), definition[ i ] ); - } - - return this; - }, - - /** - * The event processor list used by - * {@link CKEDITOR.ui.dialog.uiElement#getInputElement} at UI element - * instantiation. The default list defines three `on*` events: - * - * 1. `onLoad` - Called when the element's parent dialog opens for the - * first time. - * 2. `onShow` - Called whenever the element's parent dialog opens. - * 3. `onHide` - Called whenever the element's parent dialog closes. - * - * // This connects the 'click' event in CKEDITOR.ui.dialog.button to onClick - * // handlers in the UI element's definitions. - * CKEDITOR.ui.dialog.button.eventProcessors = CKEDITOR.tools.extend( {}, - * CKEDITOR.ui.dialog.uiElement.prototype.eventProcessors, - * { onClick : function( dialog, func ) { this.on( 'click', func ); } }, - * true - * ); - * - * @property {Object} - */ - eventProcessors: { - onLoad: function( dialog, func ) { - dialog.on( 'load', func, this ); - }, - - onShow: function( dialog, func ) { - dialog.on( 'show', func, this ); - }, - - onHide: function( dialog, func ) { - dialog.on( 'hide', func, this ); - } - }, - - /** - * The default handler for a UI element's access key down event, which - * tries to put focus to the UI element. - * - * Can be overridded in child classes for more sophisticaed behavior. - * - * @param {CKEDITOR.dialog} dialog The parent dialog object. - * @param {String} key The key combination pressed. Since access keys - * are defined to always include the `CTRL` key, its value should always - * include a `'CTRL+'` prefix. - */ - accessKeyDown: function() { - this.focus(); - }, - - /** - * The default handler for a UI element's access key up event, which - * does nothing. - * - * Can be overridded in child classes for more sophisticated behavior. - * - * @param {CKEDITOR.dialog} dialog The parent dialog object. - * @param {String} key The key combination pressed. Since access keys - * are defined to always include the `CTRL` key, its value should always - * include a `'CTRL+'` prefix. - */ - accessKeyUp: function() {}, - - /** - * Disables a UI element. - */ - disable: function() { - var element = this.getElement(), - input = this.getInputElement(); - input.setAttribute( 'disabled', 'true' ); - element.addClass( 'cke_disabled' ); - }, - - /** - * Enables a UI element. - */ - enable: function() { - var element = this.getElement(), - input = this.getInputElement(); - input.removeAttribute( 'disabled' ); - element.removeClass( 'cke_disabled' ); - }, - - /** - * Determines whether an UI element is enabled or not. - * - * @returns {Boolean} Whether the UI element is enabled. - */ - isEnabled: function() { - return !this.getElement().hasClass( 'cke_disabled' ); - }, - - /** - * Determines whether an UI element is visible or not. - * - * @returns {Boolean} Whether the UI element is visible. - */ - isVisible: function() { - return this.getInputElement().isVisible(); - }, - - /** - * Determines whether an UI element is focus-able or not. - * Focus-able is defined as being both visible and enabled. - * - * @returns {Boolean} Whether the UI element can be focused. - */ - isFocusable: function() { - if ( !this.isEnabled() || !this.isVisible() ) - return false; - return true; - } - }; - - /** @class CKEDITOR.ui.dialog.hbox */ - CKEDITOR.ui.dialog.hbox.prototype = CKEDITOR.tools.extend( new CKEDITOR.ui.dialog.uiElement(), { - /** - * Gets a child UI element inside this container. - * - * var checkbox = hbox.getChild( [0,1] ); - * checkbox.setValue( true ); - * - * @param {Array/Number} indices An array or a single number to indicate the child's - * position in the container's descendant tree. Omit to get all the children in an array. - * @returns {Array/CKEDITOR.ui.dialog.uiElement} Array of all UI elements in the container - * if no argument given, or the specified UI element if indices is given. - */ - getChild: function( indices ) { - // If no arguments, return a clone of the children array. - if ( arguments.length < 1 ) - return this._.children.concat(); - - // If indices isn't array, make it one. - if ( !indices.splice ) - indices = [ indices ]; - - // Retrieve the child element according to tree position. - if ( indices.length < 2 ) - return this._.children[ indices[ 0 ] ]; - else - return ( this._.children[ indices[ 0 ] ] && this._.children[ indices[ 0 ] ].getChild ) ? this._.children[ indices[ 0 ] ].getChild( indices.slice( 1, indices.length ) ) : null; - } - }, true ); - - CKEDITOR.ui.dialog.vbox.prototype = new CKEDITOR.ui.dialog.hbox(); - - ( function() { - var commonBuilder = { - build: function( dialog, elementDefinition, output ) { - var children = elementDefinition.children, - child, - childHtmlList = [], - childObjList = []; - for ( var i = 0; - ( i < children.length && ( child = children[ i ] ) ); i++ ) { - var childHtml = []; - childHtmlList.push( childHtml ); - childObjList.push( CKEDITOR.dialog._.uiElementBuilders[ child.type ].build( dialog, child, childHtml ) ); - } - return new CKEDITOR.ui.dialog[ elementDefinition.type ]( dialog, childObjList, childHtmlList, output, elementDefinition ); - } - }; - - CKEDITOR.dialog.addUIElement( 'hbox', commonBuilder ); - CKEDITOR.dialog.addUIElement( 'vbox', commonBuilder ); - } )(); - - /** - * Generic dialog command. It opens a specific dialog when executed. - * - * // Register the "link" command which opens the "link" dialog. - * editor.addCommand( 'link', new CKEDITOR.dialogCommand( 'link' ) ); - * - * @class - * @constructor Creates a dialogCommand class instance. - * @extends CKEDITOR.commandDefinition - * @param {String} dialogName The name of the dialog to open when executing - * this command. - * @param {Object} [ext] Additional command definition's properties. - * @param {String} [ext.tabId] You can provide additional property (`tabId`) if you wish to open the dialog on a specific tabId. - * - * // Open the dialog on the 'keystroke' tabId. - * editor.addCommand( 'keystroke', new CKEDITOR.dialogCommand( 'a11yHelp', { tabId: 'keystroke' } ) ); - */ - CKEDITOR.dialogCommand = function( dialogName, ext ) { - this.dialogName = dialogName; - CKEDITOR.tools.extend( this, ext, true ); - }; - - CKEDITOR.dialogCommand.prototype = { - exec: function( editor ) { - var tabId = this.tabId; - editor.openDialog( this.dialogName, function( dialog ) { - // Select different tab if it's provided (#830). - if ( tabId ) { - dialog.selectPage( tabId ); - } - } ); - }, - - // Dialog commands just open a dialog ui, thus require no undo logic, - // undo support should dedicate to specific dialog implementation. - canUndo: false, - - editorFocus: 1 - }; - - ( function() { - var notEmptyRegex = /^([a]|[^a])+$/, - integerRegex = /^\d*$/, - numberRegex = /^\d*(?:\.\d+)?$/, - htmlLengthRegex = /^(((\d*(\.\d+))|(\d*))(px|\%)?)?$/, - cssLengthRegex = /^(((\d*(\.\d+))|(\d*))(px|em|ex|in|cm|mm|pt|pc|\%)?)?$/i, - inlineStyleRegex = /^(\s*[\w-]+\s*:\s*[^:;]+(?:;|$))*$/; - - /** - * {@link CKEDITOR.dialog Dialog} `OR` logical value indicates the - * relation between validation functions. - * - * @readonly - * @property {Number} [=1] - * @member CKEDITOR - */ - CKEDITOR.VALIDATE_OR = 1; - - /** - * {@link CKEDITOR.dialog Dialog} `AND` logical value indicates the - * relation between validation functions. - * - * @readonly - * @property {Number} [=2] - * @member CKEDITOR - */ - CKEDITOR.VALIDATE_AND = 2; - - /** - * The namespace with dialog helper validation functions. - * - * @class - * @singleton - */ - CKEDITOR.dialog.validate = { - /** - * Performs validation functions composition. - * - * ```javascript - * CKEDITOR.dialog.validate.functions( - * CKEDITOR.dialog.validate.notEmpty( 'Value is required.' ), - * CKEDITOR.dialog.validate.number( 'Value is not a number.' ), - * 'error!' - * ); - * ``` - * - * @param {Function...} validators Validation functions which will be composed into a single validator. - * @param {String} [msg] Error message returned by the composed validation function. - * @param {Number} [relation=CKEDITOR.VALIDATE_OR] Indicates a relation between validation functions. - * Use {@link CKEDITOR#VALIDATE_OR} or {@link CKEDITOR#VALIDATE_AND}. - * - * @returns {Function} Composed validation function. - */ - functions: function() { - var args = arguments; - return function() { - // It's important for validate functions to be able to accept the value - // as argument in addition to this.getValue(), so that it is possible to - // combine validate functions together to make more sophisticated - // validators. - var value = this && this.getValue ? this.getValue() : args[ 0 ]; - - var msg, - relation = CKEDITOR.VALIDATE_AND, - functions = [], - i; - - for ( i = 0; i < args.length; i++ ) { - if ( typeof args[ i ] == 'function' ) - functions.push( args[ i ] ); - else - break; - } - - if ( i < args.length && typeof args[ i ] == 'string' ) { - msg = args[ i ]; - i++; - } - - if ( i < args.length && typeof args[ i ] == 'number' ) - relation = args[ i ]; - - var passed = ( relation == CKEDITOR.VALIDATE_AND ? true : false ); - for ( i = 0; i < functions.length; i++ ) { - if ( relation == CKEDITOR.VALIDATE_AND ) - passed = passed && functions[ i ]( value ); - else - passed = passed || functions[ i ]( value ); - } - - return !passed ? msg : true; - }; - }, - - /** - * Checks if a dialog UI element value meets the regex condition. - * - * ```javascript - * CKEDITOR.dialog.validate.regex( 'error!', /^\d*$/ )( '123' ) // true - * CKEDITOR.dialog.validate.regex( 'error!' )( '123.321' ) // error! - * ``` - * - * @param {RegExp} regex Regular expression used to validate the value. - * @param {String} msg Validator error message. - * @returns {Function} Validation function. - */ - regex: function( regex, msg ) { - /* - * Can be greatly shortened by deriving from functions validator if code size - * turns out to be more important than performance. - */ - return function() { - var value = this && this.getValue ? this.getValue() : arguments[ 0 ]; - return !regex.test( value ) ? msg : true; - }; - }, - - /** - * Checks if a dialog UI element value is not an empty string. - * - * ```javascript - * CKEDITOR.dialog.validate.notEmpty( 'error!' )( 'test' ) // true - * CKEDITOR.dialog.validate.notEmpty( 'error!' )( ' ' ) // error! - * ``` - * - * @param {String} msg Validator error message. - * @returns {Function} Validation function. - */ - notEmpty: function( msg ) { - return this.regex( notEmptyRegex, msg ); - }, - - /** - * Checks if a dialog UI element value is an Integer. - * - * ```javascript - * CKEDITOR.dialog.validate.integer( 'error!' )( '123' ) // true - * CKEDITOR.dialog.validate.integer( 'error!' )( '123.321' ) // error! - * ``` - * - * @param {String} msg Validator error message. - * @returns {Function} Validation function. - */ - integer: function( msg ) { - return this.regex( integerRegex, msg ); - }, - - /** - * Checks if a dialog UI element value is a Number. - * - * ```javascript - * CKEDITOR.dialog.validate.number( 'error!' )( '123' ) // true - * CKEDITOR.dialog.validate.number( 'error!' )( 'test' ) // error! - * ``` - * - * @param {String} msg Validator error message. - * @returns {Function} Validation function. - */ - 'number': function( msg ) { - return this.regex( numberRegex, msg ); - }, - - /** - * Checks if a dialog UI element value is a correct CSS length value. - * - * It allows `px`, `em`, `ex`, `in`, `cm`, `mm`, `pt`, `pc` units. - * - * ```javascript - * CKEDITOR.dialog.validate.cssLength( 'error!' )( '10pt' ) // true - * CKEDITOR.dialog.validate.cssLength( 'error!' )( 'solid' ) // error! - * ``` - * - * @param {String} msg Validator error message. - * @returns {Function} Validation function. - */ - 'cssLength': function( msg ) { - return this.functions( function( val ) { - return cssLengthRegex.test( CKEDITOR.tools.trim( val ) ); - }, msg ); - }, - - /** - * Checks if a dialog UI element value is a correct HTML length value. - * - * It allows `px` units. - * - * ```javascript - * CKEDITOR.dialog.validate.htmlLength( 'error!' )( '10px' ) // true - * CKEDITOR.dialog.validate.htmlLength( 'error!' )( 'solid' ) // error! - * ``` - * - * @param {String} msg Validator error message. - * @returns {Function} Validation function. - */ - 'htmlLength': function( msg ) { - return this.functions( function( val ) { - return htmlLengthRegex.test( CKEDITOR.tools.trim( val ) ); - }, msg ); - }, - - /** - * Checks if a dialog UI element value is a correct CSS inline style. - * - * ```javascript - * CKEDITOR.dialog.validate.inlineStyle( 'error!' )( 'height: 10px; width: 20px;' ) // true - * CKEDITOR.dialog.validate.inlineStyle( 'error!' )( 'test' ) // error! - * ``` - * - * @param {String} msg Validator error message. - * @returns {Function} Validation function. - */ - 'inlineStyle': function( msg ) { - return this.functions( function( val ) { - return inlineStyleRegex.test( CKEDITOR.tools.trim( val ) ); - }, msg ); - }, - - /** - * Checks if a dialog UI element value and the given value are equal. - * - * ```javascript - * CKEDITOR.dialog.validate.equals( 'foo', 'error!' )( 'foo' ) // true - * CKEDITOR.dialog.validate.equals( 'foo', 'error!' )( 'baz' ) // error! - * ``` - * - * @param {String} value The value to compare. - * @param {String} msg Validator error message. - * @returns {Function} Validation function. - */ - equals: function( value, msg ) { - return this.functions( function( val ) { - return val == value; - }, msg ); - }, - - /** - * Checks if a dialog UI element value and the given value are not equal. - * - * ```javascript - * CKEDITOR.dialog.validate.notEqual( 'foo', 'error!' )( 'baz' ) // true - * CKEDITOR.dialog.validate.notEqual( 'foo', 'error!' )( 'foo' ) // error! - * ``` - * - * @param {String} value The value to compare. - * @param {String} msg Validator error message. - * @returns {Function} Validation function. - */ - notEqual: function( value, msg ) { - return this.functions( function( val ) { - return val != value; - }, msg ); - } - }; - - CKEDITOR.on( 'instanceDestroyed', function( evt ) { - // Remove dialog cover on last instance destroy. - if ( CKEDITOR.tools.isEmpty( CKEDITOR.instances ) ) { - var currentTopDialog; - while ( ( currentTopDialog = CKEDITOR.dialog._.currentTop ) ) - currentTopDialog.hide(); - removeCovers(); - } - - var dialogs = evt.editor._.storedDialogs; - for ( var name in dialogs ) - dialogs[ name ].destroy(); - - } ); - - } )(); - - // Extend the CKEDITOR.editor class with dialog specific functions. - CKEDITOR.tools.extend( CKEDITOR.editor.prototype, { - /** - * Loads and opens a registered dialog. - * - * CKEDITOR.instances.editor1.openDialog( 'smiley' ); - * - * @member CKEDITOR.editor - * @param {String} dialogName The registered name of the dialog. - * @param {Function} callback The function to be invoked after a dialog instance is created. - * @param {CKEDITOR.dom.element/CKEDITOR.plugins.widget/Object} [forceModel] Forces opening the dialog - * using the given model as a subject. The forced model will take precedence before the - * {@link CKEDITOR.dialog.definition#getModel} method. Available since 4.13.0. - * @returns {CKEDITOR.dialog} The dialog object corresponding to the dialog displayed or - * `null` if the dialog name is not registered. - * @see CKEDITOR.dialog#add - */ - openDialog: function( dialogName, callback, forceModel ) { - var dialog = null, dialogDefinitions = CKEDITOR.dialog._.dialogDefinitions[ dialogName ]; - - if ( CKEDITOR.dialog._.currentTop === null ) - showCover( this ); - - // If the dialogDefinition is already loaded, open it immediately. - if ( typeof dialogDefinitions == 'function' ) { - var storedDialogs = this._.storedDialogs || ( this._.storedDialogs = {} ); - - dialog = storedDialogs[ dialogName ] || ( storedDialogs[ dialogName ] = new CKEDITOR.dialog( this, dialogName ) ); - - dialog.setModel( forceModel ); - - callback && callback.call( dialog, dialog ); - dialog.show(); - - } else if ( dialogDefinitions == 'failed' ) { - hideCover( this ); - throw new Error( '[CKEDITOR.dialog.openDialog] Dialog "' + dialogName + '" failed when loading definition.' ); - } else if ( typeof dialogDefinitions == 'string' ) { - - CKEDITOR.scriptLoader.load( CKEDITOR.getUrl( dialogDefinitions ), - function() { - var dialogDefinition = CKEDITOR.dialog._.dialogDefinitions[ dialogName ]; - // In case of plugin error, mark it as loading failed. - if ( typeof dialogDefinition != 'function' ) - CKEDITOR.dialog._.dialogDefinitions[ dialogName ] = 'failed'; - - this.openDialog( dialogName, callback, forceModel ); - }, this, 0, 1 ); - } - - CKEDITOR.skin.loadPart( 'dialog' ); - - // Dissolve model, so `definition.getModel` can take precedence - // in the next dialog opening (#2423). - if ( dialog ) { - dialog.once( 'hide', function() { - dialog.setModel( null ); - }, null, null, 999 ); - } - - return dialog; - } - } ); -} )(); - -var stylesLoaded = false; - -CKEDITOR.plugins.registered['dialog'] = null; -CKEDITOR.plugins.add( 'dialog', { - requires: 'dialogui', - init: function( editor ) { - if ( !stylesLoaded ) { - CKEDITOR.document.appendStyleSheet( this.path + 'styles/dialog.css' ); - stylesLoaded = true; - } - - editor.on( 'doubleclick', function( evt ) { - if ( evt.data.dialog ) - editor.openDialog( evt.data.dialog ); - }, null, null, 999 ); - } -} ); -CKEDITOR.plugins.add( 'cmsdialog', { - requires: 'dialogui', - init: function( editor ) { - } -} ); - -// Dialog related configurations. - -/** - * The color of the dialog background cover. It should be a valid CSS color string. - * - * config.dialog_backgroundCoverColor = 'rgb(255, 254, 253)'; - * - * @cfg {String} [dialog_backgroundCoverColor='white'] - * @member CKEDITOR.config - */ - -/** - * The opacity of the dialog background cover. It should be a number within the - * range `[0.0, 1.0]`. - * - * config.dialog_backgroundCoverOpacity = 0.7; - * - * @cfg {Number} [dialog_backgroundCoverOpacity=0.5] - * @member CKEDITOR.config - */ - -/** - * If the dialog has more than one tab, put focus into the first tab as soon as dialog is opened. - * - * config.dialog_startupFocusTab = true; - * - * @cfg {Boolean} [dialog_startupFocusTab=false] - * @member CKEDITOR.config - */ - -/** - * The distance of magnetic borders used in moving and resizing dialogs, - * measured in pixels. - * - * config.dialog_magnetDistance = 30; - * - * @cfg {Number} [dialog_magnetDistance=20] - * @member CKEDITOR.config - */ - -/** - * The guideline to follow when generating the dialog buttons. There are 3 possible options: - * - * * `'OS'` - the buttons will be displayed in the default order of the user's OS; - * * `'ltr'` - for Left-To-Right order; - * * `'rtl'` - for Right-To-Left order. - * - * Example: - * - * config.dialog_buttonsOrder = 'rtl'; - * - * @since 3.5.0 - * @cfg {String} [dialog_buttonsOrder='OS'] - * @member CKEDITOR.config - */ - -/** - * The dialog contents to removed. It's a string composed by dialog name and tab name with a colon between them. - * - * Separate each pair with semicolon (see example). - * - * **Note:** All names are case-sensitive. - * - * **Note:** Be cautious when specifying dialog tabs that are mandatory, - * like `'info'`, dialog functionality might be broken because of this! - * - * config.removeDialogTabs = 'flash:advanced;image:Link'; - * - * @since 3.5.0 - * @cfg {String} [removeDialogTabs=''] - * @member CKEDITOR.config - */ - -/** - * Tells if user should not be asked to confirm close, if any dialog field was modified. - * By default it is set to `false` meaning that the confirmation dialog will be shown. - * - * config.dialog_noConfirmCancel = true; - * - * @since 4.3.0 - * @cfg {Boolean} [dialog_noConfirmCancel=false] - * @member CKEDITOR.config - */ - -/** - * Event fired when a dialog definition is about to be used to create a dialog in - * an editor instance. This event makes it possible to customize the definition - * before creating it. - * - * Note that this event is called only the first time a specific dialog is - * opened. Successive openings will use the cached dialog, and this event will - * not get fired. - * - * @event dialogDefinition - * @member CKEDITOR - * @param {Object} data - * @param {String} data.name The name of the dialog. - * @param {CKEDITOR.dialog.definition} data.definition The dialog definition that - * is being loaded. - * @param {CKEDITOR.dialog} data.dialog A dialog instance that the definition is loaded - * for. Introduced in **CKEditor 4.13.0**. - * @param {CKEDITOR.editor} editor The editor instance that will use the dialog. - */ - -/** - * Event fired when a tab is going to be selected in a dialog. - * - * @event selectPage - * @member CKEDITOR.dialog - * @param data - * @param {String} data.page The ID of the page that is going to be selected. - * @param {String} data.currentPage The ID of the current page. - */ - -/** - * Event fired when the user tries to dismiss a dialog. - * - * @event cancel - * @member CKEDITOR.dialog - * @param data - * @param {Boolean} data.hide Whether the event should proceed or not. - */ - -/** - * Event fired when the user tries to confirm a dialog. - * - * @event ok - * @member CKEDITOR.dialog - * @param data - * @param {Boolean} data.hide Whether the event should proceed or not. - */ - -/** - * Event fired when a dialog is shown. - * - * @event show - * @member CKEDITOR.dialog - */ - -/** - * Event fired when a dialog is shown. - * - * @event dialogShow - * @member CKEDITOR.editor - * @param {CKEDITOR.editor} editor This editor instance. - * @param {CKEDITOR.dialog} data The opened dialog instance. - */ - -/** - * Event fired when a dialog is hidden. - * - * @event hide - * @member CKEDITOR.dialog - */ - -/** - * Event fired when a dialog is hidden. - * - * @event dialogHide - * @member CKEDITOR.editor - * @param {CKEDITOR.editor} editor This editor instance. - * @param {CKEDITOR.dialog} data The hidden dialog instance. - */ - -/** - * Event fired when a dialog is being resized. The event is fired on - * both the {@link CKEDITOR.dialog} object and the dialog instance - * since 3.5.3, previously it was only available in the global object. - * - * @static - * @event resize - * @member CKEDITOR.dialog - * @param data - * @param {CKEDITOR.dialog} data.dialog The dialog being resized (if - * it is fired on the dialog itself, this parameter is not sent). - * @param {String} data.skin The skin name. - * @param {Number} data.width The new width. - * @param {Number} data.height The new height. - */ - -/** - * Event fired when a dialog is being resized. The event is fired on - * both the {@link CKEDITOR.dialog} object and the dialog instance - * since 3.5.3, previously it was only available in the global object. - * - * @since 3.5.0 - * @event resize - * @member CKEDITOR.dialog - * @param data - * @param {Number} data.width The new width. - * @param {Number} data.height The new height. - */ - -/** - * Event fired when the dialog state changes, usually by {@link CKEDITOR.dialog#setState}. - * - * @since 4.5.0 - * @event state - * @member CKEDITOR.dialog - * @param data - * @param {Number} data The new state. Either {@link CKEDITOR#DIALOG_STATE_IDLE} or {@link CKEDITOR#DIALOG_STATE_BUSY}. - */ -})(CMS.$); - - -/***/ }), - -/***/ "./private/js/ckeditor4_plugins/cmsplugins/plugin.js": -/*!***********************************************************!*\ - !*** ./private/js/ckeditor4_plugins/cmsplugins/plugin.js ***! - \***********************************************************/ -/***/ (() => { - -(function ($) { - if (CKEDITOR && CKEDITOR.plugins && CKEDITOR.plugins.registered && CKEDITOR.plugins.registered.cmsplugins) { - return; - } - - /** - * Determine if we should return `div` or `span` based on the - * plugin markup. - * - * @function getFakePluginElement - * @private - * @param {String} pluginMarkup valid html hopefully - * @returns {String} div|span - */ - function getFakePluginElement(pluginMarkup) { - var innerTags = (pluginMarkup.match(/<\s*([^>\s]+)[\s\S]*?>/) || [0, false]).splice(1); - - var containsAnyBlockLikeElements = innerTags.some(function (tag) { - return tag && CKEDITOR.dtd.$block[tag]; - }); - - var fakeRealType = 'span'; - - if (containsAnyBlockLikeElements) { - fakeRealType = 'div'; - } - - return fakeRealType; - } - - /** - * @function replaceTagName - * @private - * @param {jQuery} elements - * @param {String} tagName - */ - function replaceTagName(elements, tagName) { - elements.each(function (i, el) { - var newElement; - - var element = $(el); - - newElement = $('<' + tagName + '>'); - - // attributes - $.each(el.attributes, function (index, attribute) { - newElement.attr(attribute.nodeName, attribute.nodeValue); - }); - - // content - newElement.html(element.html()); - - element.replaceWith(newElement); - }); - } - - CKEDITOR.plugins.add('cmsplugins', { - - // Register the icons. They must match command names. - icons: 'cmsplugins', - - // The plugin initialization logic goes inside this method. - init: function (editor) { - var that = this; - - CKEDITOR.on('instanceReady', function () { - var widgetInstances = []; - - for (var key in editor.widgets.instances) { - if (editor.widgets.instances.hasOwnProperty(key)) { - widgetInstances.push(editor.widgets.instances[key]); - } - } - - that.numberOfChildren = CKEDITOR.tools.array.filter(widgetInstances, function (i) { - return i.name === 'cms-widget'; - }).length; - }); - /** - * populated with _fresh_ child plugins - */ - this.unsaved_child_plugins = []; - - var settings = CMS_Editor.get_settings(editor.name); - this.setupCancelCleanupCallback(settings); - - // don't do anything if there are no plugins defined - if (settings === undefined || settings.plugins === undefined) { - return false; - } - - this.setupDialog(editor); - - // add the button - editor.ui.add('cmsplugins', CKEDITOR.UI_PANELBUTTON, { - toolbar: 'cms,0', - label: settings.lang.toolbar, - title: settings.lang.toolbar, - className: 'cke_panelbutton__cmsplugins', - modes: { wysiwyg: 1 }, - editorFocus: 0, - - panel: { - css: [CKEDITOR.skin.getPath('editor')].concat(editor.config.contentsCss), - attributes: { 'role': 'cmsplugins', 'aria-label': settings.lang.aria } - }, - - // this is called when creating the dropdown list - onBlock: function (panel, block) { - block.element.setHtml(editor.plugins.cmsplugins.setupDropdown(editor)); - - var anchors = $(block.element.$).find('.cke_panel_listItem a'); - - anchors.bind('click', function (e) { - e.preventDefault(); - - that.addPlugin($(this), panel, editor); - }); - } - }); - - // handle edit event via context menu - if (editor.contextMenu) { - this.setupContextMenu(editor); - } - - editor.addCommand('cmspluginsEdit', { - exec: function () { - var element = that.getElementFromSelection(editor); - var plugin = that.getPluginWidget(element); - if (plugin) { - that.editPlugin(plugin, editor); - } - } - }); - - // handle edit event on double click - // if event is a jQuery event (touchend), than we mutate - // event a bit so we make the payload similar to what ckeditor.event produces - var handleEdit = function (event) { - event.stop(); - - if (event.type === 'touchend' || event.type === 'click') { - var cmsPluginNode = $(event.currentTarget).closest('cms-plugin')[0]; - var element; - - // pick cke_widget span - // eslint-disable-next-line new-cap - element = new CKEDITOR.dom.element(cmsPluginNode).getParent(); - - event.data = event.data || {}; - // have to fake selection to be able to replace markup after editing - editor.getSelection().fake(element); - } - - editor.execCommand('cmspluginsEdit'); - }; - - editor.on('doubleclick', handleEdit); - - editor.on('instanceReady', function () { -/* - var context = CMS.$('iframe.cke_wysiwyg_frame'); - if (context.length > 0) { - context = context.contentWindow.document.documentElement; - } else { - context = null; - } - CMS.$('cms-plugin', CMS.$('iframe.cke_wysiwyg_frame')[0] - .contentWindow.document.documentElement).on('click touchend', handleEdit); -*/ - }); - - this.setupDataProcessor(editor); - }, - - getElementFromSelection: function (editor) { - var selection = editor.getSelection(); - var element = selection.getSelectedElement() || - selection.getCommonAncestor().getAscendant('cms-plugin', true); - - return element; - }, - - getPluginWidget: function (element) { - if (!element) { - return null; - } - return element.getAscendant('cms-plugin', true) || element.findOne('cms-plugin'); - }, - - setupDialog: function (editor) { - var that = this; - var definition = function () { - return { - title: '', - minWidth: 200, - minHeight: 200, - contents: [{ - elements: [ - { - type: 'html', - html: '' );\n\t\t\tiframe.appendTo( body.getParent() );\n\t\t}\n\n\t\t// Make the Title and Close Button unselectable.\n\t\ttitle.unselectable();\n\t\tclose.unselectable();\n\n\t\treturn {\n\t\t\telement: element,\n\t\t\tparts: {\n\t\t\t\tdialog: element.getChild( 0 ),\n\t\t\t\ttitle: title,\n\t\t\t\tclose: close,\n\t\t\t\ttabs: body.getChild( 2 ),\n\t\t\t\tcontents: body.getChild( [ 3, 0, 0, 0 ] ),\n\t\t\t\tfooter: body.getChild( [ 3, 0, 1, 0 ] )\n\t\t\t}\n\t\t};\n\t}\n\n\t/**\n\t * This is the base class for runtime dialog objects. An instance of this\n\t * class represents a single named dialog for a single editor instance.\n\t *\n\t *\t\tvar dialogObj = new CKEDITOR.dialog( editor, 'smiley' );\n\t *\n\t * @class\n\t * @constructor Creates a dialog class instance.\n\t * @param {Object} editor The editor which created the dialog.\n\t * @param {String} dialogName The dialog's registered name.\n\t */\n\tCKEDITOR.dialog = function( editor, dialogName ) {\n\t\t// Load the dialog definition.\n\t\tvar definition = CKEDITOR.dialog._.dialogDefinitions[ dialogName ],\n\t\t\tdefaultDefinition = CKEDITOR.tools.clone( defaultDialogDefinition ),\n\t\t\tbuttonsOrder = editor.config.dialog_buttonsOrder || 'OS',\n\t\t\tdir = editor.lang.dir,\n\t\t\ttabsToRemove = {},\n\t\t\ti, processed, stopPropagation;\n\n\t\tif ( ( buttonsOrder == 'OS' && CKEDITOR.env.mac ) || // The buttons in MacOS Apps are in reverse order (https://dev.ckeditor.com/ticket/4750)\n\t\t( buttonsOrder == 'rtl' && dir == 'ltr' ) || ( buttonsOrder == 'ltr' && dir == 'rtl' ) )\n\t\t\tdefaultDefinition.buttons.reverse();\n\n\n\t\t// Completes the definition with the default values.\n\t\tdefinition = CKEDITOR.tools.extend( definition( editor ), defaultDefinition );\n\n\t\t// Clone a functionally independent copy for this dialog.\n\t\tdefinition = CKEDITOR.tools.clone( definition );\n\n\t\t// Create a complex definition object, extending it with the API\n\t\t// functions.\n\t\tdefinition = new definitionObject( this, definition );\n\n\t\tvar themeBuilt = buildDialog( editor );\n\n\t\t// Initialize some basic parameters.\n\t\tthis._ = {\n\t\t\teditor: editor,\n\t\t\telement: themeBuilt.element,\n\t\t\tname: dialogName,\n\t\t\tmodel: null,\n\t\t\tcontentSize: { width: 0, height: 0 },\n\t\t\tsize: { width: 0, height: 0 },\n\t\t\tcontents: {},\n\t\t\tbuttons: {},\n\t\t\taccessKeyMap: {},\n\t\t\t// Default value is 0.5 which means a centered dialog.\n\t\t\tviewportRatio: {\n\t\t\t\twidth: 0.5,\n\t\t\t\theight: 0.5\n\t\t\t},\n\n\t\t\t// Initialize the tab and page map.\n\t\t\ttabs: {},\n\t\t\ttabIdList: [],\n\t\t\tcurrentTabId: null,\n\t\t\tcurrentTabIndex: null,\n\t\t\tpageCount: 0,\n\t\t\tlastTab: null,\n\t\t\ttabBarMode: false,\n\n\t\t\t// Initialize the tab order array for input widgets.\n\t\t\tfocusList: [],\n\t\t\tcurrentFocusIndex: 0,\n\t\t\thasFocus: false\n\t\t};\n\n\t\tthis.parts = themeBuilt.parts;\n\n\t\tCKEDITOR.tools.setTimeout( function() {\n\t\t\teditor.fire( 'ariaWidget', this.parts.contents );\n\t\t}, 0, this );\n\n\t\t// Set the startup styles for the dialog, avoiding it enlarging the\n\t\t// page size on the dialog creation.\n\t\tvar startStyles = {\n\t\t\ttop: 0,\n\t\t\tvisibility: 'hidden'\n\t\t};\n\n\t\tif ( CKEDITOR.env.ie6Compat ) {\n\t\t\tstartStyles.position = 'absolute';\n\t\t}\n\n\t\tstartStyles[ dir == 'rtl' ? 'right' : 'left' ] = 0;\n\t\tthis.parts.dialog.setStyles( startStyles );\n\n\n\t\t// Call the CKEDITOR.event constructor to initialize this instance.\n\t\tCKEDITOR.event.call( this );\n\n\t\t// Fire the \"dialogDefinition\" event, making it possible to customize\n\t\t// the dialog definition.\n\t\tthis.definition = definition = CKEDITOR.fire( 'dialogDefinition', {\n\t\t\tname: dialogName,\n\t\t\tdefinition: definition,\n\t\t\tdialog: this\n\t\t}, editor ).definition;\n\n\t\t// Cache tabs that should be removed.\n\t\tif ( !( 'removeDialogTabs' in editor._ ) && editor.config.removeDialogTabs ) {\n\t\t\tvar removeContents = editor.config.removeDialogTabs.split( ';' );\n\n\t\t\tfor ( i = 0; i < removeContents.length; i++ ) {\n\t\t\t\tvar parts = removeContents[ i ].split( ':' );\n\t\t\t\tif ( parts.length == 2 ) {\n\t\t\t\t\tvar removeDialogName = parts[ 0 ];\n\t\t\t\t\tif ( !tabsToRemove[ removeDialogName ] )\n\t\t\t\t\t\ttabsToRemove[ removeDialogName ] = [];\n\t\t\t\t\ttabsToRemove[ removeDialogName ].push( parts[ 1 ] );\n\t\t\t\t}\n\t\t\t}\n\t\t\teditor._.removeDialogTabs = tabsToRemove;\n\t\t}\n\n\t\t// Remove tabs of this dialog.\n\t\tif ( editor._.removeDialogTabs && ( tabsToRemove = editor._.removeDialogTabs[ dialogName ] ) ) {\n\t\t\tfor ( i = 0; i < tabsToRemove.length; i++ )\n\t\t\t\tdefinition.removeContents( tabsToRemove[ i ] );\n\t\t}\n\n\t\t// Initialize load, show, hide, ok and cancel events.\n\t\tif ( definition.onLoad )\n\t\t\tthis.on( 'load', definition.onLoad );\n\n\t\tif ( definition.onShow )\n\t\t\tthis.on( 'show', definition.onShow );\n\n\t\tif ( definition.onHide )\n\t\t\tthis.on( 'hide', definition.onHide );\n\n\t\tif ( definition.onOk ) {\n\t\t\tthis.on( 'ok', function( evt ) {\n\t\t\t\t// Dialog confirm might probably introduce content changes (https://dev.ckeditor.com/ticket/5415).\n\t\t\t\teditor.fire( 'saveSnapshot' );\n\t\t\t\tsetTimeout( function() {\n\t\t\t\t\teditor.fire( 'saveSnapshot' );\n\t\t\t\t}, 0 );\n\t\t\t\tif ( definition.onOk.call( this, evt ) === false )\n\t\t\t\t\tevt.data.hide = false;\n\t\t\t} );\n\t\t}\n\n\t\t// Set default dialog state.\n\t\tthis.state = CKEDITOR.DIALOG_STATE_IDLE;\n\n\t\tif ( definition.onCancel ) {\n\t\t\tthis.on( 'cancel', function( evt ) {\n\t\t\t\tif ( definition.onCancel.call( this, evt ) === false )\n\t\t\t\t\tevt.data.hide = false;\n\t\t\t} );\n\t\t}\n\n\t\tvar me = this;\n\n\t\t// Iterates over all items inside all content in the dialog, calling a\n\t\t// function for each of them.\n\t\tvar iterContents = function( func ) {\n\t\t\t\tvar contents = me._.contents,\n\t\t\t\t\tstop = false;\n\n\t\t\t\tfor ( var i in contents ) {\n\t\t\t\t\tfor ( var j in contents[ i ] ) {\n\t\t\t\t\t\tstop = func.call( this, contents[ i ][ j ] );\n\t\t\t\t\t\tif ( stop )\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t};\n\n\t\tthis.on( 'ok', function( evt ) {\n\t\t\titerContents( function( item ) {\n\t\t\t\tif ( item.validate ) {\n\t\t\t\t\tvar retval = item.validate( this ),\n\t\t\t\t\t\tinvalid = ( typeof retval == 'string' ) || retval === false;\n\n\t\t\t\t\tif ( invalid ) {\n\t\t\t\t\t\tevt.data.hide = false;\n\t\t\t\t\t\tevt.stop();\n\t\t\t\t\t}\n\n\t\t\t\t\thandleFieldValidated.call( item, !invalid, typeof retval == 'string' ? retval : undefined );\n\t\t\t\t\treturn invalid;\n\t\t\t\t}\n\t\t\t} );\n\t\t}, this, null, 0 );\n\n\t\tthis.on( 'cancel', function( evt ) {\n\t\t\titerContents( function( item ) {\n\t\t\t\tif ( item.isChanged() ) {\n\t\t\t\t\tif ( !editor.config.dialog_noConfirmCancel && !confirm( editor.lang.common.confirmCancel ) ) // jshint ignore:line\n\t\t\t\t\t\tevt.data.hide = false;\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t} );\n\t\t}, this, null, 0 );\n\n\t\tthis.parts.close.on( 'click', function( evt ) {\n\t\t\tif ( this.fire( 'cancel', { hide: true } ).hide !== false )\n\t\t\t\tthis.hide();\n\t\t\tevt.data.preventDefault();\n\t\t}, this );\n\n\t\t// Sort focus list according to tab order definitions.\n\t\tfunction setupFocus() {\n\t\t\tvar focusList = me._.focusList;\n\t\t\tfocusList.sort( function( a, b ) {\n\t\t\t\t// Mimics browser tab order logics;\n\t\t\t\tif ( a.tabIndex != b.tabIndex )\n\t\t\t\t\treturn b.tabIndex - a.tabIndex;\n\t\t\t\t// Sort is not stable in some browsers,\n\t\t\t\t// fall-back the comparator to 'focusIndex';\n\t\t\t\telse\n\t\t\t\t\treturn a.focusIndex - b.focusIndex;\n\t\t\t} );\n\n\t\t\tvar size = focusList.length;\n\t\t\tfor ( var i = 0; i < size; i++ )\n\t\t\t\tfocusList[ i ].focusIndex = i;\n\t\t}\n\n\t\t// Expects 1 or -1 as an offset, meaning direction of the offset change.\n\t\tfunction changeFocus( offset ) {\n\t\t\tvar focusList = me._.focusList;\n\t\t\toffset = offset || 0;\n\n\t\t\tif ( focusList.length < 1 )\n\t\t\t\treturn;\n\n\t\t\tvar startIndex = me._.currentFocusIndex;\n\n\t\t\tif ( me._.tabBarMode && offset < 0 ) {\n\t\t\t\t// If we are in tab mode, we need to mimic that we started tabbing back from the first\n\t\t\t\t// focusList (so it will go to the last one).\n\t\t\t\tstartIndex = 0;\n\t\t\t}\n\n\t\t\t// Trigger the 'blur' event of any input element before anything,\n\t\t\t// since certain UI updates may depend on it.\n\t\t\ttry {\n\t\t\t\tfocusList[ startIndex ].getInputElement().$.blur();\n\t\t\t} catch ( e ) {}\n\n\t\t\tvar currentIndex = startIndex,\n\t\t\t\thasTabs = me._.pageCount > 1;\n\n\t\t\tdo {\n\t\t\t\tcurrentIndex = currentIndex + offset;\n\n\t\t\t\tif ( hasTabs && !me._.tabBarMode && ( currentIndex == focusList.length || currentIndex == -1 ) ) {\n\t\t\t\t\t// If the dialog was not in tab mode, then focus the first tab (https://dev.ckeditor.com/ticket/13027).\n\t\t\t\t\tme._.tabBarMode = true;\n\t\t\t\t\tme._.tabs[ me._.currentTabId ][ 0 ].focus();\n\t\t\t\t\tme._.currentFocusIndex = -1;\n\n\t\t\t\t\t// Early return, in order to avoid accessing focusList[ -1 ].\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tcurrentIndex = ( currentIndex + focusList.length ) % focusList.length;\n\n\t\t\t\tif ( currentIndex == startIndex ) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t} while ( offset && !focusList[ currentIndex ].isFocusable() );\n\n\t\t\tfocusList[ currentIndex ].focus();\n\n\t\t\t// Select whole field content.\n\t\t\tif ( focusList[ currentIndex ].type == 'text' )\n\t\t\t\tfocusList[ currentIndex ].select();\n\t\t}\n\n\t\tthis.changeFocus = changeFocus;\n\n\n\t\tfunction keydownHandler( evt ) {\n\t\t\t// If I'm not the top dialog, ignore.\n\t\t\tif ( me != CKEDITOR.dialog._.currentTop )\n\t\t\t\treturn;\n\n\t\t\tvar keystroke = evt.data.getKeystroke(),\n\t\t\t\trtl = editor.lang.dir == 'rtl',\n\t\t\t\tarrowKeys = [ 37, 38, 39, 40 ],\n\t\t\t\tbutton;\n\n\t\t\tprocessed = stopPropagation = 0;\n\n\t\t\tif ( keystroke == 9 || keystroke == CKEDITOR.SHIFT + 9 ) {\n\t\t\t\tvar shiftPressed = ( keystroke == CKEDITOR.SHIFT + 9 );\n\t\t\t\tchangeFocus( shiftPressed ? -1 : 1 );\n\t\t\t\tprocessed = 1;\n\t\t\t} else if ( keystroke == CKEDITOR.ALT + 121 && !me._.tabBarMode && me.getPageCount() > 1 ) {\n\t\t\t\t// Alt-F10 puts focus into the current tab item in the tab bar.\n\t\t\t\tfocusActiveTab( me );\n\t\t\t\tprocessed = 1;\n\t\t\t} else if ( CKEDITOR.tools.indexOf( arrowKeys, keystroke ) != -1 && me._.tabBarMode ) {\n\t\t\t\t// Array with key codes that activate previous tab.\n\t\t\t\tvar prevKeyCodes = [\n\t\t\t\t\t\t// Depending on the lang dir: right or left key\n\t\t\t\t\t\trtl ? 39 : 37,\n\t\t\t\t\t\t// Top/bot arrow: actually for both cases it's the same.\n\t\t\t\t\t\t38\n\t\t\t\t\t],\n\t\t\t\t\tnextId = CKEDITOR.tools.indexOf( prevKeyCodes, keystroke ) != -1 ? getPreviousVisibleTab.call( me ) : getNextVisibleTab.call( me );\n\n\t\t\t\tme.selectPage( nextId );\n\t\t\t\tme._.tabs[ nextId ][ 0 ].focus();\n\t\t\t\tprocessed = 1;\n\t\t\t} else if ( ( keystroke == 13 || keystroke == 32 ) && me._.tabBarMode ) {\n\t\t\t\tthis.selectPage( this._.currentTabId );\n\t\t\t\tthis._.tabBarMode = false;\n\t\t\t\tthis._.currentFocusIndex = -1;\n\t\t\t\tchangeFocus( 1 );\n\t\t\t\tprocessed = 1;\n\t\t\t}\n\t\t\t// If user presses enter key in a text box, it implies clicking OK for the dialog.\n\t\t\telse if ( keystroke == 13 /*ENTER*/ ) {\n\t\t\t\t// Don't do that for a target that handles ENTER.\n\t\t\t\tvar target = evt.data.getTarget();\n\t\t\t\tif ( !target.is( 'a', 'button', 'select', 'textarea' ) && ( !target.is( 'input' ) || target.$.type != 'button' ) ) {\n\t\t\t\t\tbutton = this.getButton( 'ok' );\n\t\t\t\t\tbutton && CKEDITOR.tools.setTimeout( button.click, 0, button );\n\t\t\t\t\tprocessed = 1;\n\t\t\t\t}\n\t\t\t\tstopPropagation = 1; // Always block the propagation (https://dev.ckeditor.com/ticket/4269)\n\t\t\t} else if ( keystroke == 27 /*ESC*/ ) {\n\t\t\t\tbutton = this.getButton( 'cancel' );\n\n\t\t\t\t// If there's a Cancel button, click it, else just fire the cancel event and hide the dialog.\n\t\t\t\tif ( button )\n\t\t\t\t\tCKEDITOR.tools.setTimeout( button.click, 0, button );\n\t\t\t\telse {\n\t\t\t\t\tif ( this.fire( 'cancel', { hide: true } ).hide !== false )\n\t\t\t\t\t\tthis.hide();\n\t\t\t\t}\n\t\t\t\tstopPropagation = 1; // Always block the propagation (https://dev.ckeditor.com/ticket/4269)\n\t\t\t} else {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tkeypressHandler( evt );\n\t\t}\n\n\t\tfunction keypressHandler( evt ) {\n\t\t\tif ( processed )\n\t\t\t\tevt.data.preventDefault( 1 );\n\t\t\telse if ( stopPropagation )\n\t\t\t\tevt.data.stopPropagation();\n\t\t}\n\n\t\tvar dialogElement = this._.element;\n\n\t\teditor.focusManager.add( dialogElement, 1 );\n\n\t\t// Add the dialog keyboard handlers.\n\t\tthis.on( 'show', function() {\n\t\t\tdialogElement.on( 'keydown', keydownHandler, this );\n\n\t\t\t// Some browsers instead, don't cancel key events in the keydown, but in the\n\t\t\t// keypress. So we must do a longer trip in those cases. (https://dev.ckeditor.com/ticket/4531,https://dev.ckeditor.com/ticket/8985)\n\t\t\tif ( CKEDITOR.env.gecko )\n\t\t\t\tdialogElement.on( 'keypress', keypressHandler, this );\n\n\t\t} );\n\t\tthis.on( 'hide', function() {\n\t\t\tdialogElement.removeListener( 'keydown', keydownHandler );\n\t\t\tif ( CKEDITOR.env.gecko )\n\t\t\t\tdialogElement.removeListener( 'keypress', keypressHandler );\n\n\t\t\t// Reset fields state when closing dialog.\n\t\t\titerContents( function( item ) {\n\t\t\t\tresetField.apply( item );\n\t\t\t} );\n\t\t} );\n\t\tthis.on( 'iframeAdded', function( evt ) {\n\t\t\tvar doc = new CKEDITOR.dom.document( evt.data.iframe.$.contentWindow.document );\n\t\t\tdoc.on( 'keydown', keydownHandler, this, null, 0 );\n\t\t} );\n\n\t\t// Auto-focus logic in dialog.\n\t\tthis.on( 'show', function() {\n\t\t\t// Setup tabIndex on showing the dialog instead of on loading\n\t\t\t// to allow dynamic tab order happen in dialog definition.\n\t\t\tsetupFocus();\n\n\t\t\tvar hasTabs = me._.pageCount > 1;\n\n\t\t\tif ( editor.config.dialog_startupFocusTab && hasTabs ) {\n\t\t\t\tme._.tabBarMode = true;\n\t\t\t\tme._.tabs[ me._.currentTabId ][ 0 ].focus();\n\t\t\t\tme._.currentFocusIndex = -1;\n\t\t\t} else if ( !this._.hasFocus ) {\n\t\t\t\t// https://dev.ckeditor.com/ticket/13114#comment:4.\n\t\t\t\tthis._.currentFocusIndex = hasTabs ? -1 : this._.focusList.length - 1;\n\n\t\t\t\t// Decide where to put the initial focus.\n\t\t\t\tif ( definition.onFocus ) {\n\t\t\t\t\tvar initialFocus = definition.onFocus.call( this );\n\t\t\t\t\t// Focus the field that the user specified.\n\t\t\t\t\tinitialFocus && initialFocus.focus();\n\t\t\t\t}\n\t\t\t\t// Focus the first field in layout order.\n\t\t\t\telse {\n\t\t\t\t\tchangeFocus( 1 );\n\t\t\t\t}\n\t\t\t}\n\t\t}, this, null, 0xffffffff );\n\n\t\t// IE6 BUG: Text fields and text areas are only half-rendered the first time the dialog appears in IE6 (https://dev.ckeditor.com/ticket/2661).\n\t\t// This is still needed after [2708] and [2709] because text fields in hidden TR tags are still broken.\n\t\tif ( CKEDITOR.env.ie6Compat ) {\n\t\t\tthis.on( 'load', function() {\n\t\t\t\tvar outer = this.getElement(),\n\t\t\t\t\tinner = outer.getFirst();\n\t\t\t\tinner.remove();\n\t\t\t\tinner.appendTo( outer );\n\t\t\t}, this );\n\t\t}\n\n\t\tinitDragAndDrop( this );\n\t\tinitResizeHandles( this );\n\n\t\t// Insert the title.\n\t\t( new CKEDITOR.dom.text( definition.title, CKEDITOR.document ) ).appendTo( this.parts.title );\n\n\t\t// Insert the tabs and contents.\n\t\tfor ( i = 0; i < definition.contents.length; i++ ) {\n\t\t\tvar page = definition.contents[ i ];\n\t\t\tpage && this.addPage( page );\n\t\t}\n\n\t\tthis.parts.tabs.on( 'click', function( evt ) {\n\t\t\tvar target = evt.data.getTarget();\n\t\t\t// If we aren't inside a tab, bail out.\n\t\t\tif ( target.hasClass( 'cke_dialog_tab' ) ) {\n\t\t\t\t// Get the ID of the tab, without the 'cke_' prefix and the unique number suffix.\n\t\t\t\tvar id = target.$.id;\n\t\t\t\tthis.selectPage( id.substring( 4, id.lastIndexOf( '_' ) ) );\n\n\t\t\t\tfocusActiveTab( this );\n\n\t\t\t\tevt.data.preventDefault();\n\t\t\t}\n\t\t}, this );\n\n\t\t// Insert buttons.\n\t\tvar buttonsHtml = [],\n\t\t\tbuttons = CKEDITOR.dialog._.uiElementBuilders.hbox.build( this, {\n\t\t\t\ttype: 'hbox',\n\t\t\t\tclassName: 'cke_dialog_footer_buttons',\n\t\t\t\twidths: [],\n\t\t\t\tchildren: definition.buttons\n\t\t\t}, buttonsHtml ).getChild();\n\t\tthis.parts.footer.setHtml( buttonsHtml.join( '' ) );\n\n\t\tfor ( i = 0; i < buttons.length; i++ )\n\t\t\tthis._.buttons[ buttons[ i ].id ] = buttons[ i ];\n\n\t\t/**\n\t\t * Current state of the dialog. Use the {@link #setState} method to update it.\n\t\t * See the {@link #event-state} event to know more.\n\t\t *\n\t\t * @readonly\n\t\t * @property {Number} [state=CKEDITOR.DIALOG_STATE_IDLE]\n\t\t */\n\t};\n\n\t// Focusable interface. Use it via dialog.addFocusable.\n\tfunction Focusable( dialog, element, index ) {\n\t\tthis.element = element;\n\t\tthis.focusIndex = index;\n\t\t// TODO: support tabIndex for focusables.\n\t\tthis.tabIndex = 0;\n\t\tthis.isFocusable = function() {\n\t\t\treturn !element.getAttribute( 'disabled' ) && element.isVisible();\n\t\t};\n\t\tthis.focus = function() {\n\t\t\tdialog._.currentFocusIndex = this.focusIndex;\n\t\t\tthis.element.focus();\n\t\t};\n\t\t// Bind events\n\t\telement.on( 'keydown', function( e ) {\n\t\t\tif ( e.data.getKeystroke() in { 32: 1, 13: 1 } )\n\t\t\t\tthis.fire( 'click' );\n\t\t} );\n\t\telement.on( 'focus', function() {\n\t\t\tthis.fire( 'mouseover' );\n\t\t} );\n\t\telement.on( 'blur', function() {\n\t\t\tthis.fire( 'mouseout' );\n\t\t} );\n\t}\n\n\t// Re-layout the dialog on window resize.\n\tfunction resizeWithWindow( dialog ) {\n\t\tvar win = CKEDITOR.document.getWindow();\n\t\tfunction resizeHandler() {\n\t\t\tdialog.layout();\n\t\t}\n\t\twin.on( 'resize', resizeHandler );\n\t\tdialog.on( 'hide', function() {\n\t\t\twin.removeListener( 'resize', resizeHandler );\n\t\t} );\n\t}\n\n\tCKEDITOR.dialog.prototype = {\n\t\tdestroy: function() {\n\t\t\tthis.hide();\n\t\t\tthis._.element.remove();\n\t\t},\n\n\t\t/**\n\t\t * Resizes the dialog.\n\t\t *\n\t\t *\t\tdialogObj.resize( 800, 640 );\n\t\t *\n\t\t * @method\n\t\t * @param {Number} width The width of the dialog in pixels.\n\t\t * @param {Number} height The height of the dialog in pixels.\n\t\t */\n\t\tresize: function( width, height ) {\n\t\t\tif ( this._.contentSize && this._.contentSize.width == width && this._.contentSize.height == height )\n\t\t\t\treturn;\n\n\t\t\tCKEDITOR.dialog.fire( 'resize', {\n\t\t\t\tdialog: this,\n\t\t\t\twidth: width,\n\t\t\t\theight: height\n\t\t\t}, this._.editor );\n\n\t\t\tthis.fire( 'resize', {\n\t\t\t\twidth: width,\n\t\t\t\theight: height\n\t\t\t}, this._.editor );\n\n\t\t\tvar contents = this.parts.contents;\n\t\t\tcontents.setStyles( {\n\t\t\t\twidth: width + 'px',\n\t\t\t\theight: height + 'px'\n\t\t\t} );\n\n\t\t\t// Update dialog position when dimension get changed in RTL.\n\t\t\tif ( this._.editor.lang.dir == 'rtl' && this._.position ) {\n\t\t\t\tvar containerWidth = this.parts.dialog.getParent().getClientSize().width;\n\n\t\t\t\tthis._.position.x = containerWidth - this._.contentSize.width - parseInt( this._.element.getFirst().getStyle( 'right' ), 10 );\n\t\t\t}\n\n\t\t\tthis._.contentSize = { width: width, height: height };\n\t\t},\n\n\t\t/**\n\t\t * Gets the current size of the dialog in pixels.\n\t\t *\n\t\t * var width = dialogObj.getSize().width;\n\t\t *\n\t\t * @returns {Object}\n\t\t * @returns {Number} return.width\n\t\t * @returns {Number} return.height\n\t\t */\n\t\tgetSize: function() {\n\t\t\tvar element = this._.element.getFirst();\n\t\t\treturn { width: element.$.offsetWidth || 0, height: element.$.offsetHeight || 0 };\n\t\t},\n\n\t\t/**\n\t\t * Moves the dialog to an `(x, y)` coordinate relative to the window.\n\t\t *\n\t\t * dialogObj.move( 10, 40 );\n\t\t *\n\t\t * @method\n\t\t * @param {Number} x The target x-coordinate.\n\t\t * @param {Number} y The target y-coordinate.\n\t\t * @param {Boolean} save Flag indicate whether the dialog position should be remembered on next open up.\n\t\t */\n\t\tmove: function( x, y, save ) {\n\t\t\tvar element = this._.element.getFirst(), rtl = this._.editor.lang.dir == 'rtl';\n\n\t\t\t// (https://dev.ckeditor.com/ticket/8888) In some cases of a very small viewport, dialog is incorrectly\n\t\t\t// positioned in IE7. It also happens that it remains sticky and user cannot\n\t\t\t// scroll down/up to reveal dialog's content below/above the viewport; this is\n\t\t\t// cumbersome.\n\t\t\t// The only way to fix this is to move mouse out of the browser and\n\t\t\t// go back to see that dialog position is automagically fixed. No events,\n\t\t\t// no style change - pure magic. This is a IE7 rendering issue, which can be\n\t\t\t// fixed with dummy style redraw on each move.\n\t\t\tif ( CKEDITOR.env.ie ) {\n\t\t\t\telement.setStyle( 'zoom', '100%' );\n\t\t\t}\n\n\t\t\tvar containerSize = this.parts.dialog.getParent().getClientSize(),\n\t\t\t\tdialogSize = this.getSize(),\n\t\t\t\tratios = this._.viewportRatio,\n\t\t\t\tfreeSpace = {\n\t\t\t\t\twidth: Math.max( containerSize.width - dialogSize.width, 0 ),\n\t\t\t\t\theight: Math.max( containerSize.height - dialogSize.height, 0 )\n\t\t\t\t};\n\n\t\t\tif ( this._.position && this._.position.x == x && this._.position.y == y ) {\n\t\t\t\t// If position didn't change window might have been resized.\n\t\t\t\tx = Math.floor( freeSpace.width * ratios.width );\n\t\t\t\ty = Math.floor( freeSpace.height * ratios.height );\n\t\t\t} else {\n\t\t\t\tupdateRatios( this, x, y );\n\t\t\t}\n\n\t\t\t// Save the current position.\n\t\t\tthis._.position = { x: x, y: y };\n\n\t\t\t// Translate coordinate for RTL.\n\t\t\tif ( rtl ) {\n\t\t\t\tx = freeSpace.width - x;\n\t\t\t}\n\n\t\t\tvar styles = { 'top': ( y > 0 ? y : 0 ) + 'px' };\n\t\t\tstyles[ rtl ? 'right' : 'left' ] = ( x > 0 ? x : 0 ) + 'px';\n\n\t\t\telement.setStyles( styles );\n\n\t\t\tsave && ( this._.moved = 1 );\n\t\t},\n\n\t\t/**\n\t\t * Gets the dialog's position in the window.\n\t\t *\n\t\t *\t\tvar dialogX = dialogObj.getPosition().x;\n\t\t *\n\t\t * @returns {Object}\n\t\t * @returns {Number} return.x\n\t\t * @returns {Number} return.y\n\t\t */\n\t\tgetPosition: function() {\n\t\t\treturn CKEDITOR.tools.extend( {}, this._.position );\n\t\t},\n\n\t\t/**\n\t\t * Shows the dialog box.\n\t\t *\n\t\t *\t\tdialogObj.show();\n\t\t */\n\t\tshow: function() {\n\t\t\t// Insert the dialog's element to the root document.\n\t\t\tvar element = this._.element,\n\t\t\t\tdefinition = this.definition,\n\t\t\t\tdocumentBody = CKEDITOR.document.getBody(),\n\t\t\t\tbaseFloatZIndex = this._.editor.config.baseFloatZIndex + 10000000;\n\n\t\t\tif ( !( element.getParent() && element.getParent().equals( documentBody ) ) ) {\n\t\t\t\telement.appendTo( documentBody );\n\t\t\t} else {\n\t\t\t\telement.setStyle( 'display', useFlex ? 'flex' : 'block' );\n\t\t\t}\n\n\t\t\t// First, set the dialog to an appropriate size.\n\t\t\tthis.resize(\n\t\t\t\tthis._.contentSize && this._.contentSize.width || definition.width || definition.minWidth,\n\t\t\t\tthis._.contentSize && this._.contentSize.height || definition.height || definition.minHeight\n\t\t\t);\n\n\t\t\t// Reset all inputs back to their default value.\n\t\t\tthis.reset();\n\n\t\t\t// Selects the first tab if no tab is already selected.\n\t\t\tif ( this._.currentTabId === null ) {\n\t\t\t\tthis.selectPage( this.definition.contents[ 0 ].id );\n\t\t\t}\n\n\t\t\t// Set z-index to dialog and container (#3559).\n\t\t\tif ( CKEDITOR.dialog._.currentZIndex === null ) {\n\t\t\t\tCKEDITOR.dialog._.currentZIndex = baseFloatZIndex;\n\t\t\t}\n\t\t\tthis._.element.getFirst().setStyle( 'z-index', CKEDITOR.dialog._.currentZIndex += 10 ); // to cover CMS' structure board\n\t\t\tthis.getElement().setStyle( 'z-index', CKEDITOR.dialog._.currentZIndex );\n\n\t\t\t// Maintain the dialog ordering and dialog cover.\n\t\t\tif ( CKEDITOR.dialog._.currentTop === null ) {\n\t\t\t\tCKEDITOR.dialog._.currentTop = this;\n\t\t\t\tthis._.parentDialog = null;\n\t\t\t\tshowCover( this._.editor );\n\t\t\t} else {\n\t\t\t\tthis._.parentDialog = CKEDITOR.dialog._.currentTop;\n\n\t\t\t\tvar parentElement = this._.parentDialog.getElement().getFirst();\n\n\t\t\t\tparentElement.$.style.zIndex -= Math.floor( baseFloatZIndex / 2 );\n\t\t\t\tthis._.parentDialog.getElement().setStyle( 'z-index', parentElement.$.style.zIndex );\n\t\t\t\tCKEDITOR.dialog._.currentTop = this;\n\t\t\t}\n\n\t\t\telement.on( 'keydown', accessKeyDownHandler );\n\t\t\telement.on( 'keyup', accessKeyUpHandler );\n\n\t\t\t// Reset the hasFocus state.\n\t\t\tthis._.hasFocus = false;\n\n\t\t\tfor ( var i in definition.contents ) {\n\t\t\t\tif ( !definition.contents[ i ] ) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\tvar content = definition.contents[ i ],\n\t\t\t\t\ttab = this._.tabs[ content.id ],\n\t\t\t\t\trequiredContent = content.requiredContent,\n\t\t\t\t\tenableElements = 0;\n\n\t\t\t\tif ( !tab ) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\tfor ( var j in this._.contents[ content.id ] ) {\n\t\t\t\t\tvar elem = this._.contents[ content.id ][ j ];\n\n\t\t\t\t\tif ( elem.type == 'hbox' || elem.type == 'vbox' || !elem.getInputElement() ) {\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\n\t\t\t\t\tif ( elem.requiredContent && !this._.editor.activeFilter.check( elem.requiredContent ) ) {\n\t\t\t\t\t\telem.disable();\n\t\t\t\t\t} else {\n\t\t\t\t\t\telem.enable();\n\t\t\t\t\t\tenableElements++;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tif ( !enableElements || ( requiredContent && !this._.editor.activeFilter.check( requiredContent ) ) ) {\n\t\t\t\t\ttab[ 0 ].addClass( 'cke_dialog_tab_disabled' );\n\t\t\t\t} else {\n\t\t\t\t\ttab[ 0 ].removeClass( 'cke_dialog_tab_disabled' );\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tCKEDITOR.tools.setTimeout( function() {\n\t\t\t\tthis.layout();\n\t\t\t\tresizeWithWindow( this );\n\n\t\t\t\tthis.parts.dialog.setStyle( 'visibility', '' );\n\n\t\t\t\t// Execute onLoad for the first show.\n\t\t\t\tthis.fireOnce( 'load', {} );\n\t\t\t\tCKEDITOR.ui.fire( 'ready', this );\n\n\t\t\t\tthis.fire( 'show', {} );\n\t\t\t\tthis._.editor.fire( 'dialogShow', this );\n\n\t\t\t\tif ( !this._.parentDialog ) {\n\t\t\t\t\tthis._.editor.focusManager.lock();\n\t\t\t\t}\n\n\t\t\t\t// Save the initial values of the dialog.\n\t\t\t\tthis.foreach( function( contentObj ) {\n\t\t\t\t\tcontentObj.setInitValue && contentObj.setInitValue();\n\t\t\t\t} );\n\n\t\t\t}, 100, this );\n\t\t},\n\n\t\t/**\n\t\t * Rearrange the dialog to its previous position or the middle of the window.\n\t\t *\n\t\t * @since 3.5.0\n\t\t */\n\t\tlayout: function() {\n\t\t\tvar el = this.parts.dialog;\n\n\t\t\tif ( !this._.moved && useFlex ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tvar dialogSize = this.getSize(),\n\t\t\t\twin = CKEDITOR.document.getWindow(),\n\t\t\t\tviewSize = win.getViewPaneSize(),\n\t\t\t\tposX,\n\t\t\t\tposY;\n\n\t\t\tif ( this._.moved && this._.position ) {\n\t\t\t\tposX = this._.position.x;\n\t\t\t\tposY = this._.position.y;\n\t\t\t} else {\n\t\t\t\tposX = ( viewSize.width - dialogSize.width ) / 2;\n\t\t\t\tposY = ( viewSize.height - dialogSize.height ) / 2;\n\t\t\t}\n\n\t\t\tif ( !CKEDITOR.env.ie6Compat ) {\n\t\t\t\tel.setStyle( 'position', 'absolute' );\n\t\t\t\tel.removeStyle( 'margin' );\n\t\t\t}\n\n\t\t\tposX = Math.floor( posX );\n\t\t\tposY = Math.floor( posY );\n\n\t\t\tthis.move( posX, posY );\n\t\t},\n\n\t\t/**\n\t\t * Executes a function for each UI element.\n\t\t *\n\t\t * @param {Function} fn Function to execute for each UI element.\n\t\t * @returns {CKEDITOR.dialog} The current dialog object.\n\t\t */\n\t\tforeach: function( fn ) {\n\t\t\tfor ( var i in this._.contents ) {\n\t\t\t\tfor ( var j in this._.contents[ i ] ) {\n\t\t\t\t\tfn.call( this, this._.contents[i][j] );\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn this;\n\t\t},\n\n\t\t/**\n\t\t * Resets all input values in the dialog.\n\t\t *\n\t\t *\t\tdialogObj.reset();\n\t\t *\n\t\t * @method\n\t\t * @chainable\n\t\t */\n\t\treset: ( function() {\n\t\t\tvar fn = function( widget ) {\n\t\t\t\t\tif ( widget.reset )\n\t\t\t\t\t\twidget.reset( 1 );\n\t\t\t\t};\n\t\t\treturn function() {\n\t\t\t\tthis.foreach( fn );\n\t\t\t\treturn this;\n\t\t\t};\n\t\t} )(),\n\n\n\t\t/**\n\t\t * Calls the {@link CKEDITOR.dialog.definition.uiElement#setup} method of each\n\t\t * of the UI elements, with the arguments passed through it.\n\t\t * It is usually being called when the dialog is opened, to put the initial value inside the field.\n\t\t *\n\t\t *\t\tdialogObj.setupContent();\n\t\t *\n\t\t *\t\tvar timestamp = ( new Date() ).valueOf();\n\t\t *\t\tdialogObj.setupContent( timestamp );\n\t\t */\n\t\tsetupContent: function() {\n\t\t\tvar args = arguments;\n\t\t\tthis.foreach( function( widget ) {\n\t\t\t\tif ( widget.setup )\n\t\t\t\t\twidget.setup.apply( widget, args );\n\t\t\t} );\n\t\t},\n\n\t\t/**\n\t\t * Calls the {@link CKEDITOR.dialog.definition.uiElement#commit} method of each\n\t\t * of the UI elements, with the arguments passed through it.\n\t\t * It is usually being called when the user confirms the dialog, to process the values.\n\t\t *\n\t\t *\t\tdialogObj.commitContent();\n\t\t *\n\t\t *\t\tvar timestamp = ( new Date() ).valueOf();\n\t\t *\t\tdialogObj.commitContent( timestamp );\n\t\t */\n\t\tcommitContent: function() {\n\t\t\tvar args = arguments;\n\t\t\tthis.foreach( function( widget ) {\n\t\t\t\t// Make sure IE triggers \"change\" event on last focused input before closing the dialog. (https://dev.ckeditor.com/ticket/7915)\n\t\t\t\tif ( CKEDITOR.env.ie && this._.currentFocusIndex == widget.focusIndex )\n\t\t\t\t\twidget.getInputElement().$.blur();\n\n\t\t\t\tif ( widget.commit )\n\t\t\t\t\twidget.commit.apply( widget, args );\n\t\t\t} );\n\t\t},\n\n\t\t/**\n\t\t * Hides the dialog box.\n\t\t *\n\t\t *\t\tdialogObj.hide();\n\t\t */\n\t\thide: function() {\n\t\t\tif ( !this.parts.dialog.isVisible() ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tthis.fire( 'hide', {} );\n\t\t\tthis._.editor.fire( 'dialogHide', this );\n\t\t\t// Reset the tab page.\n\t\t\tthis.selectPage( this._.tabIdList[ 0 ] );\n\t\t\tvar element = this._.element;\n\t\t\telement.setStyle( 'display', 'none' );\n\t\t\tthis.parts.dialog.setStyle( 'visibility', 'hidden' );\n\t\t\t// Unregister all access keys associated with this dialog.\n\t\t\tunregisterAccessKey( this );\n\n\t\t\t// Close any child(top) dialogs first.\n\t\t\twhile ( CKEDITOR.dialog._.currentTop != this ) {\n\t\t\t\tCKEDITOR.dialog._.currentTop.hide();\n\t\t\t}\n\n\t\t\t// Maintain dialog ordering and remove cover if needed.\n\t\t\tif ( !this._.parentDialog ) {\n\t\t\t\thideCover( this._.editor );\n\t\t\t} else {\n\t\t\t\tvar parentElement = this._.parentDialog.getElement().getFirst();\n\t\t\t\tthis._.parentDialog.getElement().removeStyle( 'z-index' );\n\t\t\t\tparentElement.setStyle( 'z-index', parseInt( parentElement.$.style.zIndex, 10 ) + Math.floor( this._.editor.config.baseFloatZIndex / 2 ) );\n\t\t\t}\n\t\t\tCKEDITOR.dialog._.currentTop = this._.parentDialog;\n\n\t\t\t// Deduct or clear the z-index.\n\t\t\tif ( !this._.parentDialog ) {\n\t\t\t\tCKEDITOR.dialog._.currentZIndex = null;\n\n\t\t\t\t// Remove access key handlers.\n\t\t\t\telement.removeListener( 'keydown', accessKeyDownHandler );\n\t\t\t\telement.removeListener( 'keyup', accessKeyUpHandler );\n\n\t\t\t\tvar editor = this._.editor;\n\t\t\t\teditor.focus();\n\n\t\t\t\t// Give a while before unlock, waiting for focus to return to the editable. (https://dev.ckeditor.com/ticket/172)\n\t\t\t\tsetTimeout( function() {\n\t\t\t\t\teditor.focusManager.unlock();\n\n\t\t\t\t\t// Fixed iOS focus issue (https://dev.ckeditor.com/ticket/12381).\n\t\t\t\t\t// Keep in mind that editor.focus() does not work in this case.\n\t\t\t\t\tif ( CKEDITOR.env.iOS ) {\n\t\t\t\t\t\teditor.window.focus();\n\t\t\t\t\t}\n\t\t\t\t}, 0 );\n\n\t\t\t} else {\n\t\t\t\tCKEDITOR.dialog._.currentZIndex -= 10;\n\t\t\t}\n\n\t\t\tdelete this._.parentDialog;\n\t\t\t// Reset the initial values of the dialog.\n\t\t\tthis.foreach( function( contentObj ) {\n\t\t\t\tcontentObj.resetInitValue && contentObj.resetInitValue();\n\t\t\t} );\n\n\t\t\t// Reset dialog state back to IDLE, if busy (https://dev.ckeditor.com/ticket/13213).\n\t\t\tthis.setState( CKEDITOR.DIALOG_STATE_IDLE );\n\t\t},\n\n\t\t/**\n\t\t * Adds a tabbed page into the dialog.\n\t\t *\n\t\t * @param {Object} contents Content definition.\n\t\t */\n\t\taddPage: function( contents ) {\n\t\t\tif ( contents.requiredContent && !this._.editor.filter.check( contents.requiredContent ) ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tvar pageHtml = [],\n\t\t\t\ttitleHtml = contents.label ? ' title=\"' + CKEDITOR.tools.htmlEncode( contents.label ) + '\"' : '',\n\t\t\t\tvbox = CKEDITOR.dialog._.uiElementBuilders.vbox.build( this, {\n\t\t\t\t\ttype: 'vbox',\n\t\t\t\t\tclassName: 'cke_dialog_page_contents',\n\t\t\t\t\tchildren: contents.elements,\n\t\t\t\t\texpand: !!contents.expand,\n\t\t\t\t\tpadding: contents.padding,\n\t\t\t\t\tstyle: contents.style || 'width: 100%;'\n\t\t\t\t}, pageHtml ),\n\t\t\t\tcontentMap = this._.contents[ contents.id ] = {},\n\t\t\t\tcursor,\n\t\t\t\tchildren = vbox.getChild(),\n\t\t\t\tenabledFields = 0;\n\n\t\t\twhile ( ( cursor = children.shift() ) ) {\n\t\t\t\t// Count all allowed fields.\n\t\t\t\tif ( !cursor.notAllowed && cursor.type != 'hbox' && cursor.type != 'vbox' ) {\n\t\t\t\t\tenabledFields++;\n\t\t\t\t}\n\n\t\t\t\tcontentMap[ cursor.id ] = cursor;\n\t\t\t\tif ( typeof cursor.getChild == 'function' ) {\n\t\t\t\t\tchildren.push.apply( children, cursor.getChild() );\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// If all fields are disabled (because they are not allowed) hide this tab.\n\t\t\tif ( !enabledFields ) {\n\t\t\t\tcontents.hidden = true;\n\t\t\t}\n\n\t\t\t// Create the HTML for the tab and the content block.\n\t\t\tvar page = CKEDITOR.dom.element.createFromHtml( pageHtml.join( '' ) );\n\t\t\tpage.setAttribute( 'role', 'tabpanel' );\n\t\t\tpage.setStyle( 'min-height', '100%' );\n\n\t\t\tvar env = CKEDITOR.env,\n\t\t\t\ttabId = 'cke_' + contents.id + '_' + CKEDITOR.tools.getNextNumber(),\n\t\t\t\ttab = CKEDITOR.dom.element.createFromHtml( [\n\t\t\t\t\t' 0 ? ' cke_last' : 'cke_first' ),\n\t\t\t\t\ttitleHtml,\n\t\t\t\t\t( !!contents.hidden ? ' style=\"display:none\"' : '' ),\n\t\t\t\t\t' id=\"', tabId, '\"',\n\t\t\t\t\tenv.gecko && !env.hc ? '' : ' href=\"javascript:void(0)\"',\n\t\t\t\t\t' tabIndex=\"-1\"',\n\t\t\t\t\t' hidefocus=\"true\"',\n\t\t\t\t\t' role=\"tab\">',\n\t\t\t\t\tcontents.label,\n\t\t\t\t\t''\n\t\t\t\t].join( '' ) );\n\n\t\t\tpage.setAttribute( 'aria-labelledby', tabId );\n\n\t\t\t// Take records for the tabs and elements created.\n\t\t\tthis._.tabs[ contents.id ] = [ tab, page ];\n\t\t\tthis._.tabIdList.push( contents.id );\n\t\t\t!contents.hidden && this._.pageCount++;\n\t\t\tthis._.lastTab = tab;\n\t\t\tthis.updateStyle();\n\n\t\t\t// Attach the DOM nodes.\n\n\t\t\tpage.setAttribute( 'name', contents.id );\n\t\t\tpage.appendTo( this.parts.contents );\n\n\t\t\ttab.unselectable();\n\t\t\tthis.parts.tabs.append( tab );\n\n\t\t\t// Add access key handlers if access key is defined.\n\t\t\tif ( contents.accessKey ) {\n\t\t\t\tregisterAccessKey( this, this, 'CTRL+' + contents.accessKey, tabAccessKeyDown, tabAccessKeyUp );\n\t\t\t\tthis._.accessKeyMap[ 'CTRL+' + contents.accessKey ] = contents.id;\n\t\t\t}\n\t\t},\n\n\t\t/**\n\t\t * Activates a tab page in the dialog by its id.\n\t\t *\n\t\t *\t\tdialogObj.selectPage( 'tab_1' );\n\t\t *\n\t\t * @param {String} id The id of the dialog tab to be activated.\n\t\t */\n\t\tselectPage: function( id ) {\n\t\t\tif ( this._.currentTabId == id )\n\t\t\t\treturn;\n\n\t\t\tif ( this._.tabs[ id ][ 0 ].hasClass( 'cke_dialog_tab_disabled' ) )\n\t\t\t\treturn;\n\n\t\t\t// If event was canceled - do nothing.\n\t\t\tif ( this.fire( 'selectPage', { page: id, currentPage: this._.currentTabId } ) === false )\n\t\t\t\treturn;\n\n\t\t\t// Hide the non-selected tabs and pages.\n\t\t\tfor ( var i in this._.tabs ) {\n\t\t\t\tvar tab = this._.tabs[ i ][ 0 ],\n\t\t\t\t\tpage = this._.tabs[ i ][ 1 ];\n\t\t\t\tif ( i != id ) {\n\t\t\t\t\ttab.removeClass( 'cke_dialog_tab_selected' );\n\t\t\t\t\ttab.removeAttribute( 'aria-selected' );\n\t\t\t\t\tpage.hide();\n\t\t\t\t}\n\t\t\t\tpage.setAttribute( 'aria-hidden', i != id );\n\t\t\t}\n\n\t\t\tvar selected = this._.tabs[ id ];\n\t\t\tselected[ 0 ].addClass( 'cke_dialog_tab_selected' );\n\t\t\tselected[ 0 ].setAttribute( 'aria-selected', true );\n\n\t\t\t// [IE] an invisible input[type='text'] will enlarge it's width\n\t\t\t// if it's value is long when it shows, so we clear it's value\n\t\t\t// before it shows and then recover it (https://dev.ckeditor.com/ticket/5649)\n\t\t\tif ( CKEDITOR.env.ie6Compat || CKEDITOR.env.ie7Compat ) {\n\t\t\t\tclearOrRecoverTextInputValue( selected[ 1 ] );\n\t\t\t\tselected[ 1 ].show();\n\t\t\t\tsetTimeout( function() {\n\t\t\t\t\tclearOrRecoverTextInputValue( selected[ 1 ], 1 );\n\t\t\t\t}, 0 );\n\t\t\t} else {\n\t\t\t\tselected[ 1 ].show();\n\t\t\t}\n\n\t\t\tthis._.currentTabId = id;\n\t\t\tthis._.currentTabIndex = CKEDITOR.tools.indexOf( this._.tabIdList, id );\n\t\t},\n\n\t\t/**\n\t\t * Dialog state-specific style updates.\n\t\t */\n\t\tupdateStyle: function() {\n\t\t\t// If only a single page shown, a different style is used in the central pane.\n\t\t\tthis.parts.dialog[ ( this._.pageCount === 1 ? 'add' : 'remove' ) + 'Class' ]( 'cke_single_page' );\n\t\t},\n\n\t\t/**\n\t\t * Hides a page's tab away from the dialog.\n\t\t *\n\t\t *\t\tdialog.hidePage( 'tab_3' );\n\t\t *\n\t\t * @param {String} id The page's Id.\n\t\t */\n\t\thidePage: function( id ) {\n\t\t\tvar tab = this._.tabs[ id ] && this._.tabs[ id ][ 0 ];\n\t\t\tif ( !tab || this._.pageCount == 1 || !tab.isVisible() )\n\t\t\t\treturn;\n\t\t\t// Switch to other tab first when we're hiding the active tab.\n\t\t\telse if ( id == this._.currentTabId )\n\t\t\t\tthis.selectPage( getPreviousVisibleTab.call( this ) );\n\n\t\t\ttab.hide();\n\t\t\tthis._.pageCount--;\n\t\t\tthis.updateStyle();\n\t\t},\n\n\t\t/**\n\t\t * Unhides a page's tab.\n\t\t *\n\t\t *\t\tdialog.showPage( 'tab_2' );\n\t\t *\n\t\t * @param {String} id The page's Id.\n\t\t */\n\t\tshowPage: function( id ) {\n\t\t\tvar tab = this._.tabs[ id ] && this._.tabs[ id ][ 0 ];\n\t\t\tif ( !tab )\n\t\t\t\treturn;\n\t\t\ttab.show();\n\t\t\tthis._.pageCount++;\n\t\t\tthis.updateStyle();\n\t\t},\n\n\t\t/**\n\t\t * Gets the root DOM element of the dialog.\n\t\t *\n\t\t *\t\tvar dialogElement = dialogObj.getElement().getFirst();\n\t\t *\t\tdialogElement.setStyle( 'padding', '5px' );\n\t\t *\n\t\t * @returns {CKEDITOR.dom.element} The `` element containing this dialog.\n\t\t */\n\t\tgetElement: function() {\n\t\t\treturn this._.element;\n\t\t},\n\n\t\t/**\n\t\t * Gets the name of the dialog.\n\t\t *\n\t\t *\t\tvar dialogName = dialogObj.getName();\n\t\t *\n\t\t * @returns {String} The name of this dialog.\n\t\t */\n\t\tgetName: function() {\n\t\t\treturn this._.name;\n\t\t},\n\n\t\t/**\n\t\t * Gets a dialog UI element object from a dialog page.\n\t\t *\n\t\t *\t\tdialogObj.getContentElement( 'tabId', 'elementId' ).setValue( 'Example' );\n\t\t *\n\t\t * @param {String} pageId id of dialog page.\n\t\t * @param {String} elementId id of UI element.\n\t\t * @returns {CKEDITOR.ui.dialog.uiElement} The dialog UI element.\n\t\t */\n\t\tgetContentElement: function( pageId, elementId ) {\n\t\t\tvar page = this._.contents[ pageId ];\n\t\t\treturn page && page[ elementId ];\n\t\t},\n\n\t\t/**\n\t\t * Gets the value of a dialog UI element.\n\t\t *\n\t\t *\t\talert( dialogObj.getValueOf( 'tabId', 'elementId' ) );\n\t\t *\n\t\t * @param {String} pageId id of dialog page.\n\t\t * @param {String} elementId id of UI element.\n\t\t * @returns {Object} The value of the UI element.\n\t\t */\n\t\tgetValueOf: function( pageId, elementId ) {\n\t\t\treturn this.getContentElement( pageId, elementId ).getValue();\n\t\t},\n\n\t\t/**\n\t\t * Sets the value of a dialog UI element.\n\t\t *\n\t\t *\t\tdialogObj.setValueOf( 'tabId', 'elementId', 'Example' );\n\t\t *\n\t\t * @param {String} pageId id of the dialog page.\n\t\t * @param {String} elementId id of the UI element.\n\t\t * @param {Object} value The new value of the UI element.\n\t\t */\n\t\tsetValueOf: function( pageId, elementId, value ) {\n\t\t\treturn this.getContentElement( pageId, elementId ).setValue( value );\n\t\t},\n\n\t\t/**\n\t\t * Gets the UI element of a button in the dialog's button row.\n\t\t *\n\t\t *\t\t@returns {CKEDITOR.ui.dialog.button} The button object.\n\t\t *\n\t\t * @param {String} id The id of the button.\n\t\t */\n\t\tgetButton: function( id ) {\n\t\t\treturn this._.buttons[ id ];\n\t\t},\n\n\t\t/**\n\t\t * Simulates a click to a dialog button in the dialog's button row.\n\t\t *\n\t\t * @returns The return value of the dialog's `click` event.\n\t\t *\n\t\t * @param {String} id The id of the button.\n\t\t */\n\t\tclick: function( id ) {\n\t\t\treturn this._.buttons[ id ].click();\n\t\t},\n\n\t\t/**\n\t\t * Disables a dialog button.\n\t\t *\n\t\t * @param {String} id The id of the button.\n\t\t */\n\t\tdisableButton: function( id ) {\n\t\t\treturn this._.buttons[ id ].disable();\n\t\t},\n\n\t\t/**\n\t\t * Enables a dialog button.\n\t\t *\n\t\t * @param {String} id The id of the button.\n\t\t */\n\t\tenableButton: function( id ) {\n\t\t\treturn this._.buttons[ id ].enable();\n\t\t},\n\n\t\t/**\n\t\t * Gets the number of pages in the dialog.\n\t\t *\n\t\t * @returns {Number} Page count.\n\t\t */\n\t\tgetPageCount: function() {\n\t\t\treturn this._.pageCount;\n\t\t},\n\n\t\t/**\n\t\t * Gets the editor instance which opened this dialog.\n\t\t *\n\t\t * @returns {CKEDITOR.editor} Parent editor instances.\n\t\t */\n\t\tgetParentEditor: function() {\n\t\t\treturn this._.editor;\n\t\t},\n\n\t\t/**\n\t\t * Gets the element that was selected when opening the dialog, if any.\n\t\t *\n\t\t * @returns {CKEDITOR.dom.element} The element that was selected, or `null`.\n\t\t */\n\t\tgetSelectedElement: function() {\n\t\t\treturn this.getParentEditor().getSelection().getSelectedElement();\n\t\t},\n\n\t\t/**\n\t\t * Adds element to dialog's focusable list.\n\t\t *\n\t\t * @param {CKEDITOR.dom.element} element\n\t\t * @param {Number} [index]\n\t\t */\n\t\taddFocusable: function( element, index ) {\n\t\t\tif ( typeof index == 'undefined' ) {\n\t\t\t\tindex = this._.focusList.length;\n\t\t\t\tthis._.focusList.push( new Focusable( this, element, index ) );\n\t\t\t} else {\n\t\t\t\tthis._.focusList.splice( index, 0, new Focusable( this, element, index ) );\n\t\t\t\tfor ( var i = index + 1; i < this._.focusList.length; i++ )\n\t\t\t\t\tthis._.focusList[ i ].focusIndex++;\n\t\t\t}\n\t\t},\n\n\t\t/**\n\t\t * Sets the dialog {@link #property-state}.\n\t\t *\n\t\t * @since 4.5.0\n\t\t * @param {Number} state Either {@link CKEDITOR#DIALOG_STATE_IDLE} or {@link CKEDITOR#DIALOG_STATE_BUSY}.\n\t\t */\n\t\tsetState: function( state ) {\n\t\t\tvar oldState = this.state;\n\n\t\t\tif ( oldState == state ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tthis.state = state;\n\n\t\t\tif ( state == CKEDITOR.DIALOG_STATE_BUSY ) {\n\t\t\t\t// Insert the spinner on demand.\n\t\t\t\tif ( !this.parts.spinner ) {\n\t\t\t\t\tvar dir = this.getParentEditor().lang.dir,\n\t\t\t\t\t\tspinnerDef = {\n\t\t\t\t\t\t\tattributes: {\n\t\t\t\t\t\t\t\t'class': 'cke_dialog_spinner'\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\tstyles: {\n\t\t\t\t\t\t\t\t'float': dir == 'rtl' ? 'right' : 'left'\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t};\n\n\t\t\t\t\tspinnerDef.styles[ 'margin-' + ( dir == 'rtl' ? 'left' : 'right' ) ] = '8px';\n\n\t\t\t\t\tthis.parts.spinner = CKEDITOR.document.createElement( 'div', spinnerDef );\n\n\t\t\t\t\tthis.parts.spinner.setHtml( '⌛' );\n\t\t\t\t\tthis.parts.spinner.appendTo( this.parts.title, 1 );\n\t\t\t\t}\n\n\t\t\t\t// Finally, show the spinner.\n\t\t\t\tthis.parts.spinner.show();\n\n\t\t\t\tthis.getButton( 'ok' ).disable();\n\t\t\t} else if ( state == CKEDITOR.DIALOG_STATE_IDLE ) {\n\t\t\t\t// Hide the spinner. But don't do anything if there is no spinner yet.\n\t\t\t\tthis.parts.spinner && this.parts.spinner.hide();\n\n\t\t\t\tthis.getButton( 'ok' ).enable();\n\t\t\t}\n\n\t\t\tthis.fire( 'state', state );\n\t\t},\n\n\t\t/**\n\t\t * @inheritdoc CKEDITOR.dialog.definition#getModel\n\t\t */\n\t\tgetModel: function( editor ) {\n\t\t\t// Prioritize forced model.\n\t\t\tif ( this._.model ) {\n\t\t\t\treturn this._.model;\n\t\t\t}\n\n\t\t\tif ( this.definition.getModel ) {\n\t\t\t\treturn this.definition.getModel( editor );\n\t\t\t}\n\n\t\t\treturn null;\n\t\t},\n\n\t\t/**\n\t\t * Sets the given model as the subject of the dialog.\n\t\t *\n\t\t * For most plugins, like the `table` or `link` plugin, the given model should be a\n\t\t * {@link CKEDITOR.dom.element DOM element instance} if there is an element related to the dialog.\n\t\t * For widget plugins (`image2`, `placeholder`) you should provide a {@link CKEDITOR.plugins.widget} instance that\n\t\t * is the subject of this dialog.\n\t\t *\n\t\t * @since 4.13.0\n\t\t * @private\n\t\t * @param {CKEDITOR.dom.element/CKEDITOR.plugins.widget/Object/null} newModel The model to be set.\n\t\t */\n\t\tsetModel: function( newModel ) {\n\t\t\tthis._.model = newModel;\n\t\t},\n\n\t\t/**\n\t\t * Returns the current dialog mode based on the state of the feature used with this dialog.\n\t\t *\n\t\t * In case if the dialog definition did not define the {@link CKEDITOR.dialog.definition#getMode}\n\t\t * function, it will use the {@link #getModel} method to recognize the editor mode:\n\t\t *\n\t\t * The {@link CKEDITOR.dialog#EDITING_MODE editing mode} is used when the method returns:\n\t\t *\n\t\t * * A {@link CKEDITOR.dom.element} attached to the DOM.\n\t\t * * A {@link CKEDITOR.plugins.widget} instance.\n\t\t *\n\t\t * Otherwise the {@link CKEDITOR.dialog#CREATION_MODE creation mode} is used.\n\t\t *\n\t\t * @since 4.13.0\n\t\t * @param {CKEDITOR.editor} editor\n\t\t * @returns {Number} Dialog mode.\n\t\t */\n\t\tgetMode: function( editor ) {\n\t\t\tif ( this.definition.getMode ) {\n\t\t\t\treturn this.definition.getMode( editor );\n\t\t\t}\n\n\t\t\tvar model = this.getModel( editor );\n\n\t\t\tif ( !model || ( model instanceof CKEDITOR.dom.element && !model.getParent() ) ) {\n\t\t\t\treturn CKEDITOR.dialog.CREATION_MODE;\n\t\t\t}\n\n\t\t\treturn CKEDITOR.dialog.EDITING_MODE;\n\t\t}\n\t};\n\n\tCKEDITOR.tools.extend( CKEDITOR.dialog, {\n\n\t\t/**\n\t\t * Indicates that the dialog is introducing new changes to the editor, for example inserting\n\t\t * a newly created element as a part of a feature used with this dialog.\n\t\t *\n\t\t * @static\n\t\t * @since 4.13.0\n\t\t */\n\t\tCREATION_MODE: 0,\n\n\t\t/**\n\t\t * Indicates that the dialog is modifying the existing editor state, for example updating\n\t\t * an existing element as a part of a feature used with this dialog.\n\t\t *\n\t\t * @static\n\t\t * @since 4.13.0\n\t\t */\n\t\tEDITING_MODE: 1,\n\n\t\t/**\n\t\t * Registers a dialog.\n\t\t *\n\t\t *\t\t// Full sample plugin, which does not only register a dialog window but also adds an item to the context menu.\n\t\t *\t\t// To open the dialog window, choose \"Open dialog\" in the context menu.\n\t\t *\t\tCKEDITOR.plugins.add( 'myplugin', {\n\t\t *\t\t\tinit: function( editor ) {\n\t\t *\t\t\t\teditor.addCommand( 'mydialog',new CKEDITOR.dialogCommand( 'mydialog' ) );\n\t\t *\n\t\t *\t\t\t\tif ( editor.contextMenu ) {\n\t\t *\t\t\t\t\teditor.addMenuGroup( 'mygroup', 10 );\n\t\t *\t\t\t\t\teditor.addMenuItem( 'My Dialog', {\n\t\t *\t\t\t\t\t\tlabel: 'Open dialog',\n\t\t *\t\t\t\t\t\tcommand: 'mydialog',\n\t\t *\t\t\t\t\t\tgroup: 'mygroup'\n\t\t *\t\t\t\t\t} );\n\t\t *\t\t\t\t\teditor.contextMenu.addListener( function( element ) {\n\t\t *\t\t\t\t\t\treturn { 'My Dialog': CKEDITOR.TRISTATE_OFF };\n\t\t *\t\t\t\t\t} );\n\t\t *\t\t\t\t}\n\t\t *\n\t\t *\t\t\t\tCKEDITOR.dialog.add( 'mydialog', function( api ) {\n\t\t *\t\t\t\t\t// CKEDITOR.dialog.definition\n\t\t *\t\t\t\t\tvar dialogDefinition = {\n\t\t *\t\t\t\t\t\ttitle: 'Sample dialog',\n\t\t *\t\t\t\t\t\tminWidth: 390,\n\t\t *\t\t\t\t\t\tminHeight: 130,\n\t\t *\t\t\t\t\t\tcontents: [\n\t\t *\t\t\t\t\t\t\t{\n\t\t *\t\t\t\t\t\t\t\tid: 'tab1',\n\t\t *\t\t\t\t\t\t\t\tlabel: 'Label',\n\t\t *\t\t\t\t\t\t\t\ttitle: 'Title',\n\t\t *\t\t\t\t\t\t\t\texpand: true,\n\t\t *\t\t\t\t\t\t\t\tpadding: 0,\n\t\t *\t\t\t\t\t\t\t\telements: [\n\t\t *\t\t\t\t\t\t\t\t\t{\n\t\t *\t\t\t\t\t\t\t\t\t\ttype: 'html',\n\t\t *\t\t\t\t\t\t\t\t\t\thtml: '

This is some sample HTML content.

'\n\t\t *\t\t\t\t\t\t\t\t\t},\n\t\t *\t\t\t\t\t\t\t\t\t{\n\t\t *\t\t\t\t\t\t\t\t\t\ttype: 'textarea',\n\t\t *\t\t\t\t\t\t\t\t\t\tid: 'textareaId',\n\t\t *\t\t\t\t\t\t\t\t\t\trows: 4,\n\t\t *\t\t\t\t\t\t\t\t\t\tcols: 40\n\t\t *\t\t\t\t\t\t\t\t\t}\n\t\t *\t\t\t\t\t\t\t\t]\n\t\t *\t\t\t\t\t\t\t}\n\t\t *\t\t\t\t\t\t],\n\t\t *\t\t\t\t\t\tbuttons: [ CKEDITOR.dialog.okButton, CKEDITOR.dialog.cancelButton ],\n\t\t *\t\t\t\t\t\tonOk: function() {\n\t\t *\t\t\t\t\t\t\t// \"this\" is now a CKEDITOR.dialog object.\n\t\t *\t\t\t\t\t\t\t// Accessing dialog elements:\n\t\t *\t\t\t\t\t\t\tvar textareaObj = this.getContentElement( 'tab1', 'textareaId' );\n\t\t *\t\t\t\t\t\t\talert( \"You have entered: \" + textareaObj.getValue() );\n\t\t *\t\t\t\t\t\t}\n\t\t *\t\t\t\t\t};\n\t\t *\n\t\t *\t\t\t\t\treturn dialogDefinition;\n\t\t *\t\t\t\t} );\n\t\t *\t\t\t}\n\t\t *\t\t} );\n\t\t *\n\t\t *\t\tCKEDITOR.replace( 'editor1', { extraPlugins: 'myplugin' } );\n\t\t *\n\t\t * @static\n\t\t * @param {String} name The dialog's name.\n\t\t * @param {Function/String} dialogDefinition\n\t\t * A function returning the dialog's definition, or the URL to the `.js` file holding the function.\n\t\t * The function should accept an argument `editor` which is the current editor instance, and\n\t\t * return an object conforming to {@link CKEDITOR.dialog.definition}.\n\t\t * @see CKEDITOR.dialog.definition\n\t\t */\n\t\tadd: function( name, dialogDefinition ) {\n\t\t\t// Avoid path registration from multiple instances override definition.\n\t\t\tif ( !this._.dialogDefinitions[ name ] || typeof dialogDefinition == 'function' )\n\t\t\t\tthis._.dialogDefinitions[ name ] = dialogDefinition;\n\t\t},\n\n\t\t/**\n\t\t * @static\n\t\t * @todo\n\t\t */\n\t\texists: function( name ) {\n\t\t\treturn !!this._.dialogDefinitions[ name ];\n\t\t},\n\n\t\t/**\n\t\t * @static\n\t\t * @todo\n\t\t */\n\t\tgetCurrent: function() {\n\t\t\treturn CKEDITOR.dialog._.currentTop;\n\t\t},\n\n\t\t/**\n\t\t * Check whether tab wasn't removed by {@link CKEDITOR.config#removeDialogTabs}.\n\t\t *\n\t\t * @since 4.1.0\n\t\t * @static\n\t\t * @param {CKEDITOR.editor} editor\n\t\t * @param {String} dialogName\n\t\t * @param {String} tabName\n\t\t * @returns {Boolean}\n\t\t */\n\t\tisTabEnabled: function( editor, dialogName, tabName ) {\n\t\t\tvar cfg = editor.config.removeDialogTabs;\n\n\t\t\treturn !( cfg && cfg.match( new RegExp( '(?:^|;)' + dialogName + ':' + tabName + '(?:$|;)', 'i' ) ) );\n\t\t},\n\n\t\t/**\n\t\t * The default OK button for dialogs. Fires the `ok` event and closes the dialog if the event succeeds.\n\t\t *\n\t\t * @static\n\t\t * @method\n\t\t */\n\t\tokButton: ( function() {\n\t\t\tvar retval = function( editor, override ) {\n\t\t\t\t\toverride = override || {};\n\t\t\t\t\treturn CKEDITOR.tools.extend( {\n\t\t\t\t\t\tid: 'ok',\n\t\t\t\t\t\ttype: 'button',\n\t\t\t\t\t\tlabel: editor.lang.common.ok,\n\t\t\t\t\t\t'class': 'cke_dialog_ui_button_ok',\n\t\t\t\t\t\tonClick: function( evt ) {\n\t\t\t\t\t\t\tvar dialog = evt.data.dialog;\n\t\t\t\t\t\t\tif ( dialog.fire( 'ok', { hide: true } ).hide !== false )\n\t\t\t\t\t\t\t\tdialog.hide();\n\t\t\t\t\t\t}\n\t\t\t\t\t}, override, true );\n\t\t\t\t};\n\t\t\tretval.type = 'button';\n\t\t\tretval.override = function( override ) {\n\t\t\t\treturn CKEDITOR.tools.extend( function( editor ) {\n\t\t\t\t\treturn retval( editor, override );\n\t\t\t\t}, { type: 'button' }, true );\n\t\t\t};\n\t\t\treturn retval;\n\t\t} )(),\n\n\t\t/**\n\t\t * The default cancel button for dialogs. Fires the `cancel` event and\n\t\t * closes the dialog if no UI element value changed.\n\t\t *\n\t\t * @static\n\t\t * @method\n\t\t */\n\t\tcancelButton: ( function() {\n\t\t\tvar retval = function( editor, override ) {\n\t\t\t\t\toverride = override || {};\n\t\t\t\t\treturn CKEDITOR.tools.extend( {\n\t\t\t\t\t\tid: 'cancel',\n\t\t\t\t\t\ttype: 'button',\n\t\t\t\t\t\tlabel: editor.lang.common.cancel,\n\t\t\t\t\t\t'class': 'cke_dialog_ui_button_cancel',\n\t\t\t\t\t\tonClick: function( evt ) {\n\t\t\t\t\t\t\tvar dialog = evt.data.dialog;\n\t\t\t\t\t\t\tif ( dialog.fire( 'cancel', { hide: true } ).hide !== false )\n\t\t\t\t\t\t\t\tdialog.hide();\n\t\t\t\t\t\t}\n\t\t\t\t\t}, override, true );\n\t\t\t\t};\n\t\t\tretval.type = 'button';\n\t\t\tretval.override = function( override ) {\n\t\t\t\treturn CKEDITOR.tools.extend( function( editor ) {\n\t\t\t\t\treturn retval( editor, override );\n\t\t\t\t}, { type: 'button' }, true );\n\t\t\t};\n\t\t\treturn retval;\n\t\t} )(),\n\n\t\t/**\n\t\t * Registers a dialog UI element.\n\t\t *\n\t\t * @static\n\t\t * @param {String} typeName The name of the UI element.\n\t\t * @param {Function} builder The function to build the UI element.\n\t\t */\n\t\taddUIElement: function( typeName, builder ) {\n\t\t\tthis._.uiElementBuilders[ typeName ] = builder;\n\t\t}\n\t} );\n\n\tCKEDITOR.dialog._ = {\n\t\tuiElementBuilders: {},\n\n\t\tdialogDefinitions: {},\n\n\t\tcurrentTop: null,\n\n\t\tcurrentZIndex: null\n\t};\n\n\t// \"Inherit\" (copy actually) from CKEDITOR.event.\n\tCKEDITOR.event.implementOn( CKEDITOR.dialog );\n\tCKEDITOR.event.implementOn( CKEDITOR.dialog.prototype );\n\n\tdefaultDialogDefinition = {\n\t\tresizable: CKEDITOR.DIALOG_RESIZE_BOTH,\n\t\tminWidth: 600,\n\t\tminHeight: 400,\n\t\tbuttons: [ CKEDITOR.dialog.okButton, CKEDITOR.dialog.cancelButton ]\n\t};\n\n\t// Tool function used to return an item from an array based on its id\n\t// property.\n\tvar getById = function( array, id, recurse ) {\n\t\t\tfor ( var i = 0, item;\n\t\t\t( item = array[ i ] ); i++ ) {\n\t\t\t\tif ( item.id == id )\n\t\t\t\t\treturn item;\n\t\t\t\tif ( recurse && item[ recurse ] ) {\n\t\t\t\t\tvar retval = getById( item[ recurse ], id, recurse );\n\t\t\t\t\tif ( retval )\n\t\t\t\t\t\treturn retval;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn null;\n\t\t};\n\n\t// Tool function used to add an item into an array.\n\tvar addById = function( array, newItem, nextSiblingId, recurse, nullIfNotFound ) {\n\t\t\tif ( nextSiblingId ) {\n\t\t\t\tfor ( var i = 0, item;\n\t\t\t\t( item = array[ i ] ); i++ ) {\n\t\t\t\t\tif ( item.id == nextSiblingId ) {\n\t\t\t\t\t\tarray.splice( i, 0, newItem );\n\t\t\t\t\t\treturn newItem;\n\t\t\t\t\t}\n\n\t\t\t\t\tif ( recurse && item[ recurse ] ) {\n\t\t\t\t\t\tvar retval = addById( item[ recurse ], newItem, nextSiblingId, recurse, true );\n\t\t\t\t\t\tif ( retval )\n\t\t\t\t\t\t\treturn retval;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tif ( nullIfNotFound )\n\t\t\t\t\treturn null;\n\t\t\t}\n\n\t\t\tarray.push( newItem );\n\t\t\treturn newItem;\n\t\t};\n\n\t// Tool function used to remove an item from an array based on its id.\n\tvar removeById = function( array, id, recurse ) {\n\t\t\tfor ( var i = 0, item;\n\t\t\t( item = array[ i ] ); i++ ) {\n\t\t\t\tif ( item.id == id )\n\t\t\t\t\treturn array.splice( i, 1 );\n\t\t\t\tif ( recurse && item[ recurse ] ) {\n\t\t\t\t\tvar retval = removeById( item[ recurse ], id, recurse );\n\t\t\t\t\tif ( retval )\n\t\t\t\t\t\treturn retval;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn null;\n\t\t};\n\n\t/**\n\t * This class is not really part of the API. It is the `definition` property value\n\t * passed to `dialogDefinition` event handlers.\n\t *\n\t *\t\tCKEDITOR.on( 'dialogDefinition', function( evt ) {\n\t *\t\t\tvar definition = evt.data.definition;\n\t *\t\t\tvar content = definition.getContents( 'page1' );\n\t * \t\t\t// ...\n\t *\t\t} );\n\t *\n\t * @private\n\t * @class CKEDITOR.dialog.definitionObject\n\t * @extends CKEDITOR.dialog.definition\n\t * @constructor Creates a definitionObject class instance.\n\t */\n\tfunction definitionObject( dialog, dialogDefinition ) {\n\t\t// TODO : Check if needed.\n\t\tthis.dialog = dialog;\n\n\t\t// Transform the contents entries in contentObjects.\n\t\tvar contents = dialogDefinition.contents;\n\t\tfor ( var i = 0, content;\n\t\t( content = contents[ i ] ); i++ )\n\t\t\tcontents[ i ] = content && new contentObject( dialog, content );\n\n\t\tCKEDITOR.tools.extend( this, dialogDefinition );\n\t}\n\n\tdefinitionObject.prototype = {\n\t\t/**\n\t\t * Gets a content definition.\n\t\t *\n\t\t * @param {String} id The id of the content definition.\n\t\t * @returns {CKEDITOR.dialog.definition.content} The content definition matching id.\n\t\t */\n\t\tgetContents: function( id ) {\n\t\t\treturn getById( this.contents, id );\n\t\t},\n\n\t\t/**\n\t\t * Gets a button definition.\n\t\t *\n\t\t * @param {String} id The id of the button definition.\n\t\t * @returns {CKEDITOR.dialog.definition.button} The button definition matching id.\n\t\t */\n\t\tgetButton: function( id ) {\n\t\t\treturn getById( this.buttons, id );\n\t\t},\n\n\t\t/**\n\t\t * Adds a content definition object under this dialog definition.\n\t\t *\n\t\t * @param {CKEDITOR.dialog.definition.content} contentDefinition The\n\t\t * content definition.\n\t\t * @param {String} [nextSiblingId] The id of an existing content\n\t\t * definition which the new content definition will be inserted\n\t\t * before. Omit if the new content definition is to be inserted as\n\t\t * the last item.\n\t\t * @returns {CKEDITOR.dialog.definition.content} The inserted content definition.\n\t\t */\n\t\taddContents: function( contentDefinition, nextSiblingId ) {\n\t\t\treturn addById( this.contents, contentDefinition, nextSiblingId );\n\t\t},\n\n\t\t/**\n\t\t * Adds a button definition object under this dialog definition.\n\t\t *\n\t\t * @param {CKEDITOR.dialog.definition.button} buttonDefinition The\n\t\t * button definition.\n\t\t * @param {String} [nextSiblingId] The id of an existing button\n\t\t * definition which the new button definition will be inserted\n\t\t * before. Omit if the new button definition is to be inserted as\n\t\t * the last item.\n\t\t * @returns {CKEDITOR.dialog.definition.button} The inserted button definition.\n\t\t */\n\t\taddButton: function( buttonDefinition, nextSiblingId ) {\n\t\t\treturn addById( this.buttons, buttonDefinition, nextSiblingId );\n\t\t},\n\n\t\t/**\n\t\t * Removes a content definition from this dialog definition.\n\t\t *\n\t\t * @param {String} id The id of the content definition to be removed.\n\t\t * @returns {CKEDITOR.dialog.definition.content} The removed content definition.\n\t\t */\n\t\tremoveContents: function( id ) {\n\t\t\tremoveById( this.contents, id );\n\t\t},\n\n\t\t/**\n\t\t * Removes a button definition from the dialog definition.\n\t\t *\n\t\t * @param {String} id The id of the button definition to be removed.\n\t\t * @returns {CKEDITOR.dialog.definition.button} The removed button definition.\n\t\t */\n\t\tremoveButton: function( id ) {\n\t\t\tremoveById( this.buttons, id );\n\t\t}\n\t};\n\n\t/**\n\t * This class is not really part of the API. It is the template of the\n\t * objects representing content pages inside the\n\t * CKEDITOR.dialog.definitionObject.\n\t *\n\t *\t\tCKEDITOR.on( 'dialogDefinition', function( evt ) {\n\t *\t\t\tvar definition = evt.data.definition;\n\t *\t\t\tvar content = definition.getContents( 'page1' );\n\t *\t\t\tcontent.remove( 'textInput1' );\n\t *\t\t\t// ...\n\t *\t\t} );\n\t *\n\t * @private\n\t * @class CKEDITOR.dialog.definition.contentObject\n\t * @constructor Creates a contentObject class instance.\n\t */\n\tfunction contentObject( dialog, contentDefinition ) {\n\t\tthis._ = {\n\t\t\tdialog: dialog\n\t\t};\n\n\t\tCKEDITOR.tools.extend( this, contentDefinition );\n\t}\n\n\tcontentObject.prototype = {\n\t\t/**\n\t\t * Gets a UI element definition under the content definition.\n\t\t *\n\t\t * @param {String} id The id of the UI element definition.\n\t\t * @returns {CKEDITOR.dialog.definition.uiElement}\n\t\t */\n\t\tget: function( id ) {\n\t\t\treturn getById( this.elements, id, 'children' );\n\t\t},\n\n\t\t/**\n\t\t * Adds a UI element definition to the content definition.\n\t\t *\n\t\t * @param {CKEDITOR.dialog.definition.uiElement} elementDefinition The\n\t\t * UI elemnet definition to be added.\n\t\t * @param {String} nextSiblingId The id of an existing UI element\n\t\t * definition which the new UI element definition will be inserted\n\t\t * before. Omit if the new button definition is to be inserted as\n\t\t * the last item.\n\t\t * @returns {CKEDITOR.dialog.definition.uiElement} The element definition inserted.\n\t\t */\n\t\tadd: function( elementDefinition, nextSiblingId ) {\n\t\t\treturn addById( this.elements, elementDefinition, nextSiblingId, 'children' );\n\t\t},\n\n\t\t/**\n\t\t * Removes a UI element definition from the content definition.\n\t\t *\n\t\t * @param {String} id The id of the UI element definition to be removed.\n\t\t * @returns {CKEDITOR.dialog.definition.uiElement} The element definition removed.\n\t\t */\n\t\tremove: function( id ) {\n\t\t\tremoveById( this.elements, id, 'children' );\n\t\t}\n\t};\n\n\tfunction initDragAndDrop( dialog ) {\n\t\tvar lastCoords = null,\n\t\t\tabstractDialogCoords = null,\n\t\t\teditor = dialog.getParentEditor(),\n\t\t\tmagnetDistance = editor.config.dialog_magnetDistance,\n\t\t\tmargins = CKEDITOR.skin.margins || [ 0, 0, 0, 0 ];\n\n\t\tif ( typeof magnetDistance == 'undefined' )\n\t\t\tmagnetDistance = 20;\n\n\t\tfunction mouseMoveHandler( evt ) {\n\t\t\tvar dialogSize = dialog.getSize(),\n\t\t\t\tcontainerSize = dialog.parts.dialog.getParent().getClientSize(),\n\t\t\t\tx = evt.originalEvent.screenX,\n\t\t\t\ty = evt.originalEvent.screenY,\n\t\t\t\tdx = x - lastCoords.x,\n\t\t\t\tdy = y - lastCoords.y,\n\t\t\t\trealX, realY;\n\n\t\t\tlastCoords = { x: x, y: y };\n\t\t\tabstractDialogCoords.x += dx;\n\t\t\tabstractDialogCoords.y += dy;\n\n\t\t\tif ( abstractDialogCoords.x + margins[ 3 ] < magnetDistance ) {\n\t\t\t\trealX = -margins[ 3 ];\n\t\t\t} else if ( abstractDialogCoords.x - margins[ 1 ] > containerSize.width - dialogSize.width - magnetDistance ) {\n\t\t\t\trealX = containerSize.width - dialogSize.width + ( editor.lang.dir == 'rtl' ? 0 : margins[ 1 ] );\n\t\t\t} else {\n\t\t\t\trealX = abstractDialogCoords.x;\n\t\t\t}\n\n\t\t\tif ( abstractDialogCoords.y + margins[ 0 ] < magnetDistance ) {\n\t\t\t\trealY = -margins[ 0 ];\n\t\t\t} else if ( abstractDialogCoords.y - margins[ 2 ] > containerSize.height - dialogSize.height - magnetDistance ) {\n\t\t\t\trealY = containerSize.height - dialogSize.height + margins[ 2 ];\n\t\t\t} else {\n\t\t\t\trealY = abstractDialogCoords.y;\n\t\t\t}\n\n\t\t\trealX = Math.floor( realX );\n\t\t\trealY = Math.floor( realY );\n\n\t\t\tdialog.move( realX, realY, 1 );\n\n\t\t\tevt.preventDefault();\n\t\t}\n\n\t\tfunction mouseUpHandler() {\n\t\t\tCMS.$(CKEDITOR.document.$).off( 'pointermove', mouseMoveHandler );\n\t\t\tCMS.$(CKEDITOR.document.$).off( 'pointerup', mouseUpHandler );\n\n\t\t\tif ( CKEDITOR.env.ie6Compat ) {\n\t\t\t\tvar coverDoc = currentCover.getChild( 0 ).getFrameDocument();\n\t\t\t\tcoverDoc.removeListener( 'mousemove', mouseMoveHandler );\n\t\t\t\tcoverDoc.removeListener( 'mouseup', mouseUpHandler );\n\t\t\t}\n\t\t}\n\n\t\tCMS.$(dialog.parts.title.$).on( 'pointerdown', function( evt ) {\n\t\t\tif ( !dialog._.moved ) {\n\t\t\t\tvar container = dialog._.element,\n\t\t\t\t\telement = container.getFirst();\n\n\t\t\t\telement.setStyle( 'position', 'absolute' );\n\t\t\t\tcontainer.removeStyle( 'display' );\n\n\t\t\t\tdialog._.moved = true;\n\t\t\t\tdialog.layout();\n\t\t\t}\n\n\t\t\tlastCoords = { x: evt.originalEvent.screenX, y: evt.originalEvent.screenY };\n\n\t\t\tCMS.$(CKEDITOR.document.$).on( 'pointermove', mouseMoveHandler );\n\t\t\tCMS.$(CKEDITOR.document.$).on( 'pointerup', mouseUpHandler );\n\t\t\tabstractDialogCoords = dialog.getPosition();\n\n\t\t\tif ( CKEDITOR.env.ie6Compat ) {\n\t\t\t\tvar coverDoc = currentCover.getChild( 0 ).getFrameDocument();\n\t\t\t\tcoverDoc.on( 'mousemove', mouseMoveHandler );\n\t\t\t\tcoverDoc.on( 'mouseup', mouseUpHandler );\n\t\t\t}\n\n\t\t\tevt.preventDefault();\n\t\t});\n\t}\n\n\tfunction initResizeHandles( dialog ) {\n\t\tvar def = dialog.definition,\n\t\t\tresizable = def.resizable;\n\n\t\tif ( resizable == CKEDITOR.DIALOG_RESIZE_NONE )\n\t\t\treturn;\n\n\t\tvar editor = dialog.getParentEditor();\n\t\tvar wrapperWidth, wrapperHeight, viewSize, origin, startSize, dialogCover;\n\n\t\tvar mouseDownFn = CKEDITOR.tools.addFunction( function( $event ) {\n\t\t\tstartSize = dialog.getSize();\n\n\t\t\tvar content = dialog.parts.contents,\n\t\t\t\tiframeDialog = content.$.getElementsByTagName( 'iframe' ).length,\n\t\t\t\tisBorderBox = !( CKEDITOR.env.gecko || CKEDITOR.env.ie && CKEDITOR.env.quirks );\n\n\t\t\t// Shim to help capturing \"mousemove\" over iframe.\n\t\t\tif ( iframeDialog ) {\n\t\t\t\tCMS.$('.cke_dialog_resize_cover').remove();\n\t\t\t\tdialogCover = CKEDITOR.dom.element.createFromHtml( '
' );\n\t\t\t\tcontent.append( dialogCover );\n\t\t\t}\n\n\t\t\t// Calculate the offset between content and chrome size.\n\t\t\t// Use size of current tab panel because we can't rely on size of contents container (#3144).\n\t\t\twrapperHeight = startSize.height - dialog.parts.contents.getFirst( isVisible ).getSize( 'height', isBorderBox );\n\t\t\twrapperWidth = startSize.width - dialog.parts.contents.getFirst( isVisible ).getSize( 'width', 1 );\n\n\t\t\torigin = { x: $event.screenX, y: $event.screenY };\n\n\t\t\tviewSize = CKEDITOR.document.getWindow().getViewPaneSize();\n\n\t\t\tCMS.$(CKEDITOR.document.$).on( 'pointermove', mouseMoveHandler );\n\t\t\tCMS.$(CKEDITOR.document.$).on( 'pointerup', mouseUpHandler );\n\n\t\t\tif ( CKEDITOR.env.ie6Compat ) {\n\t\t\t\tvar coverDoc = currentCover.getChild( 0 ).getFrameDocument();\n\t\t\t\tcoverDoc.on( 'mousemove', mouseMoveHandler );\n\t\t\t\tcoverDoc.on( 'mouseup', mouseUpHandler );\n\t\t\t}\n\n\t\t\t$event.preventDefault && $event.preventDefault();\n\n\t\t\tfunction isVisible( el ) {\n\t\t\t\treturn el.isVisible();\n\t\t\t}\n\t\t} );\n\n\t\t// Prepend the grip to the dialog.\n\t\tdialog.on( 'load', function() {\n\t\t\tvar direction = '';\n\t\t\tif ( resizable == CKEDITOR.DIALOG_RESIZE_WIDTH )\n\t\t\t\tdirection = ' cke_resizer_horizontal';\n\t\t\telse if ( resizable == CKEDITOR.DIALOG_RESIZE_HEIGHT )\n\t\t\t\tdirection = ' cke_resizer_vertical';\n\t\t\tvar resizer = CKEDITOR.dom.element.createFromHtml(\n\t\t\t\t'' +\n\t\t\t\t// BLACK LOWER RIGHT TRIANGLE (ltr)\n\t\t\t\t// BLACK LOWER LEFT TRIANGLE (rtl)\n\t\t\t\t( editor.lang.dir == 'ltr' ? '\\u25E2' : '\\u25E3' ) +\n\t\t\t\t'
' );\n\t\t\tdialog.parts.footer.append( resizer, 1 );\n\t\t} );\n\t\teditor.on( 'destroy', function() {\n\t\t\tCKEDITOR.tools.removeFunction( mouseDownFn );\n\t\t} );\n\n\t\tfunction mouseMoveHandler( evt ) {\n\t\t\tvar rtl = editor.lang.dir == 'rtl',\n\t\t\t\tdx = ( evt.originalEvent.screenX - origin.x ) * ( rtl ? -1 : 1 ),\n\t\t\t\tdy = evt.originalEvent.screenY - origin.y,\n\t\t\t\twidth = startSize.width,\n\t\t\t\theight = startSize.height,\n\t\t\t\tinternalWidth = width + dx * ( dialog._.moved ? 1 : 2 ),\n\t\t\t\tinternalHeight = height + dy * ( dialog._.moved ? 1 : 2 ),\n\t\t\t\telement = dialog._.element.getFirst(),\n\t\t\t\tright = rtl && parseInt( element.getComputedStyle( 'right' ), 10 ),\n\t\t\t\tposition = dialog.getPosition();\n\n\t\t\tposition.x = position.x || 0;\n\t\t\tposition.y = position.y || 0;\n\n\t\t\tif ( position.y + internalHeight > viewSize.height ) {\n\t\t\t\tinternalHeight = viewSize.height - position.y;\n\t\t\t}\n\n\t\t\tif ( ( rtl ? right : position.x ) + internalWidth > viewSize.width ) {\n\t\t\t\tinternalWidth = viewSize.width - ( rtl ? right : position.x );\n\t\t\t}\n\n\t\t\tinternalHeight = Math.floor( internalHeight );\n\t\t\tinternalWidth = Math.floor( internalWidth );\n\n\t\t\t// Make sure the dialog will not be resized to the wrong side when it's in the leftmost position for RTL.\n\t\t\tif ( resizable == CKEDITOR.DIALOG_RESIZE_WIDTH || resizable == CKEDITOR.DIALOG_RESIZE_BOTH ) {\n\t\t\t\twidth = Math.max( def.minWidth || 0, internalWidth - wrapperWidth );\n\t\t\t}\n\n\t\t\tif ( resizable == CKEDITOR.DIALOG_RESIZE_HEIGHT || resizable == CKEDITOR.DIALOG_RESIZE_BOTH ) {\n\t\t\t\theight = Math.max( def.minHeight || 0, internalHeight - wrapperHeight );\n\t\t\t}\n\n\t\t\tdialog.resize( width, height );\n\n\t\t\tif ( dialog._.moved ) {\n\t\t\t\tvar x = dialog._.position.x,\n\t\t\t\t\ty = dialog._.position.y;\n\n\t\t\t\tupdateRatios( dialog, x, y );\n\t\t\t}\n\n\t\t\tif ( !dialog._.moved )\n\t\t\t\tdialog.layout();\n\n\t\t\tevt.preventDefault();\n\t\t}\n\n\t\tfunction mouseUpHandler() {\n\t\t\tCMS.$(CKEDITOR.document.$).off( 'pointermove', mouseMoveHandler );\n\t\t\tCMS.$(CKEDITOR.document.$).off( 'pointerup', mouseUpHandler );\n\n\t\t\tif ( dialogCover ) {\n\t\t\t\tdialogCover.remove();\n\t\t\t\tdialogCover = null;\n\t\t\t}\n\n\t\t\tif ( CKEDITOR.env.ie6Compat ) {\n\t\t\t\tvar coverDoc = currentCover.getChild( 0 ).getFrameDocument();\n\t\t\t\tcoverDoc.removeListener( 'mouseup', mouseUpHandler );\n\t\t\t\tcoverDoc.removeListener( 'mousemove', mouseMoveHandler );\n\t\t\t}\n\t\t}\n\t}\n\n\tfunction updateRatios( dialog, x, y ) {\n\t\tvar containerSize = dialog.parts.dialog.getParent().getClientSize(),\n\t\t\tdialogSize = dialog.getSize(),\n\t\t\tratios = dialog._.viewportRatio,\n\t\t\tfreeSpace = {\n\t\t\t\twidth: Math.max( containerSize.width - dialogSize.width, 0 ),\n\t\t\t\theight: Math.max( containerSize.height - dialogSize.height, 0 )\n\t\t\t};\n\n\t\tratios.width = freeSpace.width ? ( x / freeSpace.width ) : ratios.width;\n\t\tratios.height = freeSpace.height ? ( y / freeSpace.height ) : ratios.height;\n\n\t\tdialog._.viewportRatio = ratios;\n\t}\n\n\t// Caching reusable covers and allowing only one cover on screen.\n\tvar covers = {};\n\n\tfunction cancelEvent( ev ) {\n\t\tev.data.preventDefault( 1 );\n\t}\n\n\tfunction showCover( editor ) {\n\t\tvar config = editor.config,\n\t\t\tskinName = ( CKEDITOR.skinName || editor.config.skin ),\n\t\t\tbackgroundColorStyle = config.dialog_backgroundCoverColor || ( skinName == 'moono-lisa' ? 'black' : 'white' ),\n\t\t\tbackgroundCoverOpacity = config.dialog_backgroundCoverOpacity,\n\t\t\tbaseFloatZIndex = config.baseFloatZIndex + 10000000,\n\t\t\tcoverKey = CKEDITOR.tools.genKey( backgroundColorStyle, backgroundCoverOpacity, baseFloatZIndex ),\n\t\t\tcoverElement = covers[ coverKey ];\n\n\t\tCKEDITOR.document.getBody().addClass( 'cke_dialog_open' );\n\t\tCMS.$('.cke_dialog_background_cover:not(.cms-ckeditor-dialog-background-cover)').remove();\n\n\t\tif ( !coverElement ) {\n\t\t\tvar html = [\n\t\t\t\t'
'\n\t\t\t];\n\n\t\t\tif ( CKEDITOR.env.ie6Compat ) {\n\t\t\t\t// Support for custom document.domain in IE.\n\t\t\t\tvar iframeHtml = '';\n\n\t\t\t\thtml.push( '' +\n\t\t\t\t\t'' );\n\t\t\t}\n\n\t\t\thtml.push( '
' );\n\n\t\t\tcoverElement = CKEDITOR.dom.element.createFromHtml( html.join( '' ) );\n\t\t\tcoverElement.setOpacity( backgroundCoverOpacity !== undefined ? backgroundCoverOpacity : 0.5 );\n\n\t\t\tcoverElement.on( 'keydown', cancelEvent );\n\t\t\tcoverElement.on( 'keypress', cancelEvent );\n\t\t\tcoverElement.on( 'keyup', cancelEvent );\n\n\t\t\tcoverElement.appendTo( CKEDITOR.document.getBody() );\n\t\t\tcovers[ coverKey ] = coverElement;\n\t\t} else {\n\t\t\tcoverElement.show();\n\t\t}\n\n\t\t// Makes the dialog cover a focus holder as well.\n\t\teditor.focusManager.add( coverElement );\n\n\t\tcurrentCover = coverElement;\n\n\t\t// Using Safari/Mac, focus must be kept where it is (https://dev.ckeditor.com/ticket/7027)\n\t\tif ( !( CKEDITOR.env.mac && CKEDITOR.env.webkit ) )\n\t\t\tcoverElement.focus();\n\t}\n\n\tfunction hideCover( editor ) {\n\t\tCMS.$('.cke_dialog_background_cover:not(.cms-ckeditor-dialog-background-cover)').remove();\n\t\tCKEDITOR.document.getBody().removeClass( 'cke_dialog_open' );\n\t\tif ( !currentCover )\n\t\t\treturn;\n\n\t\teditor.focusManager.remove( currentCover );\n\t\tcurrentCover.hide();\n\t}\n\n\tfunction removeCovers() {\n\t\tfor ( var coverId in covers )\n\t\t\tcovers[ coverId ].remove();\n\t\tcovers = {};\n\t}\n\n\tvar accessKeyProcessors = {};\n\n\tfunction accessKeyDownHandler( evt ) {\n\t\tvar ctrl = evt.data.$.ctrlKey || evt.data.$.metaKey,\n\t\t\talt = evt.data.$.altKey,\n\t\t\tshift = evt.data.$.shiftKey,\n\t\t\tkey = String.fromCharCode( evt.data.$.keyCode ),\n\t\t\tkeyProcessor = accessKeyProcessors[ ( ctrl ? 'CTRL+' : '' ) + ( alt ? 'ALT+' : '' ) + ( shift ? 'SHIFT+' : '' ) + key ];\n\n\t\tif ( !keyProcessor || !keyProcessor.length )\n\t\t\treturn;\n\n\t\tkeyProcessor = keyProcessor[ keyProcessor.length - 1 ];\n\t\tkeyProcessor.keydown && keyProcessor.keydown.call( keyProcessor.uiElement, keyProcessor.dialog, keyProcessor.key );\n\t\tevt.data.preventDefault();\n\t}\n\n\tfunction accessKeyUpHandler( evt ) {\n\t\tvar ctrl = evt.data.$.ctrlKey || evt.data.$.metaKey,\n\t\t\talt = evt.data.$.altKey,\n\t\t\tshift = evt.data.$.shiftKey,\n\t\t\tkey = String.fromCharCode( evt.data.$.keyCode ),\n\t\t\tkeyProcessor = accessKeyProcessors[ ( ctrl ? 'CTRL+' : '' ) + ( alt ? 'ALT+' : '' ) + ( shift ? 'SHIFT+' : '' ) + key ];\n\n\t\tif ( !keyProcessor || !keyProcessor.length )\n\t\t\treturn;\n\n\t\tkeyProcessor = keyProcessor[ keyProcessor.length - 1 ];\n\t\tif ( keyProcessor.keyup ) {\n\t\t\tkeyProcessor.keyup.call( keyProcessor.uiElement, keyProcessor.dialog, keyProcessor.key );\n\t\t\tevt.data.preventDefault();\n\t\t}\n\t}\n\n\tfunction registerAccessKey( uiElement, dialog, key, downFunc, upFunc ) {\n\t\tvar procList = accessKeyProcessors[ key ] || ( accessKeyProcessors[ key ] = [] );\n\t\tprocList.push( {\n\t\t\tuiElement: uiElement,\n\t\t\tdialog: dialog,\n\t\t\tkey: key,\n\t\t\tkeyup: upFunc || uiElement.accessKeyUp,\n\t\t\tkeydown: downFunc || uiElement.accessKeyDown\n\t\t} );\n\t}\n\n\tfunction unregisterAccessKey( obj ) {\n\t\tfor ( var i in accessKeyProcessors ) {\n\t\t\tvar list = accessKeyProcessors[ i ];\n\t\t\tfor ( var j = list.length - 1; j >= 0; j-- ) {\n\t\t\t\tif ( list[ j ].dialog == obj || list[ j ].uiElement == obj )\n\t\t\t\t\tlist.splice( j, 1 );\n\t\t\t}\n\t\t\tif ( list.length === 0 )\n\t\t\t\tdelete accessKeyProcessors[ i ];\n\t\t}\n\t}\n\n\tfunction tabAccessKeyUp( dialog, key ) {\n\t\tif ( dialog._.accessKeyMap[ key ] )\n\t\t\tdialog.selectPage( dialog._.accessKeyMap[ key ] );\n\t}\n\n\tfunction tabAccessKeyDown() {}\n\n\t( function() {\n\t\tCKEDITOR.ui.dialog = {\n\t\t\t/**\n\t\t\t * The base class of all dialog UI elements.\n\t\t\t *\n\t\t\t * @class CKEDITOR.ui.dialog.uiElement\n\t\t\t * @constructor Creates a uiElement class instance.\n\t\t\t * @param {CKEDITOR.dialog} dialog Parent dialog object.\n\t\t\t * @param {CKEDITOR.dialog.definition.uiElement} elementDefinition Element\n\t\t\t * definition.\n\t\t\t *\n\t\t\t * Accepted fields:\n\t\t\t *\n\t\t\t * * `id` (Required) The id of the UI element. See {@link CKEDITOR.dialog#getContentElement}.\n\t\t\t * * `type` (Required) The type of the UI element. The\n\t\t\t * value to this field specifies which UI element class will be used to\n\t\t\t * generate the final widget.\n\t\t\t * * `title` (Optional) The popup tooltip for the UI\n\t\t\t * element.\n\t\t\t * * `hidden` (Optional) A flag that tells if the element\n\t\t\t * should be initially visible.\n\t\t\t * * `className` (Optional) Additional CSS class names\n\t\t\t * to add to the UI element. Separated by space.\n\t\t\t * * `style` (Optional) Additional CSS inline styles\n\t\t\t * to add to the UI element. A semicolon (;) is required after the last\n\t\t\t * style declaration.\n\t\t\t * * `accessKey` (Optional) The alphanumeric access key\n\t\t\t * for this element. Access keys are automatically prefixed by CTRL.\n\t\t\t * * `on*` (Optional) Any UI element definition field that\n\t\t\t * starts with `on` followed immediately by a capital letter and\n\t\t\t * probably more letters is an event handler. Event handlers may be further\n\t\t\t * divided into registered event handlers and DOM event handlers. Please\n\t\t\t * refer to {@link CKEDITOR.ui.dialog.uiElement#registerEvents} and\n\t\t\t * {@link CKEDITOR.ui.dialog.uiElement#eventProcessors} for more information.\n\t\t\t *\n\t\t\t * @param {Array} htmlList\n\t\t\t * List of HTML code to be added to the dialog's content area.\n\t\t\t * @param {Function/String} [nodeNameArg='div']\n\t\t\t * A function returning a string, or a simple string for the node name for\n\t\t\t * the root DOM node.\n\t\t\t * @param {Function/Object} [stylesArg={}]\n\t\t\t * A function returning an object, or a simple object for CSS styles applied\n\t\t\t * to the DOM node.\n\t\t\t * @param {Function/Object} [attributesArg={}]\n\t\t\t * A fucntion returning an object, or a simple object for attributes applied\n\t\t\t * to the DOM node.\n\t\t\t * @param {Function/String} [contentsArg='']\n\t\t\t * A function returning a string, or a simple string for the HTML code inside\n\t\t\t * the root DOM node. Default is empty string.\n\t\t\t */\n\t\t\tuiElement: function( dialog, elementDefinition, htmlList, nodeNameArg, stylesArg, attributesArg, contentsArg ) {\n\t\t\t\tif ( arguments.length < 4 )\n\t\t\t\t\treturn;\n\n\t\t\t\tvar nodeName = ( nodeNameArg.call ? nodeNameArg( elementDefinition ) : nodeNameArg ) || 'div',\n\t\t\t\t\thtml = [ '<', nodeName, ' ' ],\n\t\t\t\t\tstyles = ( stylesArg && stylesArg.call ? stylesArg( elementDefinition ) : stylesArg ) || {},\n\t\t\t\t\tattributes = ( attributesArg && attributesArg.call ? attributesArg( elementDefinition ) : attributesArg ) || {},\n\t\t\t\t\tinnerHTML = ( contentsArg && contentsArg.call ? contentsArg.call( this, dialog, elementDefinition ) : contentsArg ) || '',\n\t\t\t\t\tdomId = this.domId = attributes.id || CKEDITOR.tools.getNextId() + '_uiElement',\n\t\t\t\t\ti;\n\n\t\t\t\tif ( elementDefinition.requiredContent && !dialog.getParentEditor().filter.check( elementDefinition.requiredContent ) ) {\n\t\t\t\t\tstyles.display = 'none';\n\t\t\t\t\tthis.notAllowed = true;\n\t\t\t\t}\n\n\t\t\t\t// Set the id, a unique id is required for getElement() to work.\n\t\t\t\tattributes.id = domId;\n\n\t\t\t\t// Set the type and definition CSS class names.\n\t\t\t\tvar classes = {};\n\t\t\t\tif ( elementDefinition.type )\n\t\t\t\t\tclasses[ 'cke_dialog_ui_' + elementDefinition.type ] = 1;\n\t\t\t\tif ( elementDefinition.className )\n\t\t\t\t\tclasses[ elementDefinition.className ] = 1;\n\t\t\t\tif ( elementDefinition.disabled )\n\t\t\t\t\tclasses.cke_disabled = 1;\n\n\t\t\t\tvar attributeClasses = ( attributes[ 'class' ] && attributes[ 'class' ].split ) ? attributes[ 'class' ].split( ' ' ) : [];\n\t\t\t\tfor ( i = 0; i < attributeClasses.length; i++ ) {\n\t\t\t\t\tif ( attributeClasses[ i ] )\n\t\t\t\t\t\tclasses[ attributeClasses[ i ] ] = 1;\n\t\t\t\t}\n\t\t\t\tvar finalClasses = [];\n\t\t\t\tfor ( i in classes )\n\t\t\t\t\tfinalClasses.push( i );\n\t\t\t\tattributes[ 'class' ] = finalClasses.join( ' ' );\n\n\t\t\t\t// Set the popup tooltop.\n\t\t\t\tif ( elementDefinition.title )\n\t\t\t\t\tattributes.title = elementDefinition.title;\n\n\t\t\t\t// Write the inline CSS styles.\n\t\t\t\tvar styleStr = ( elementDefinition.style || '' ).split( ';' );\n\n\t\t\t\t// Element alignment support.\n\t\t\t\tif ( elementDefinition.align ) {\n\t\t\t\t\tvar align = elementDefinition.align;\n\t\t\t\t\tstyles[ 'margin-left' ] = align == 'left' ? 0 : 'auto';\n\t\t\t\t\tstyles[ 'margin-right' ] = align == 'right' ? 0 : 'auto';\n\t\t\t\t}\n\n\t\t\t\tfor ( i in styles )\n\t\t\t\t\tstyleStr.push( i + ':' + styles[ i ] );\n\t\t\t\tif ( elementDefinition.hidden )\n\t\t\t\t\tstyleStr.push( 'display:none' );\n\t\t\t\tfor ( i = styleStr.length - 1; i >= 0; i-- ) {\n\t\t\t\t\tif ( styleStr[ i ] === '' )\n\t\t\t\t\t\tstyleStr.splice( i, 1 );\n\t\t\t\t}\n\t\t\t\tif ( styleStr.length > 0 )\n\t\t\t\t\tattributes.style = ( attributes.style ? ( attributes.style + '; ' ) : '' ) + styleStr.join( '; ' );\n\n\t\t\t\t// Write the attributes.\n\t\t\t\tfor ( i in attributes )\n\t\t\t\t\thtml.push( i + '=\"' + CKEDITOR.tools.htmlEncode( attributes[ i ] ) + '\" ' );\n\n\t\t\t\t// Write the content HTML.\n\t\t\t\thtml.push( '>', innerHTML, '' );\n\n\t\t\t\t// Add contents to the parent HTML array.\n\t\t\t\thtmlList.push( html.join( '' ) );\n\n\t\t\t\t( this._ || ( this._ = {} ) ).dialog = dialog;\n\n\t\t\t\t// Override isChanged if it is defined in element definition.\n\t\t\t\tif ( typeof elementDefinition.isChanged == 'boolean' )\n\t\t\t\t\tthis.isChanged = function() {\n\t\t\t\t\t\treturn elementDefinition.isChanged;\n\t\t\t\t\t};\n\t\t\t\tif ( typeof elementDefinition.isChanged == 'function' )\n\t\t\t\t\tthis.isChanged = elementDefinition.isChanged;\n\n\t\t\t\t// Overload 'get(set)Value' on definition.\n\t\t\t\tif ( typeof elementDefinition.setValue == 'function' ) {\n\t\t\t\t\tthis.setValue = CKEDITOR.tools.override( this.setValue, function( org ) {\n\t\t\t\t\t\treturn function( val ) {\n\t\t\t\t\t\t\torg.call( this, elementDefinition.setValue.call( this, val ) );\n\t\t\t\t\t\t};\n\t\t\t\t\t} );\n\t\t\t\t}\n\n\t\t\t\tif ( typeof elementDefinition.getValue == 'function' ) {\n\t\t\t\t\tthis.getValue = CKEDITOR.tools.override( this.getValue, function( org ) {\n\t\t\t\t\t\treturn function() {\n\t\t\t\t\t\t\treturn elementDefinition.getValue.call( this, org.call( this ) );\n\t\t\t\t\t\t};\n\t\t\t\t\t} );\n\t\t\t\t}\n\n\t\t\t\t// Add events.\n\t\t\t\tCKEDITOR.event.implementOn( this );\n\n\t\t\t\tthis.registerEvents( elementDefinition );\n\t\t\t\tif ( this.accessKeyUp && this.accessKeyDown && elementDefinition.accessKey )\n\t\t\t\t\tregisterAccessKey( this, dialog, 'CTRL+' + elementDefinition.accessKey );\n\n\t\t\t\tvar me = this;\n\t\t\t\tdialog.on( 'load', function() {\n\t\t\t\t\tvar input = me.getInputElement();\n\t\t\t\t\tif ( input ) {\n\t\t\t\t\t\tvar focusClass = me.type in { 'checkbox': 1, 'ratio': 1 } && CKEDITOR.env.ie && CKEDITOR.env.version < 8 ? 'cke_dialog_ui_focused' : '';\n\t\t\t\t\t\tinput.on( 'focus', function() {\n\t\t\t\t\t\t\tdialog._.tabBarMode = false;\n\t\t\t\t\t\t\tdialog._.hasFocus = true;\n\t\t\t\t\t\t\tme.fire( 'focus' );\n\t\t\t\t\t\t\tfocusClass && this.addClass( focusClass );\n\n\t\t\t\t\t\t} );\n\n\t\t\t\t\t\tinput.on( 'blur', function() {\n\t\t\t\t\t\t\tme.fire( 'blur' );\n\t\t\t\t\t\t\tfocusClass && this.removeClass( focusClass );\n\t\t\t\t\t\t} );\n\t\t\t\t\t}\n\t\t\t\t} );\n\n\t\t\t\t// Completes this object with everything we have in the\n\t\t\t\t// definition.\n\t\t\t\tCKEDITOR.tools.extend( this, elementDefinition );\n\n\t\t\t\t// Register the object as a tab focus if it can be included.\n\t\t\t\tif ( this.keyboardFocusable ) {\n\t\t\t\t\tthis.tabIndex = elementDefinition.tabIndex || 0;\n\n\t\t\t\t\tthis.focusIndex = dialog._.focusList.push( this ) - 1;\n\t\t\t\t\tthis.on( 'focus', function() {\n\t\t\t\t\t\tdialog._.currentFocusIndex = me.focusIndex;\n\t\t\t\t\t} );\n\t\t\t\t}\n\t\t\t},\n\n\t\t\t/**\n\t\t\t * Horizontal layout box for dialog UI elements, auto-expends to available width of container.\n\t\t\t *\n\t\t\t * @class CKEDITOR.ui.dialog.hbox\n\t\t\t * @extends CKEDITOR.ui.dialog.uiElement\n\t\t\t * @constructor Creates a hbox class instance.\n\t\t\t * @param {CKEDITOR.dialog} dialog Parent dialog object.\n\t\t\t * @param {Array} childObjList\n\t\t\t * Array of {@link CKEDITOR.ui.dialog.uiElement} objects inside this container.\n\t\t\t * @param {Array} childHtmlList\n\t\t\t * Array of HTML code that correspond to the HTML output of all the\n\t\t\t * objects in childObjList.\n\t\t\t * @param {Array} htmlList\n\t\t\t * Array of HTML code that this element will output to.\n\t\t\t * @param {CKEDITOR.dialog.definition.uiElement} elementDefinition\n\t\t\t * The element definition. Accepted fields:\n\t\t\t *\n\t\t\t * * `widths` (Optional) The widths of child cells.\n\t\t\t * * `height` (Optional) The height of the layout.\n\t\t\t * * `padding` (Optional) The padding width inside child cells.\n\t\t\t * * `align` (Optional) The alignment of the whole layout.\n\t\t\t */\n\t\t\thbox: function( dialog, childObjList, childHtmlList, htmlList, elementDefinition ) {\n\t\t\t\tif ( arguments.length < 4 )\n\t\t\t\t\treturn;\n\n\t\t\t\tthis._ || ( this._ = {} );\n\n\t\t\t\tvar children = this._.children = childObjList,\n\t\t\t\t\twidths = elementDefinition && elementDefinition.widths || null,\n\t\t\t\t\theight = elementDefinition && elementDefinition.height || null,\n\t\t\t\t\tstyles = {},\n\t\t\t\t\ti;\n\t\t\t\t/** @ignore */\n\t\t\t\tvar innerHTML = function() {\n\t\t\t\t\t\tvar html = [ '' ];\n\t\t\t\t\t\tfor ( i = 0; i < childHtmlList.length; i++ ) {\n\t\t\t\t\t\t\tvar className = 'cke_dialog_ui_hbox_child',\n\t\t\t\t\t\t\t\tstyles = [];\n\t\t\t\t\t\t\tif ( i === 0 ) {\n\t\t\t\t\t\t\t\tclassName = 'cke_dialog_ui_hbox_first';\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif ( i == childHtmlList.length - 1 ) {\n\t\t\t\t\t\t\t\tclassName = 'cke_dialog_ui_hbox_last';\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\thtml.push( ' 0 ) {\n\t\t\t\t\t\t\t\thtml.push( 'style=\"' + styles.join( '; ' ) + '\" ' );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\thtml.push( '>', childHtmlList[ i ], '' );\n\t\t\t\t\t\t}\n\t\t\t\t\t\thtml.push( '' );\n\t\t\t\t\t\treturn html.join( '' );\n\t\t\t\t\t};\n\n\t\t\t\tvar attribs = { role: 'presentation' };\n\t\t\t\telementDefinition && elementDefinition.align && ( attribs.align = elementDefinition.align );\n\n\t\t\t\tCKEDITOR.ui.dialog.uiElement.call( this, dialog, elementDefinition || { type: 'hbox' }, htmlList, 'table', styles, attribs, innerHTML );\n\t\t\t},\n\n\t\t\t/**\n\t\t\t * Vertical layout box for dialog UI elements.\n\t\t\t *\n\t\t\t * @class CKEDITOR.ui.dialog.vbox\n\t\t\t * @extends CKEDITOR.ui.dialog.hbox\n\t\t\t * @constructor Creates a vbox class instance.\n\t\t\t * @param {CKEDITOR.dialog} dialog Parent dialog object.\n\t\t\t * @param {Array} childObjList\n\t\t\t * Array of {@link CKEDITOR.ui.dialog.uiElement} objects inside this container.\n\t\t\t * @param {Array} childHtmlList\n\t\t\t * Array of HTML code that correspond to the HTML output of all the\n\t\t\t * objects in childObjList.\n\t\t\t * @param {Array} htmlList Array of HTML code that this element will output to.\n\t\t\t * @param {CKEDITOR.dialog.definition.uiElement} elementDefinition\n\t\t\t * The element definition. Accepted fields:\n\t\t\t *\n\t\t\t * * `width` (Optional) The width of the layout.\n\t\t\t * * `heights` (Optional) The heights of individual cells.\n\t\t\t * * `align` (Optional) The alignment of the layout.\n\t\t\t * * `padding` (Optional) The padding width inside child cells.\n\t\t\t * * `expand` (Optional) Whether the layout should expand\n\t\t\t * vertically to fill its container.\n\t\t\t */\n\t\t\tvbox: function( dialog, childObjList, childHtmlList, htmlList, elementDefinition ) {\n\t\t\t\tif ( arguments.length < 3 )\n\t\t\t\t\treturn;\n\n\t\t\t\tthis._ || ( this._ = {} );\n\n\t\t\t\tvar children = this._.children = childObjList,\n\t\t\t\t\twidth = elementDefinition && elementDefinition.width || null,\n\t\t\t\t\theights = elementDefinition && elementDefinition.heights || null;\n\t\t\t\t/** @ignore */\n\t\t\t\tvar innerHTML = function() {\n\t\t\t\t\t\tvar html = [ '' );\n\t\t\t\t\t\tfor ( var i = 0; i < childHtmlList.length; i++ ) {\n\t\t\t\t\t\t\tvar styles = [];\n\t\t\t\t\t\t\thtml.push( '' );\n\t\t\t\t\t\t}\n\t\t\t\t\t\thtml.push( '
0 )\n\t\t\t\t\t\t\t\thtml.push( 'style=\"', styles.join( '; ' ), '\" ' );\n\t\t\t\t\t\t\thtml.push( ' class=\"cke_dialog_ui_vbox_child\">', childHtmlList[ i ], '
' );\n\t\t\t\t\t\treturn html.join( '' );\n\t\t\t\t\t};\n\t\t\t\tCKEDITOR.ui.dialog.uiElement.call( this, dialog, elementDefinition || { type: 'vbox' }, htmlList, 'div', null, { role: 'presentation' }, innerHTML );\n\t\t\t}\n\t\t};\n\t} )();\n\n\t/** @class CKEDITOR.ui.dialog.uiElement */\n\tCKEDITOR.ui.dialog.uiElement.prototype = {\n\t\t/**\n\t\t * Gets the root DOM element of this dialog UI object.\n\t\t *\n\t\t *\t\tuiElement.getElement().hide();\n\t\t *\n\t\t * @returns {CKEDITOR.dom.element} Root DOM element of UI object.\n\t\t */\n\t\tgetElement: function() {\n\t\t\treturn CKEDITOR.document.getById( this.domId );\n\t\t},\n\n\t\t/**\n\t\t * Gets the DOM element that the user inputs values.\n\t\t *\n\t\t * This function is used by {@link #setValue}, {@link #getValue} and {@link #focus}. It should\n\t\t * be overrided in child classes where the input element isn't the root\n\t\t * element.\n\t\t *\n\t\t *\t\tvar rawValue = textInput.getInputElement().$.value;\n\t\t *\n\t\t * @returns {CKEDITOR.dom.element} The element where the user input values.\n\t\t */\n\t\tgetInputElement: function() {\n\t\t\treturn this.getElement();\n\t\t},\n\n\t\t/**\n\t\t * Gets the parent dialog object containing this UI element.\n\t\t *\n\t\t *\t\tvar dialog = uiElement.getDialog();\n\t\t *\n\t\t * @returns {CKEDITOR.dialog} Parent dialog object.\n\t\t */\n\t\tgetDialog: function() {\n\t\t\treturn this._.dialog;\n\t\t},\n\n\t\t/**\n\t\t * Sets the value of this dialog UI object.\n\t\t *\n\t\t *\t\tuiElement.setValue( 'Dingo' );\n\t\t *\n\t\t * @chainable\n\t\t * @param {Object} value The new value.\n\t\t * @param {Boolean} noChangeEvent Internal commit, to supress `change` event on this element.\n\t\t */\n\t\tsetValue: function( value, noChangeEvent ) {\n\t\t\tthis.getInputElement().setValue( value );\n\t\t\t!noChangeEvent && this.fire( 'change', { value: value } );\n\t\t\treturn this;\n\t\t},\n\n\t\t/**\n\t\t * Gets the current value of this dialog UI object.\n\t\t *\n\t\t *\t\tvar myValue = uiElement.getValue();\n\t\t *\n\t\t * @returns {Object} The current value.\n\t\t */\n\t\tgetValue: function() {\n\t\t\treturn this.getInputElement().getValue();\n\t\t},\n\n\t\t/**\n\t\t * Tells whether the UI object's value has changed.\n\t\t *\n\t\t *\t\tif ( uiElement.isChanged() )\n\t\t *\t\t\tconfirm( 'Value changed! Continue?' );\n\t\t *\n\t\t * @returns {Boolean} `true` if changed, `false` if not changed.\n\t\t */\n\t\tisChanged: function() {\n\t\t\t// Override in input classes.\n\t\t\treturn false;\n\t\t},\n\n\t\t/**\n\t\t * Selects the parent tab of this element. Usually called by focus() or overridden focus() methods.\n\t\t *\n\t\t *\t\tfocus : function() {\n\t\t *\t\t\tthis.selectParentTab();\n\t\t *\t\t\t// do something else.\n\t\t *\t\t}\n\t\t *\n\t\t * @chainable\n\t\t */\n\t\tselectParentTab: function() {\n\t\t\tvar element = this.getInputElement(),\n\t\t\t\tcursor = element,\n\t\t\t\ttabId;\n\t\t\twhile ( ( cursor = cursor.getParent() ) && cursor.$.className.search( 'cke_dialog_page_contents' ) == -1 ) {\n\n\t\t\t}\n\n\t\t\t// Some widgets don't have parent tabs (e.g. OK and Cancel buttons).\n\t\t\tif ( !cursor )\n\t\t\t\treturn this;\n\n\t\t\ttabId = cursor.getAttribute( 'name' );\n\t\t\t// Avoid duplicate select.\n\t\t\tif ( this._.dialog._.currentTabId != tabId )\n\t\t\t\tthis._.dialog.selectPage( tabId );\n\t\t\treturn this;\n\t\t},\n\n\t\t/**\n\t\t * Puts the focus to the UI object. Switches tabs if the UI object isn't in the active tab page.\n\t\t *\n\t\t *\t\tuiElement.focus();\n\t\t *\n\t\t * @chainable\n\t\t */\n\t\tfocus: function() {\n\t\t\tthis.selectParentTab().getInputElement().focus();\n\t\t\treturn this;\n\t\t},\n\n\t\t/**\n\t\t * Registers the `on*` event handlers defined in the element definition.\n\t\t *\n\t\t * The default behavior of this function is:\n\t\t *\n\t\t * 1. If the on* event is defined in the class's eventProcesors list,\n\t\t * then the registration is delegated to the corresponding function\n\t\t * in the eventProcessors list.\n\t\t * 2. If the on* event is not defined in the eventProcessors list, then\n\t\t * register the event handler under the corresponding DOM event of\n\t\t * the UI element's input DOM element (as defined by the return value\n\t\t * of {@link #getInputElement}).\n\t\t *\n\t\t * This function is only called at UI element instantiation, but can\n\t\t * be overridded in child classes if they require more flexibility.\n\t\t *\n\t\t * @chainable\n\t\t * @param {CKEDITOR.dialog.definition.uiElement} definition The UI element\n\t\t * definition.\n\t\t */\n\t\tregisterEvents: function( definition ) {\n\t\t\tvar regex = /^on([A-Z]\\w+)/,\n\t\t\t\tmatch;\n\n\t\t\tvar registerDomEvent = function( uiElement, dialog, eventName, func ) {\n\t\t\t\t\tdialog.on( 'load', function() {\n\t\t\t\t\t\tuiElement.getInputElement().on( eventName, func, uiElement );\n\t\t\t\t\t} );\n\t\t\t\t};\n\n\t\t\tfor ( var i in definition ) {\n\t\t\t\tif ( !( match = i.match( regex ) ) )\n\t\t\t\t\tcontinue;\n\t\t\t\tif ( this.eventProcessors[ i ] )\n\t\t\t\t\tthis.eventProcessors[ i ].call( this, this._.dialog, definition[ i ] );\n\t\t\t\telse\n\t\t\t\t\tregisterDomEvent( this, this._.dialog, match[ 1 ].toLowerCase(), definition[ i ] );\n\t\t\t}\n\n\t\t\treturn this;\n\t\t},\n\n\t\t/**\n\t\t * The event processor list used by\n\t\t * {@link CKEDITOR.ui.dialog.uiElement#getInputElement} at UI element\n\t\t * instantiation. The default list defines three `on*` events:\n\t\t *\n\t\t * 1. `onLoad` - Called when the element's parent dialog opens for the\n\t\t * first time.\n\t\t * 2. `onShow` - Called whenever the element's parent dialog opens.\n\t\t * 3. `onHide` - Called whenever the element's parent dialog closes.\n\t\t *\n\t\t *\t\t// This connects the 'click' event in CKEDITOR.ui.dialog.button to onClick\n\t\t *\t\t// handlers in the UI element's definitions.\n\t\t *\t\tCKEDITOR.ui.dialog.button.eventProcessors = CKEDITOR.tools.extend( {},\n\t\t *\t\t\tCKEDITOR.ui.dialog.uiElement.prototype.eventProcessors,\n\t\t *\t\t\t{ onClick : function( dialog, func ) { this.on( 'click', func ); } },\n\t\t *\t\t\ttrue\n\t\t *\t\t);\n\t\t *\n\t\t * @property {Object}\n\t\t */\n\t\teventProcessors: {\n\t\t\tonLoad: function( dialog, func ) {\n\t\t\t\tdialog.on( 'load', func, this );\n\t\t\t},\n\n\t\t\tonShow: function( dialog, func ) {\n\t\t\t\tdialog.on( 'show', func, this );\n\t\t\t},\n\n\t\t\tonHide: function( dialog, func ) {\n\t\t\t\tdialog.on( 'hide', func, this );\n\t\t\t}\n\t\t},\n\n\t\t/**\n\t\t * The default handler for a UI element's access key down event, which\n\t\t * tries to put focus to the UI element.\n\t\t *\n\t\t * Can be overridded in child classes for more sophisticaed behavior.\n\t\t *\n\t\t * @param {CKEDITOR.dialog} dialog The parent dialog object.\n\t\t * @param {String} key The key combination pressed. Since access keys\n\t\t * are defined to always include the `CTRL` key, its value should always\n\t\t * include a `'CTRL+'` prefix.\n\t\t */\n\t\taccessKeyDown: function() {\n\t\t\tthis.focus();\n\t\t},\n\n\t\t/**\n\t\t * The default handler for a UI element's access key up event, which\n\t\t * does nothing.\n\t\t *\n\t\t * Can be overridded in child classes for more sophisticated behavior.\n\t\t *\n\t\t * @param {CKEDITOR.dialog} dialog The parent dialog object.\n\t\t * @param {String} key The key combination pressed. Since access keys\n\t\t * are defined to always include the `CTRL` key, its value should always\n\t\t * include a `'CTRL+'` prefix.\n\t\t */\n\t\taccessKeyUp: function() {},\n\n\t\t/**\n\t\t * Disables a UI element.\n\t\t */\n\t\tdisable: function() {\n\t\t\tvar element = this.getElement(),\n\t\t\t\tinput = this.getInputElement();\n\t\t\tinput.setAttribute( 'disabled', 'true' );\n\t\t\telement.addClass( 'cke_disabled' );\n\t\t},\n\n\t\t/**\n\t\t * Enables a UI element.\n\t\t */\n\t\tenable: function() {\n\t\t\tvar element = this.getElement(),\n\t\t\t\tinput = this.getInputElement();\n\t\t\tinput.removeAttribute( 'disabled' );\n\t\t\telement.removeClass( 'cke_disabled' );\n\t\t},\n\n\t\t/**\n\t\t * Determines whether an UI element is enabled or not.\n\t\t *\n\t\t * @returns {Boolean} Whether the UI element is enabled.\n\t\t */\n\t\tisEnabled: function() {\n\t\t\treturn !this.getElement().hasClass( 'cke_disabled' );\n\t\t},\n\n\t\t/**\n\t\t * Determines whether an UI element is visible or not.\n\t\t *\n\t\t * @returns {Boolean} Whether the UI element is visible.\n\t\t */\n\t\tisVisible: function() {\n\t\t\treturn this.getInputElement().isVisible();\n\t\t},\n\n\t\t/**\n\t\t * Determines whether an UI element is focus-able or not.\n\t\t * Focus-able is defined as being both visible and enabled.\n\t\t *\n\t\t * @returns {Boolean} Whether the UI element can be focused.\n\t\t */\n\t\tisFocusable: function() {\n\t\t\tif ( !this.isEnabled() || !this.isVisible() )\n\t\t\t\treturn false;\n\t\t\treturn true;\n\t\t}\n\t};\n\n\t/** @class CKEDITOR.ui.dialog.hbox */\n\tCKEDITOR.ui.dialog.hbox.prototype = CKEDITOR.tools.extend( new CKEDITOR.ui.dialog.uiElement(), {\n\t\t/**\n\t\t * Gets a child UI element inside this container.\n\t\t *\n\t\t *\t\tvar checkbox = hbox.getChild( [0,1] );\n\t\t *\t\tcheckbox.setValue( true );\n\t\t *\n\t\t * @param {Array/Number} indices An array or a single number to indicate the child's\n\t\t * position in the container's descendant tree. Omit to get all the children in an array.\n\t\t * @returns {Array/CKEDITOR.ui.dialog.uiElement} Array of all UI elements in the container\n\t\t * if no argument given, or the specified UI element if indices is given.\n\t\t */\n\t\tgetChild: function( indices ) {\n\t\t\t// If no arguments, return a clone of the children array.\n\t\t\tif ( arguments.length < 1 )\n\t\t\t\treturn this._.children.concat();\n\n\t\t\t// If indices isn't array, make it one.\n\t\t\tif ( !indices.splice )\n\t\t\t\tindices = [ indices ];\n\n\t\t\t// Retrieve the child element according to tree position.\n\t\t\tif ( indices.length < 2 )\n\t\t\t\treturn this._.children[ indices[ 0 ] ];\n\t\t\telse\n\t\t\t\treturn ( this._.children[ indices[ 0 ] ] && this._.children[ indices[ 0 ] ].getChild ) ? this._.children[ indices[ 0 ] ].getChild( indices.slice( 1, indices.length ) ) : null;\n\t\t}\n\t}, true );\n\n\tCKEDITOR.ui.dialog.vbox.prototype = new CKEDITOR.ui.dialog.hbox();\n\n\t( function() {\n\t\tvar commonBuilder = {\n\t\t\tbuild: function( dialog, elementDefinition, output ) {\n\t\t\t\tvar children = elementDefinition.children,\n\t\t\t\t\tchild,\n\t\t\t\t\tchildHtmlList = [],\n\t\t\t\t\tchildObjList = [];\n\t\t\t\tfor ( var i = 0;\n\t\t\t\t( i < children.length && ( child = children[ i ] ) ); i++ ) {\n\t\t\t\t\tvar childHtml = [];\n\t\t\t\t\tchildHtmlList.push( childHtml );\n\t\t\t\t\tchildObjList.push( CKEDITOR.dialog._.uiElementBuilders[ child.type ].build( dialog, child, childHtml ) );\n\t\t\t\t}\n\t\t\t\treturn new CKEDITOR.ui.dialog[ elementDefinition.type ]( dialog, childObjList, childHtmlList, output, elementDefinition );\n\t\t\t}\n\t\t};\n\n\t\tCKEDITOR.dialog.addUIElement( 'hbox', commonBuilder );\n\t\tCKEDITOR.dialog.addUIElement( 'vbox', commonBuilder );\n\t} )();\n\n\t/**\n\t * Generic dialog command. It opens a specific dialog when executed.\n\t *\n\t *\t\t// Register the \"link\" command which opens the \"link\" dialog.\n\t *\t\teditor.addCommand( 'link', new CKEDITOR.dialogCommand( 'link' ) );\n\t *\n\t * @class\n\t * @constructor Creates a dialogCommand class instance.\n\t * @extends CKEDITOR.commandDefinition\n\t * @param {String} dialogName The name of the dialog to open when executing\n\t * this command.\n\t * @param {Object} [ext] Additional command definition's properties.\n\t * @param {String} [ext.tabId] You can provide additional property (`tabId`) if you wish to open the dialog on a specific tabId.\n\t *\n\t *\t\t// Open the dialog on the 'keystroke' tabId.\n\t *\t\teditor.addCommand( 'keystroke', new CKEDITOR.dialogCommand( 'a11yHelp', { tabId: 'keystroke' } ) );\n\t */\n\tCKEDITOR.dialogCommand = function( dialogName, ext ) {\n\t\tthis.dialogName = dialogName;\n\t\tCKEDITOR.tools.extend( this, ext, true );\n\t};\n\n\tCKEDITOR.dialogCommand.prototype = {\n\t\texec: function( editor ) {\n\t\t\tvar tabId = this.tabId;\n\t\t\teditor.openDialog( this.dialogName, function( dialog ) {\n\t\t\t\t// Select different tab if it's provided (#830).\n\t\t\t\tif ( tabId ) {\n\t\t\t\t\tdialog.selectPage( tabId );\n\t\t\t\t}\n\t\t\t} );\n\t\t},\n\n\t\t// Dialog commands just open a dialog ui, thus require no undo logic,\n\t\t// undo support should dedicate to specific dialog implementation.\n\t\tcanUndo: false,\n\n\t\teditorFocus: 1\n\t};\n\n\t( function() {\n\t\tvar notEmptyRegex = /^([a]|[^a])+$/,\n\t\t\tintegerRegex = /^\\d*$/,\n\t\t\tnumberRegex = /^\\d*(?:\\.\\d+)?$/,\n\t\t\thtmlLengthRegex = /^(((\\d*(\\.\\d+))|(\\d*))(px|\\%)?)?$/,\n\t\t\tcssLengthRegex = /^(((\\d*(\\.\\d+))|(\\d*))(px|em|ex|in|cm|mm|pt|pc|\\%)?)?$/i,\n\t\t\tinlineStyleRegex = /^(\\s*[\\w-]+\\s*:\\s*[^:;]+(?:;|$))*$/;\n\n\t\t/**\n\t\t * {@link CKEDITOR.dialog Dialog} `OR` logical value indicates the\n\t\t * relation between validation functions.\n\t\t *\n\t\t * @readonly\n\t\t * @property {Number} [=1]\n\t\t * @member CKEDITOR\n\t\t */\n\t\tCKEDITOR.VALIDATE_OR = 1;\n\n\t\t/**\n\t\t * {@link CKEDITOR.dialog Dialog} `AND` logical value indicates the\n\t\t * relation between validation functions.\n\t\t *\n\t\t * @readonly\n\t\t * @property {Number} [=2]\n\t\t * @member CKEDITOR\n\t\t */\n\t\tCKEDITOR.VALIDATE_AND = 2;\n\n\t\t/**\n\t\t * The namespace with dialog helper validation functions.\n\t\t *\n\t\t * @class\n\t\t * @singleton\n\t\t */\n\t\tCKEDITOR.dialog.validate = {\n\t\t\t/**\n\t\t\t * Performs validation functions composition.\n\t\t\t *\n\t\t\t * ```javascript\n\t\t\t * CKEDITOR.dialog.validate.functions(\n\t\t\t * \tCKEDITOR.dialog.validate.notEmpty( 'Value is required.' ),\n\t\t\t * \tCKEDITOR.dialog.validate.number( 'Value is not a number.' ),\n\t\t\t * \t'error!'\n\t\t\t * );\n\t\t\t * ```\n\t\t\t *\n\t\t\t * @param {Function...} validators Validation functions which will be composed into a single validator.\n\t\t\t * @param {String} [msg] Error message returned by the composed validation function.\n\t\t\t * @param {Number} [relation=CKEDITOR.VALIDATE_OR] Indicates a relation between validation functions.\n\t\t\t * Use {@link CKEDITOR#VALIDATE_OR} or {@link CKEDITOR#VALIDATE_AND}.\n\t\t\t *\n\t\t\t * @returns {Function} Composed validation function.\n\t\t\t */\n\t\t\tfunctions: function() {\n\t\t\t\tvar args = arguments;\n\t\t\t\treturn function() {\n\t\t\t\t\t// It's important for validate functions to be able to accept the value\n\t\t\t\t\t// as argument in addition to this.getValue(), so that it is possible to\n\t\t\t\t\t// combine validate functions together to make more sophisticated\n\t\t\t\t\t// validators.\n\t\t\t\t\tvar value = this && this.getValue ? this.getValue() : args[ 0 ];\n\n\t\t\t\t\tvar msg,\n\t\t\t\t\t\trelation = CKEDITOR.VALIDATE_AND,\n\t\t\t\t\t\tfunctions = [],\n\t\t\t\t\t\ti;\n\n\t\t\t\t\tfor ( i = 0; i < args.length; i++ ) {\n\t\t\t\t\t\tif ( typeof args[ i ] == 'function' )\n\t\t\t\t\t\t\tfunctions.push( args[ i ] );\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\n\t\t\t\t\tif ( i < args.length && typeof args[ i ] == 'string' ) {\n\t\t\t\t\t\tmsg = args[ i ];\n\t\t\t\t\t\ti++;\n\t\t\t\t\t}\n\n\t\t\t\t\tif ( i < args.length && typeof args[ i ] == 'number' )\n\t\t\t\t\t\trelation = args[ i ];\n\n\t\t\t\t\tvar passed = ( relation == CKEDITOR.VALIDATE_AND ? true : false );\n\t\t\t\t\tfor ( i = 0; i < functions.length; i++ ) {\n\t\t\t\t\t\tif ( relation == CKEDITOR.VALIDATE_AND )\n\t\t\t\t\t\t\tpassed = passed && functions[ i ]( value );\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\tpassed = passed || functions[ i ]( value );\n\t\t\t\t\t}\n\n\t\t\t\t\treturn !passed ? msg : true;\n\t\t\t\t};\n\t\t\t},\n\n\t\t\t/**\n\t\t\t * Checks if a dialog UI element value meets the regex condition.\n\t\t\t *\n\t\t\t * ```javascript\n\t\t\t * CKEDITOR.dialog.validate.regex( 'error!', /^\\d*$/ )( '123' ) // true\n\t\t\t * CKEDITOR.dialog.validate.regex( 'error!' )( '123.321' ) // error!\n\t\t\t * ```\n\t\t\t *\n\t\t\t * @param {RegExp} regex Regular expression used to validate the value.\n\t\t\t * @param {String} msg Validator error message.\n\t\t\t * @returns {Function} Validation function.\n\t\t\t */\n\t\t\tregex: function( regex, msg ) {\n\t\t\t\t/*\n\t\t\t\t * Can be greatly shortened by deriving from functions validator if code size\n\t\t\t\t * turns out to be more important than performance.\n\t\t\t\t */\n\t\t\t\treturn function() {\n\t\t\t\t\tvar value = this && this.getValue ? this.getValue() : arguments[ 0 ];\n\t\t\t\t\treturn !regex.test( value ) ? msg : true;\n\t\t\t\t};\n\t\t\t},\n\n\t\t\t/**\n\t\t\t * Checks if a dialog UI element value is not an empty string.\n\t\t\t *\n\t\t\t * ```javascript\n\t\t\t * CKEDITOR.dialog.validate.notEmpty( 'error!' )( 'test' ) // true\n\t\t\t * CKEDITOR.dialog.validate.notEmpty( 'error!' )( ' ' ) // error!\n\t\t\t * ```\n\t\t\t *\n\t\t\t * @param {String} msg Validator error message.\n\t\t\t * @returns {Function} Validation function.\n\t\t\t */\n\t\t\tnotEmpty: function( msg ) {\n\t\t\t\treturn this.regex( notEmptyRegex, msg );\n\t\t\t},\n\n\t\t\t/**\n\t\t\t * Checks if a dialog UI element value is an Integer.\n\t\t\t *\n\t\t\t * ```javascript\n\t\t\t * CKEDITOR.dialog.validate.integer( 'error!' )( '123' ) // true\n\t\t\t * CKEDITOR.dialog.validate.integer( 'error!' )( '123.321' ) // error!\n\t\t\t * ```\n\t\t\t *\n\t\t\t * @param {String} msg Validator error message.\n\t\t\t * @returns {Function} Validation function.\n\t\t\t */\n\t\t\tinteger: function( msg ) {\n\t\t\t\treturn this.regex( integerRegex, msg );\n\t\t\t},\n\n\t\t\t/**\n\t\t\t * Checks if a dialog UI element value is a Number.\n\t\t\t *\n\t\t\t * ```javascript\n\t\t\t * CKEDITOR.dialog.validate.number( 'error!' )( '123' ) // true\n\t\t\t * CKEDITOR.dialog.validate.number( 'error!' )( 'test' ) // error!\n\t\t\t * ```\n\t\t\t *\n\t\t\t * @param {String} msg Validator error message.\n\t\t\t * @returns {Function} Validation function.\n\t\t\t */\n\t\t\t'number': function( msg ) {\n\t\t\t\treturn this.regex( numberRegex, msg );\n\t\t\t},\n\n\t\t\t/**\n\t\t\t * Checks if a dialog UI element value is a correct CSS length value.\n\t\t\t *\n\t\t\t * It allows `px`, `em`, `ex`, `in`, `cm`, `mm`, `pt`, `pc` units.\n\t\t\t *\n\t\t\t * ```javascript\n\t\t\t * CKEDITOR.dialog.validate.cssLength( 'error!' )( '10pt' ) // true\n\t\t\t * CKEDITOR.dialog.validate.cssLength( 'error!' )( 'solid' ) // error!\n\t\t\t * ```\n\t\t\t *\n\t\t\t * @param {String} msg Validator error message.\n\t\t\t * @returns {Function} Validation function.\n\t\t\t */\n\t\t\t'cssLength': function( msg ) {\n\t\t\t\treturn this.functions( function( val ) {\n\t\t\t\t\treturn cssLengthRegex.test( CKEDITOR.tools.trim( val ) );\n\t\t\t\t}, msg );\n\t\t\t},\n\n\t\t\t/**\n\t\t\t * Checks if a dialog UI element value is a correct HTML length value.\n\t\t\t *\n\t\t\t * It allows `px` units.\n\t\t\t *\n\t\t\t * ```javascript\n\t\t\t * CKEDITOR.dialog.validate.htmlLength( 'error!' )( '10px' ) // true\n\t\t\t * CKEDITOR.dialog.validate.htmlLength( 'error!' )( 'solid' ) // error!\n\t\t\t * ```\n\t\t\t *\n\t\t\t * @param {String} msg Validator error message.\n\t\t\t * @returns {Function} Validation function.\n\t\t\t */\n\t\t\t'htmlLength': function( msg ) {\n\t\t\t\treturn this.functions( function( val ) {\n\t\t\t\t\treturn htmlLengthRegex.test( CKEDITOR.tools.trim( val ) );\n\t\t\t\t}, msg );\n\t\t\t},\n\n\t\t\t/**\n\t\t\t * Checks if a dialog UI element value is a correct CSS inline style.\n\t\t\t *\n\t\t\t * ```javascript\n\t\t\t * CKEDITOR.dialog.validate.inlineStyle( 'error!' )( 'height: 10px; width: 20px;' ) // true\n\t\t\t * CKEDITOR.dialog.validate.inlineStyle( 'error!' )( 'test' ) // error!\n\t\t\t * ```\n\t\t\t *\n\t\t\t * @param {String} msg Validator error message.\n\t\t\t * @returns {Function} Validation function.\n\t\t\t */\n\t\t\t'inlineStyle': function( msg ) {\n\t\t\t\treturn this.functions( function( val ) {\n\t\t\t\t\treturn inlineStyleRegex.test( CKEDITOR.tools.trim( val ) );\n\t\t\t\t}, msg );\n\t\t\t},\n\n\t\t\t/**\n\t\t\t * Checks if a dialog UI element value and the given value are equal.\n\t\t\t *\n\t\t\t * ```javascript\n\t\t\t * CKEDITOR.dialog.validate.equals( 'foo', 'error!' )( 'foo' ) // true\n\t\t\t * CKEDITOR.dialog.validate.equals( 'foo', 'error!' )( 'baz' ) // error!\n\t\t\t * ```\n\t\t\t *\n\t\t\t * @param {String} value The value to compare.\n\t\t\t * @param {String} msg Validator error message.\n\t\t\t * @returns {Function} Validation function.\n\t\t\t */\n\t\t\tequals: function( value, msg ) {\n\t\t\t\treturn this.functions( function( val ) {\n\t\t\t\t\treturn val == value;\n\t\t\t\t}, msg );\n\t\t\t},\n\n\t\t\t/**\n\t\t\t * Checks if a dialog UI element value and the given value are not equal.\n\t\t\t *\n\t\t\t * ```javascript\n\t\t\t * CKEDITOR.dialog.validate.notEqual( 'foo', 'error!' )( 'baz' ) // true\n\t\t\t * CKEDITOR.dialog.validate.notEqual( 'foo', 'error!' )( 'foo' ) // error!\n\t\t\t * ```\n\t\t\t *\n\t\t\t * @param {String} value The value to compare.\n\t\t\t * @param {String} msg Validator error message.\n\t\t\t * @returns {Function} Validation function.\n\t\t\t */\n\t\t\tnotEqual: function( value, msg ) {\n\t\t\t\treturn this.functions( function( val ) {\n\t\t\t\t\treturn val != value;\n\t\t\t\t}, msg );\n\t\t\t}\n\t\t};\n\n\t\tCKEDITOR.on( 'instanceDestroyed', function( evt ) {\n\t\t\t// Remove dialog cover on last instance destroy.\n\t\t\tif ( CKEDITOR.tools.isEmpty( CKEDITOR.instances ) ) {\n\t\t\t\tvar currentTopDialog;\n\t\t\t\twhile ( ( currentTopDialog = CKEDITOR.dialog._.currentTop ) )\n\t\t\t\t\tcurrentTopDialog.hide();\n\t\t\t\tremoveCovers();\n\t\t\t}\n\n\t\t\tvar dialogs = evt.editor._.storedDialogs;\n\t\t\tfor ( var name in dialogs )\n\t\t\t\tdialogs[ name ].destroy();\n\n\t\t} );\n\n\t} )();\n\n\t// Extend the CKEDITOR.editor class with dialog specific functions.\n\tCKEDITOR.tools.extend( CKEDITOR.editor.prototype, {\n\t\t/**\n\t\t * Loads and opens a registered dialog.\n\t\t *\n\t\t *\t\tCKEDITOR.instances.editor1.openDialog( 'smiley' );\n\t\t *\n\t\t * @member CKEDITOR.editor\n\t\t * @param {String} dialogName The registered name of the dialog.\n\t\t * @param {Function} callback The function to be invoked after a dialog instance is created.\n\t\t * @param {CKEDITOR.dom.element/CKEDITOR.plugins.widget/Object} [forceModel] Forces opening the dialog\n\t\t * using the given model as a subject. The forced model will take precedence before the\n\t\t * {@link CKEDITOR.dialog.definition#getModel} method. Available since 4.13.0.\n\t\t * @returns {CKEDITOR.dialog} The dialog object corresponding to the dialog displayed or\n\t\t * `null` if the dialog name is not registered.\n\t\t * @see CKEDITOR.dialog#add\n\t\t */\n\t\topenDialog: function( dialogName, callback, forceModel ) {\n\t\t\tvar dialog = null, dialogDefinitions = CKEDITOR.dialog._.dialogDefinitions[ dialogName ];\n\n\t\t\tif ( CKEDITOR.dialog._.currentTop === null )\n\t\t\t\tshowCover( this );\n\n\t\t\t// If the dialogDefinition is already loaded, open it immediately.\n\t\t\tif ( typeof dialogDefinitions == 'function' ) {\n\t\t\t\tvar storedDialogs = this._.storedDialogs || ( this._.storedDialogs = {} );\n\n\t\t\t\tdialog = storedDialogs[ dialogName ] || ( storedDialogs[ dialogName ] = new CKEDITOR.dialog( this, dialogName ) );\n\n\t\t\t\tdialog.setModel( forceModel );\n\n\t\t\t\tcallback && callback.call( dialog, dialog );\n\t\t\t\tdialog.show();\n\n\t\t\t} else if ( dialogDefinitions == 'failed' ) {\n\t\t\t\thideCover( this );\n\t\t\t\tthrow new Error( '[CKEDITOR.dialog.openDialog] Dialog \"' + dialogName + '\" failed when loading definition.' );\n\t\t\t} else if ( typeof dialogDefinitions == 'string' ) {\n\n\t\t\t\tCKEDITOR.scriptLoader.load( CKEDITOR.getUrl( dialogDefinitions ),\n\t\t\t\t\tfunction() {\n\t\t\t\t\t\tvar dialogDefinition = CKEDITOR.dialog._.dialogDefinitions[ dialogName ];\n\t\t\t\t\t\t// In case of plugin error, mark it as loading failed.\n\t\t\t\t\t\tif ( typeof dialogDefinition != 'function' )\n\t\t\t\t\t\t\tCKEDITOR.dialog._.dialogDefinitions[ dialogName ] = 'failed';\n\n\t\t\t\t\t\tthis.openDialog( dialogName, callback, forceModel );\n\t\t\t\t\t}, this, 0, 1 );\n\t\t\t}\n\n\t\t\tCKEDITOR.skin.loadPart( 'dialog' );\n\n\t\t\t// Dissolve model, so `definition.getModel` can take precedence\n\t\t\t// in the next dialog opening (#2423).\n\t\t\tif ( dialog ) {\n\t\t\t\tdialog.once( 'hide', function() {\n\t\t\t\t\tdialog.setModel( null );\n\t\t\t\t}, null, null, 999 );\n\t\t\t}\n\n\t\t\treturn dialog;\n\t\t}\n\t} );\n} )();\n\nvar stylesLoaded = false;\n\nCKEDITOR.plugins.registered['dialog'] = null;\nCKEDITOR.plugins.add( 'dialog', {\n\trequires: 'dialogui',\n\tinit: function( editor ) {\n\t\tif ( !stylesLoaded ) {\n\t\t\tCKEDITOR.document.appendStyleSheet( this.path + 'styles/dialog.css' );\n\t\t\tstylesLoaded = true;\n\t\t}\n\n\t\teditor.on( 'doubleclick', function( evt ) {\n\t\t\tif ( evt.data.dialog )\n\t\t\t\teditor.openDialog( evt.data.dialog );\n\t\t}, null, null, 999 );\n\t}\n} );\nCKEDITOR.plugins.add( 'cmsdialog', {\n\trequires: 'dialogui',\n\tinit: function( editor ) {\n\t}\n} );\n\n// Dialog related configurations.\n\n/**\n * The color of the dialog background cover. It should be a valid CSS color string.\n *\n *\t\tconfig.dialog_backgroundCoverColor = 'rgb(255, 254, 253)';\n *\n * @cfg {String} [dialog_backgroundCoverColor='white']\n * @member CKEDITOR.config\n */\n\n/**\n * The opacity of the dialog background cover. It should be a number within the\n * range `[0.0, 1.0]`.\n *\n *\t\tconfig.dialog_backgroundCoverOpacity = 0.7;\n *\n * @cfg {Number} [dialog_backgroundCoverOpacity=0.5]\n * @member CKEDITOR.config\n */\n\n/**\n * If the dialog has more than one tab, put focus into the first tab as soon as dialog is opened.\n *\n *\t\tconfig.dialog_startupFocusTab = true;\n *\n * @cfg {Boolean} [dialog_startupFocusTab=false]\n * @member CKEDITOR.config\n */\n\n/**\n * The distance of magnetic borders used in moving and resizing dialogs,\n * measured in pixels.\n *\n *\t\tconfig.dialog_magnetDistance = 30;\n *\n * @cfg {Number} [dialog_magnetDistance=20]\n * @member CKEDITOR.config\n */\n\n/**\n * The guideline to follow when generating the dialog buttons. There are 3 possible options:\n *\n * * `'OS'` - the buttons will be displayed in the default order of the user's OS;\n * * `'ltr'` - for Left-To-Right order;\n * * `'rtl'` - for Right-To-Left order.\n *\n * Example:\n *\n *\t\tconfig.dialog_buttonsOrder = 'rtl';\n *\n * @since 3.5.0\n * @cfg {String} [dialog_buttonsOrder='OS']\n * @member CKEDITOR.config\n */\n\n/**\n * The dialog contents to removed. It's a string composed by dialog name and tab name with a colon between them.\n *\n * Separate each pair with semicolon (see example).\n *\n * **Note:** All names are case-sensitive.\n *\n * **Note:** Be cautious when specifying dialog tabs that are mandatory,\n * like `'info'`, dialog functionality might be broken because of this!\n *\n *\t\tconfig.removeDialogTabs = 'flash:advanced;image:Link';\n *\n * @since 3.5.0\n * @cfg {String} [removeDialogTabs='']\n * @member CKEDITOR.config\n */\n\n/**\n * Tells if user should not be asked to confirm close, if any dialog field was modified.\n * By default it is set to `false` meaning that the confirmation dialog will be shown.\n *\n *\t\tconfig.dialog_noConfirmCancel = true;\n *\n * @since 4.3.0\n * @cfg {Boolean} [dialog_noConfirmCancel=false]\n * @member CKEDITOR.config\n */\n\n/**\n * Event fired when a dialog definition is about to be used to create a dialog in\n * an editor instance. This event makes it possible to customize the definition\n * before creating it.\n *\n * Note that this event is called only the first time a specific dialog is\n * opened. Successive openings will use the cached dialog, and this event will\n * not get fired.\n *\n * @event dialogDefinition\n * @member CKEDITOR\n * @param {Object} data\n * @param {String} data.name The name of the dialog.\n * @param {CKEDITOR.dialog.definition} data.definition The dialog definition that\n * is being loaded.\n * @param {CKEDITOR.dialog} data.dialog A dialog instance that the definition is loaded\n * for. Introduced in **CKEditor 4.13.0**.\n * @param {CKEDITOR.editor} editor The editor instance that will use the dialog.\n */\n\n/**\n * Event fired when a tab is going to be selected in a dialog.\n *\n * @event selectPage\n * @member CKEDITOR.dialog\n * @param data\n * @param {String} data.page The ID of the page that is going to be selected.\n * @param {String} data.currentPage The ID of the current page.\n */\n\n/**\n * Event fired when the user tries to dismiss a dialog.\n *\n * @event cancel\n * @member CKEDITOR.dialog\n * @param data\n * @param {Boolean} data.hide Whether the event should proceed or not.\n */\n\n/**\n * Event fired when the user tries to confirm a dialog.\n *\n * @event ok\n * @member CKEDITOR.dialog\n * @param data\n * @param {Boolean} data.hide Whether the event should proceed or not.\n */\n\n/**\n * Event fired when a dialog is shown.\n *\n * @event show\n * @member CKEDITOR.dialog\n */\n\n/**\n * Event fired when a dialog is shown.\n *\n * @event dialogShow\n * @member CKEDITOR.editor\n * @param {CKEDITOR.editor} editor This editor instance.\n * @param {CKEDITOR.dialog} data The opened dialog instance.\n */\n\n/**\n * Event fired when a dialog is hidden.\n *\n * @event hide\n * @member CKEDITOR.dialog\n */\n\n/**\n * Event fired when a dialog is hidden.\n *\n * @event dialogHide\n * @member CKEDITOR.editor\n * @param {CKEDITOR.editor} editor This editor instance.\n * @param {CKEDITOR.dialog} data The hidden dialog instance.\n */\n\n/**\n * Event fired when a dialog is being resized. The event is fired on\n * both the {@link CKEDITOR.dialog} object and the dialog instance\n * since 3.5.3, previously it was only available in the global object.\n *\n * @static\n * @event resize\n * @member CKEDITOR.dialog\n * @param data\n * @param {CKEDITOR.dialog} data.dialog The dialog being resized (if\n * it is fired on the dialog itself, this parameter is not sent).\n * @param {String} data.skin The skin name.\n * @param {Number} data.width The new width.\n * @param {Number} data.height The new height.\n */\n\n/**\n * Event fired when a dialog is being resized. The event is fired on\n * both the {@link CKEDITOR.dialog} object and the dialog instance\n * since 3.5.3, previously it was only available in the global object.\n *\n * @since 3.5.0\n * @event resize\n * @member CKEDITOR.dialog\n * @param data\n * @param {Number} data.width The new width.\n * @param {Number} data.height The new height.\n */\n\n/**\n * Event fired when the dialog state changes, usually by {@link CKEDITOR.dialog#setState}.\n *\n * @since 4.5.0\n * @event state\n * @member CKEDITOR.dialog\n * @param data\n * @param {Number} data The new state. Either {@link CKEDITOR#DIALOG_STATE_IDLE} or {@link CKEDITOR#DIALOG_STATE_BUSY}.\n */\n})(CMS.$);\n","(function ($) {\n if (CKEDITOR && CKEDITOR.plugins && CKEDITOR.plugins.registered && CKEDITOR.plugins.registered.cmsplugins) {\n return;\n }\n\n /**\n * Determine if we should return `div` or `span` based on the\n * plugin markup.\n *\n * @function getFakePluginElement\n * @private\n * @param {String} pluginMarkup valid html hopefully\n * @returns {String} div|span\n */\n function getFakePluginElement(pluginMarkup) {\n var innerTags = (pluginMarkup.match(/<\\s*([^>\\s]+)[\\s\\S]*?>/) || [0, false]).splice(1);\n\n var containsAnyBlockLikeElements = innerTags.some(function (tag) {\n return tag && CKEDITOR.dtd.$block[tag];\n });\n\n var fakeRealType = 'span';\n\n if (containsAnyBlockLikeElements) {\n fakeRealType = 'div';\n }\n\n return fakeRealType;\n }\n\n /**\n * @function replaceTagName\n * @private\n * @param {jQuery} elements\n * @param {String} tagName\n */\n function replaceTagName(elements, tagName) {\n elements.each(function (i, el) {\n var newElement;\n\n var element = $(el);\n\n newElement = $('<' + tagName + '>');\n\n // attributes\n $.each(el.attributes, function (index, attribute) {\n newElement.attr(attribute.nodeName, attribute.nodeValue);\n });\n\n // content\n newElement.html(element.html());\n\n element.replaceWith(newElement);\n });\n }\n\n CKEDITOR.plugins.add('cmsplugins', {\n\n // Register the icons. They must match command names.\n icons: 'cmsplugins',\n\n // The plugin initialization logic goes inside this method.\n init: function (editor) {\n var that = this;\n\n\t\t\tCKEDITOR.on('instanceReady', function () {\n var widgetInstances = [];\n\n for (var key in editor.widgets.instances) {\n if (editor.widgets.instances.hasOwnProperty(key)) {\n widgetInstances.push(editor.widgets.instances[key]);\n }\n }\n\n that.numberOfChildren = CKEDITOR.tools.array.filter(widgetInstances, function (i) {\n return i.name === 'cms-widget';\n }).length;\n });\n /**\n * populated with _fresh_ child plugins\n */\n this.unsaved_child_plugins = [];\n\n\t\t\tvar settings = CMS_Editor.get_settings(editor.name);\n\t\t\tthis.setupCancelCleanupCallback(settings);\n\n // don't do anything if there are no plugins defined\n if (settings === undefined || settings.plugins === undefined) {\n return false;\n }\n\n this.setupDialog(editor);\n\n // add the button\n editor.ui.add('cmsplugins', CKEDITOR.UI_PANELBUTTON, {\n toolbar: 'cms,0',\n label: settings.lang.toolbar,\n title: settings.lang.toolbar,\n className: 'cke_panelbutton__cmsplugins',\n modes: { wysiwyg: 1 },\n editorFocus: 0,\n\n panel: {\n css: [CKEDITOR.skin.getPath('editor')].concat(editor.config.contentsCss),\n attributes: { 'role': 'cmsplugins', 'aria-label': settings.lang.aria }\n },\n\n // this is called when creating the dropdown list\n onBlock: function (panel, block) {\n block.element.setHtml(editor.plugins.cmsplugins.setupDropdown(editor));\n\n var anchors = $(block.element.$).find('.cke_panel_listItem a');\n\n anchors.bind('click', function (e) {\n e.preventDefault();\n\n that.addPlugin($(this), panel, editor);\n });\n }\n });\n\n // handle edit event via context menu\n if (editor.contextMenu) {\n this.setupContextMenu(editor);\n }\n\n editor.addCommand('cmspluginsEdit', {\n exec: function () {\n var element = that.getElementFromSelection(editor);\n var plugin = that.getPluginWidget(element);\n if (plugin) {\n that.editPlugin(plugin, editor);\n }\n }\n });\n\n // handle edit event on double click\n // if event is a jQuery event (touchend), than we mutate\n // event a bit so we make the payload similar to what ckeditor.event produces\n var handleEdit = function (event) {\n event.stop();\n\n if (event.type === 'touchend' || event.type === 'click') {\n var cmsPluginNode = $(event.currentTarget).closest('cms-plugin')[0];\n\t\t\t\t\tvar element;\n\n // pick cke_widget span\n // eslint-disable-next-line new-cap\n element = new CKEDITOR.dom.element(cmsPluginNode).getParent();\n\n event.data = event.data || {};\n // have to fake selection to be able to replace markup after editing\n editor.getSelection().fake(element);\n }\n\n editor.execCommand('cmspluginsEdit');\n };\n\n editor.on('doubleclick', handleEdit);\n\n editor.on('instanceReady', function () {\n/*\n\t\t\t\tvar context = CMS.$('iframe.cke_wysiwyg_frame');\n\t\t\t\tif (context.length > 0) {\n\t\t\t\t\tcontext = context.contentWindow.document.documentElement;\n\t\t\t\t} else {\n\t\t\t\t\tcontext = null;\n\t\t\t\t}\n CMS.$('cms-plugin', CMS.$('iframe.cke_wysiwyg_frame')[0]\n .contentWindow.document.documentElement).on('click touchend', handleEdit);\n*/\n });\n\n this.setupDataProcessor(editor);\n },\n\n getElementFromSelection: function (editor) {\n var selection = editor.getSelection();\n var element = selection.getSelectedElement() ||\n selection.getCommonAncestor().getAscendant('cms-plugin', true);\n\n return element;\n },\n\n getPluginWidget: function (element) {\n if (!element) {\n return null;\n }\n return element.getAscendant('cms-plugin', true) || element.findOne('cms-plugin');\n },\n\n setupDialog: function (editor) {\n var that = this;\n var definition = function () {\n return {\n title: '',\n minWidth: 200,\n minHeight: 200,\n contents: [{\n elements: [\n {\n type: 'html',\n html: '