: str_replace(): Passing null to parameter #2 ($replace) of type array|string is deprecated in
var Progress = Widget.extend({
init: function (settings) {
self.classes.add('progress');
if (!self.settings.filter) {
self.settings.filter = function (value) {
return Math.round(value);
renderHtml: function () {
var self = this, id = self._id, prefix = this.classPrefix;
return '<div id="' + id + '" class="' + self.classes + '">' + '<div class="' + prefix + 'bar-container">' + '<div class="' + prefix + 'bar"></div>' + '</div>' + '<div class="' + prefix + 'text">0%</div>' + '</div>';
postRender: function () {
self.value(self.settings.value);
bindStates: function () {
function setValue(value) {
value = self.settings.filter(value);
self.getEl().lastChild.innerHTML = value + '%';
self.getEl().firstChild.firstChild.style.width = value + '%';
self.state.on('change:value', function (e) {
setValue(self.state.get('value'));
var updateLiveRegion = function (ctx, text) {
ctx.getEl().lastChild.textContent = text + (ctx.progressBar ? ' ' + ctx.progressBar.value() + '%' : '');
var Notification = Control$1.extend({
Defaults: { classes: 'widget notification' },
init: function (settings) {
self.maxWidth = settings.maxWidth;
self.text(settings.text);
self.icon = settings.icon;
self.color = settings.color;
self.classes.add('notification-' + settings.type);
if (settings.timeout && (settings.timeout < 0 || settings.timeout > 0) && !settings.closeButton) {
self.closeButton = false;
self.classes.add('has-close');
if (settings.progressBar) {
self.progressBar = new Progress();
self.on('click', function (e) {
if (e.target.className.indexOf(self.classPrefix + 'close') !== -1) {
renderHtml: function () {
var prefix = self.classPrefix;
var icon = '', closeButton = '', progressBar = '', notificationStyle = '';
icon = '<i class="' + prefix + 'ico' + ' ' + prefix + 'i-' + self.icon + '"></i>';
notificationStyle = ' style="max-width: ' + self.maxWidth + 'px;' + (self.color ? 'background-color: ' + self.color + ';"' : '"');
closeButton = '<button type="button" class="' + prefix + 'close" aria-hidden="true">\xD7</button>';
progressBar = self.progressBar.renderHtml();
return '<div id="' + self._id + '" class="' + self.classes + '"' + notificationStyle + ' role="presentation">' + icon + '<div class="' + prefix + 'notification-inner">' + self.state.get('text') + '</div>' + progressBar + closeButton + '<div style="clip: rect(1px, 1px, 1px, 1px);height: 1px;overflow: hidden;position: absolute;width: 1px;"' + ' aria-live="assertive" aria-relevant="additions" aria-atomic="true"></div>' + '</div>';
postRender: function () {
global$7.setTimeout(function () {
self.$el.addClass(self.classPrefix + 'in');
updateLiveRegion(self, self.state.get('text'));
bindStates: function () {
self.state.on('change:text', function (e) {
self.getEl().firstChild.innerHTML = e.value;
updateLiveRegion(self, e.value);
self.progressBar.bindStates();
self.progressBar.state.on('change:value', function (e) {
updateLiveRegion(self, self.state.get('text'));
if (!self.fire('close').isDefaultPrevented()) {
style = self.getEl().style;
style.left = rect.x + 'px';
style.top = rect.y + 'px';
style.zIndex = 65535 - 1;
function NotificationManagerImpl (editor) {
var getEditorContainer = function (editor) {
return editor.inline ? editor.getElement() : editor.getContentAreaContainer();
var getContainerWidth = function () {
var container = getEditorContainer(editor);
return funcs.getSize(container).width;
var prePositionNotifications = function (notifications) {
each(notifications, function (notification) {
notification.moveTo(0, 0);
var positionNotifications = function (notifications) {
if (notifications.length > 0) {
var firstItem = notifications.slice(0, 1)[0];
var container = getEditorContainer(editor);
firstItem.moveRel(container, 'tc-tc');
each(notifications, function (notification, index) {
notification.moveRel(notifications[index - 1].getEl(), 'bc-tc');
var reposition = function (notifications) {
prePositionNotifications(notifications);
positionNotifications(notifications);
var open = function (args, closeCallback) {
var extendedArgs = global$2.extend(args, { maxWidth: getContainerWidth() });
var notif = new Notification(extendedArgs);
notif.args = extendedArgs;
if (extendedArgs.timeout > 0) {
notif.timer = setTimeout(function () {
}, extendedArgs.timeout);
notif.on('close', function () {
var close = function (notification) {
var getArgs = function (notification) {
return notification.args;
function toggleFullScreenState(state) {
var noScaleMetaValue = 'width=device-width,initial-scale=1.0,user-scalable=0,minimum-scale=1.0,maximum-scale=1.0';
var viewport = global$9('meta[name=viewport]')[0], contentValue;
if (global$8.overrideViewPort === false) {
viewport = domGlobals.document.createElement('meta');
viewport.setAttribute('name', 'viewport');
domGlobals.document.getElementsByTagName('head')[0].appendChild(viewport);
contentValue = viewport.getAttribute('content');
if (contentValue && typeof oldMetaValue !== 'undefined') {
oldMetaValue = contentValue;
viewport.setAttribute('content', state ? noScaleMetaValue : oldMetaValue);
function toggleBodyFullScreenClasses(classPrefix, state) {
if (checkFullscreenWindows() && state === false) {
domGlobals.document.documentElement,
]).removeClass(classPrefix + 'fullscreen');
function checkFullscreenWindows() {
for (var i = 0; i < windows.length; i++) {
if (windows[i]._fullscreen) {
function handleWindowResize() {
w: domGlobals.window.innerWidth,
h: domGlobals.window.innerHeight
global$7.setInterval(function () {
var w = domGlobals.window.innerWidth, h = domGlobals.window.innerHeight;
if (lastSize_1.w !== w || lastSize_1.h !== h) {
global$9(domGlobals.window).trigger('resize');
var rect = funcs.getWindowSize();
for (i = 0; i < windows.length; i++) {
layoutRect = windows[i].layoutRect();
windows[i].moveTo(windows[i].settings.x || Math.max(0, rect.w / 2 - layoutRect.w / 2), windows[i].settings.y || Math.max(0, rect.h / 2 - layoutRect.h / 2));
global$9(domGlobals.window).on('resize', reposition);
var Window = FloatPanel.extend({
this.fire('submit', { data: this.toJSON() });
init: function (settings) {
self.classes.add('window');
self.bodyClasses.add('window-body');
self.state.set('fixed', true);
self.statusbar = new Panel({
pack: self.isRtl() ? 'start' : 'end',
defaults: { type: 'button' },
self.statusbar.classes.add('foot');
self.statusbar.parent(self);
self.on('click', function (e) {
var closeClass = self.classPrefix + 'close';
if (funcs.hasClass(e.target, closeClass) || funcs.hasClass(e.target.parentNode, closeClass)) {
self.on('cancel', function () {
self.on('move', function (e) {
if (e.control === self) {
self.aria('describedby', self.describedBy || self._id + '-none');
self.aria('label', settings.title);
self._fullscreen = false;
var statusbar = self.statusbar;
var layoutRect, width, x, needsRecalc;
self.layoutRect(funcs.getWindowSize());
self.layoutRect().contentH = self.layoutRect().innerH;
layoutRect = self.layoutRect();
if (self.settings.title && !self._fullscreen) {
width = layoutRect.headerW;
if (width > layoutRect.w) {
x = layoutRect.x - Math.max(0, width / 2);
statusbar.layoutRect({ w: self.layoutRect().innerW }).recalc();
width = statusbar.layoutRect().minW + layoutRect.deltaW;
if (width > layoutRect.w) {
x = layoutRect.x - Math.max(0, width - layoutRect.w);
initLayoutRect: function () {
var layoutRect = self._super();
if (self.settings.title && !self._fullscreen) {
headEl = self.getEl('head');
var size = funcs.getSize(headEl);
layoutRect.headerW = size.width;
layoutRect.headerH = size.height;
deltaH += layoutRect.headerH;
deltaH += self.statusbar.layoutRect().h;
layoutRect.deltaH += deltaH;
layoutRect.minH += deltaH;
var rect = funcs.getWindowSize();
layoutRect.x = self.settings.x || Math.max(0, rect.w / 2 - layoutRect.w / 2);
layoutRect.y = self.settings.y || Math.max(0, rect.h / 2 - layoutRect.h / 2);
renderHtml: function () {
var self = this, layout = self._layout, id = self._id, prefix = self.classPrefix;
var settings = self.settings;
var headerHtml = '', footerHtml = '', html = settings.html;
headerHtml = '<div id="' + id + '-head" class="' + prefix + 'window-head">' + '<div id="' + id + '-title" class="' + prefix + 'title">' + self.encode(settings.title) + '</div>' + '<div id="' + id + '-dragh" class="' + prefix + 'dragh"></div>' + '<button type="button" class="' + prefix + 'close" aria-hidden="true">' + '<i class="mce-ico mce-i-remove"></i>' + '</button>' + '</div>';
html = '<iframe src="' + settings.url + '" tabindex="-1"></iframe>';
if (typeof html === 'undefined') {
html = layout.renderHtml(self);
footerHtml = self.statusbar.renderHtml();
return '<div id="' + id + '" class="' + self.classes + '" hidefocus="1">' + '<div class="' + self.classPrefix + 'reset" role="application">' + headerHtml + '<div id="' + id + '-body" class="' + self.bodyClasses + '">' + html + '</div>' + footerHtml + '</div>' + '</div>';
fullscreen: function (state) {
var documentElement = domGlobals.document.documentElement;
var prefix = self.classPrefix;
if (state !== self._fullscreen) {
global$9(domGlobals.window).on('resize', function () {
time = new Date().getTime();
var rect = funcs.getWindowSize();
self.moveTo(0, 0).resizeTo(rect.w, rect.h);
if (new Date().getTime() - time > 50) {
self._timer = global$7.setTimeout(function () {
var rect = funcs.getWindowSize();
self.moveTo(0, 0).resizeTo(rect.w, rect.h);
layoutRect = self.layoutRect();
self._fullscreen = state;
self.borderBox = BoxUtils.parseBox(self.settings.border);
self.getEl('head').style.display = '';
layoutRect.deltaH += layoutRect.headerH;
]).removeClass(prefix + 'fullscreen');
self.classes.remove('fullscreen');
self.moveTo(self._initial.x, self._initial.y).resizeTo(self._initial.w, self._initial.h);
self.borderBox = BoxUtils.parseBox('0');
self.getEl('head').style.display = 'none';
layoutRect.deltaH -= layoutRect.headerH + 2;
]).addClass(prefix + 'fullscreen');
self.classes.add('fullscreen');
var rect = funcs.getWindowSize();
self.moveTo(0, 0).resizeTo(rect.w, rect.h);
postRender: function () {
self.statusbar.postRender();
this.dragHelper = new DragHelper(self._id + '-dragh', {
self.moveTo(startPos.x + e.deltaX, startPos.y + e.deltaY);
self.on('submit', function (e) {
if (!e.isDefaultPrevented()) {
toggleFullScreenState(true);
return this.fire('submit', { data: this.toJSON() });
self.dragHelper.destroy();
toggleBodyFullScreenClasses(self.classPrefix, false);
if (windows[i] === self) {