From 59f63885dd975257e5d183c5377bcc09574421a2 Mon Sep 17 00:00:00 2001 From: WoltLab Date: Thu, 15 Apr 2021 07:11:56 +0000 Subject: [PATCH] Updating minified JavaScript files --- .../files/js/3rdParty/redactor2/redactor.combined.min.js | 4 ++-- wcfsetup/install/files/js/WCF.Combined.min.js | 6 +++--- wcfsetup/install/files/js/WCF.Combined.tiny.min.js | 4 ++-- wcfsetup/install/files/js/WoltLabSuite.Core.min.js | 2 +- wcfsetup/install/files/js/WoltLabSuite.Core.tiny.min.js | 2 +- 5 files changed, 9 insertions(+), 9 deletions(-) diff --git a/wcfsetup/install/files/js/3rdParty/redactor2/redactor.combined.min.js b/wcfsetup/install/files/js/3rdParty/redactor2/redactor.combined.min.js index 38960c3113..702e4c5818 100644 --- a/wcfsetup/install/files/js/3rdParty/redactor2/redactor.combined.min.js +++ b/wcfsetup/install/files/js/3rdParty/redactor2/redactor.combined.min.js @@ -88,7 +88,7 @@ (function (window, undefined) { $.Redactor.prototype.WoltLabPage=function(){"use strict";return{init:function(){var t=this.button.add("woltlabPage","");require(["WoltLabSuite/Core/Ui/Redactor/Page"],function(e){new e(this,t[0])}.bind(this))}}}; })(this); // plugins/WoltLabPaste.js -(function (window, undefined) { $.Redactor.prototype.WoltLabPaste=function(){"use strict";var t=null;return{init:function(){var e,i,n,s,r=null,l=!1,a=document.documentMode&&"object"==typeof window.clipboardData,o=null,d=null,h=function(t){var e,i,n,s;this.rtePaste=!0,(e=!("pre"!==this.opts.type&&!this.utils.isCurrentOrParent("pre")))&&t.preventDefault(),this.utils.saveScroll(),this.selection.save(),this.paste.createPasteBox(e),i=this.paste.getPasteBoxCode(e),this.buffer.set(),this.selection.restore(),this.utils.restoreScroll(),n=this.clean.getCurrentType(i),i=this.clean.onPaste(i,n),i=void 0===(s=this.core.callback("paste",i))?i:s,this.paste.insert(i,n),this.rtePaste=!1,e&&this.clean.cleanPre()}.bind(this),c=this.paste.init;this.paste.init=function(e){var i,n,s,p,u,f;d=o=null,i="pre"===this.opts.type||this.utils.isCurrentOrParent("pre"),l=!i&&this.utils.isCurrentOrParent("kbd"),i||l?(r=a?window.clipboardData.getData("Text"):e.originalEvent.clipboardData.getData("text/plain"),n=this.clean.encodeEntities,this.clean.encodeEntities=function(t){return this.clean.encodeEntities=n,WCF.String.escapeHTML(t)}.bind(this)):a||(p=!1,-1!==(s=e.originalEvent.clipboardData.types).indexOf("text/html")&&((o=e.originalEvent.clipboardData.getData("text/html")).trim().match(/^]*>[\s\S]*?]*>([\s\S]+)<\/body>[\s\S]*?<\/html>$/)&&(o=RegExp.$1.replace(/^\s*(?:)(.+)(?:)?\s*$/,"$1")),p=0!==o.trim().length),p||-1===s.indexOf("text/plain")||(u=WCF.String.escapeHTML(e.originalEvent.clipboardData.getData("text/plain")),d="",1===(f=u.split("\n")).length?d=u:f.forEach((function(t){""===(t=t.trim())&&(t="
"),d+="

"+t+"

"})))),null===d&&null===o||e.preventDefault(),"android"===t.platform()&&"chrome"===t.browser()?h(e):c.call(this,e)}.bind(this),require(["Environment"],function(e){if("ios"===(t=e).platform()){var i=this.paste.appendPasteBox;this.paste.appendPasteBox=function(){this.$pasteBox.css({fontSize:"16px",height:"1px",left:"1px",overflow:"hidden",position:"absolute",top:~~(window.innerHeight/4)+window.pageYOffset+"px",width:"1px"}),i.call(this)}.bind(this)}}.bind(this)),e=this.paste.createPasteBox,this.paste.createPasteBox=function(t){null===o&&null===d&&e.call(this,t)}.bind(this),i=this.paste.getPasteBoxCode,this.paste.getPasteBoxCode=function(t){if(null!==o||null!==d)return this.tmpScrollTop=void 0,o||d;var e=i.call(this,t);return l?r:!t||e&&!a?e:r}.bind(this),this.core.editor().off("paste.redactor").on("paste.redactor",this.paste.init.bind(this)),this.paste.detectClipboardUpload=function(t){var e,i,n,s,r,l,o,d,h,c;if(t=t.originalEvent||t,e=null,a){if(!window.clipboardData.files.length)return!1;e=window.clipboardData.files.item(0)}else{if(this.detect.isFirefox())return!1;if(n=(i=t.clipboardData).types,Array.isArray(n)&&-1!==n.indexOf("public.tiff")){if(0===i.files.length)return;if(1!==i.files.length)return t.preventDefault(),!1;h=!0,null!==(e=i.files[0])&&t.preventDefault()}if(null===e){if(!i.items||!i.items.length)return;if(this.detect.isWebkit()){for(r=!1,l=!1,o=0,d=i.items.length;o1&&(h=!0,null!==(e=i.items[1].getAsFile())&&t.preventDefault()),null===e)return!1}else this.detect.isWebkit()&&1===i.items.length&&t.preventDefault()}}return(c=new FileReader).readAsDataURL(e),c.onload=this.paste.insertFromClipboard.bind(this),!1===h}.bind(this),this.paste.insertFromClipboard=function(t){window.FormData&&(this.buffer.set(),WCF.System.Event.fireEvent("com.woltlab.wcf.redactor2","pasteFromClipboard_"+this.$element[0].id,{blob:this.utils.dataURItoBlob(t.target.result)}),this.rtePaste=!1)}.bind(this),n="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7",s=this.paste.insert,this.paste.insert=function(t,e){var i,r,o,d,h,c,p,u,f,b,m,g,A,v,x;if(l&&(e.pre=!0),this.utils.isCurrentOrParent("kbd")){for(s.call(this,t,e),(i=this.selection.current()).nodeType===Node.TEXT_NODE&&(i=i.parentNode),r=i.closest("kbd"),o=elByTag("p",r);o.length;)o[0].outerHTML=o[0].innerHTML;if((d=r.innerHTML.split(//)).length>1){for(h=this.selection.block(),c=1,p=d.length;c"+d[c]+(c===p-1?this.marker.html():"")+"",h.parentNode.insertBefore(u,h.nextSibling),h=u;r.innerHTML=d[0],this.selection.restore()}}else{if(e.pre)return s.call(this,t,e);if((f=elCreate("div")).innerHTML=t,1===f.childElementCount&&"A"===f.children[0].nodeName&&(b=f.children[0],f.firstChild===b&&f.lastChild===b&&b.href===b.textContent)){for(;b.childNodes.length;)f.insertBefore(b.childNodes[0],b);f.removeChild(b)}for(m=[],e.pre||e.text||elBySelAll("img",f,function(t){var e,i=t.src;0===i.indexOf("data:image")&&i!==n&&(t.src=n,e=WCF.getUUID(),elData(t,"uuid",e),m.push({src:i,uuid:e}),elHide(t))}.bind(this)),elBySelAll("pre",f,(function(t){elBySelAll("br",t,(function(t){var e=t.parentNode;e.insertBefore(document.createTextNode("\n"),t),e.removeChild(t)}))})),s.call(this,f.innerHTML,e),(g=window.getSelection()).rangeCount&&"A"===g.anchorNode.nodeName&&g.anchorOffset===g.anchorNode.childNodes.length&&this.caret.after(g.anchorNode),m.length&&window.setTimeout(function(){var t,e,i,n;for(i=0,n=m.length;i]*>[\s\S]*?]*>([\s\S]+)<\/body>[\s\S]*?<\/html>$/)&&(o=RegExp.$1.replace(/^\s*(?:)(.+)(?:)?\s*$/,"$1")),p=0!==o.trim().length),p||-1===r.indexOf("text/plain")||(f=WCF.String.escapeHTML(e.originalEvent.clipboardData.getData("text/plain")),d="",1===(u=f.split("\n")).length?d=f:u.forEach((function(t){""===(t=t.trim())&&(t="
"),d+="

"+t+"

"})))),null===d&&null===o||e.preventDefault(),"android"===t.platform()&&"chrome"===t.browser()?h(e):c.call(this,e)}.bind(this),require(["Environment"],function(e){if("ios"===(t=e).platform()){var i=this.paste.appendPasteBox;this.paste.appendPasteBox=function(){this.$pasteBox.css({fontSize:"16px",height:"1px",left:"1px",overflow:"hidden",position:"absolute",top:~~(window.innerHeight/4)+window.pageYOffset+"px",width:"1px"}),i.call(this)}.bind(this)}}.bind(this)),e=this.paste.createPasteBox,this.paste.createPasteBox=function(t){null===o&&null===d&&e.call(this,t)}.bind(this),i=this.paste.getPasteBoxCode,this.paste.getPasteBoxCode=function(t){if(null!==o||null!==d)return this.tmpScrollTop=void 0,o||d;var e=i.call(this,t);return l?s:!t||e&&!a?e:s}.bind(this),this.core.editor().off("paste.redactor").on("paste.redactor",this.paste.init.bind(this)),this.paste.detectClipboardUpload=function(t){var e,i,n,r,s,l,o,d,h,c;if(t=t.originalEvent||t,e=null,a){if(!window.clipboardData.files.length)return!1;e=window.clipboardData.files.item(0)}else{if(this.detect.isFirefox())return!1;if(n=(i=t.clipboardData).types,Array.isArray(n)&&-1!==n.indexOf("public.tiff")){if(0===i.files.length)return;if(1!==i.files.length)return t.preventDefault(),!1;h=!0,null!==(e=i.files[0])&&t.preventDefault()}if(null===e){if(!i.items||!i.items.length)return;if(this.detect.isWebkit()){for(s=!1,l=!1,o=0,d=i.items.length;o1&&(h=!0,null!==(e=i.items[1].getAsFile())&&t.preventDefault()),null===e)return!1}else this.detect.isWebkit()&&1===i.items.length&&t.preventDefault()}}return(c=new FileReader).readAsDataURL(e),c.onload=this.paste.insertFromClipboard.bind(this),!1===h}.bind(this),this.paste.insertFromClipboard=function(t){window.FormData&&(this.buffer.set(),WCF.System.Event.fireEvent("com.woltlab.wcf.redactor2","pasteFromClipboard_"+this.$element[0].id,{blob:this.utils.dataURItoBlob(t.target.result)}),this.rtePaste=!1)}.bind(this),n="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7",r=this.paste.insert,this.paste.insert=function(t,e){var i,s,o,d,h,c,p,f,u,b,m,g,v,A,x;if(l&&(e.pre=!0),this.utils.isCurrentOrParent("kbd")){for(r.call(this,t,e),(i=this.selection.current()).nodeType===Node.TEXT_NODE&&(i=i.parentNode),s=i.closest("kbd"),o=elByTag("p",s);o.length;)o[0].outerHTML=o[0].innerHTML;if((d=s.innerHTML.split(//)).length>1){for(h=this.selection.block(),c=1,p=d.length;c"+d[c]+(c===p-1?this.marker.html():"")+"",h.parentNode.insertBefore(f,h.nextSibling),h=f;s.innerHTML=d[0],this.selection.restore()}}else{if(e.pre)return r.call(this,t,e);if((u=elCreate("div")).innerHTML=t,1===u.childElementCount&&"A"===u.children[0].nodeName&&(b=u.children[0],u.firstChild===b&&u.lastChild===b&&b.href===b.textContent)){for(;b.childNodes.length;)u.insertBefore(b.childNodes[0],b);u.removeChild(b)}for(m=[],e.pre||e.text||elBySelAll("img",u,function(t){var e,i=t.src;0!==i.indexOf("data:image")&&0!==i.indexOf("blob:")||i===n||(t.src=n,e=WCF.getUUID(),elData(t,"uuid",e),m.push({src:i,uuid:e}),elHide(t))}.bind(this)),elBySelAll("pre",u,(function(t){elBySelAll("br",t,(function(t){var e=t.parentNode;e.insertBefore(document.createTextNode("\n"),t),e.removeChild(t)}))})),r.call(this,u.innerHTML,e),(g=window.getSelection()).rangeCount&&"A"===g.anchorNode.nodeName&&g.anchorOffset===g.anchorNode.childNodes.length&&this.caret.after(g.anchorNode),m.length&&window.setTimeout(function(){var t,e,i,n;for(i=0,n=m.length;i"===e.children[1].innerHTML.trim()&&e.removeChild(t)}))},r=function(e){elBySelAll("pre, woltlab-quote, woltlab-spoiler",e,(function(e){e.removeAttribute("data-title")})),WCF.System.Event.fireEvent("com.woltlab.wcf.redactor2","source_stripIntermediateCode_"+n,{div:e})},o=this.source.hide;this.source.hide=function(){var e=$("
").html(this.source.$textarea.val());!function(e){elBySelAll(".icon, .fa",e,(function(e){var t=e.className.split(" ");t=t.filter((function(e){return"fa"!==e&&"icon"!==e&&!e.match(/^icon\d{2}$/)&&!e.match(/^fa-[a-z\-]+$/)})),e.className=t.join(" "),""===e.className.trim()&&""===e.innerHTML&&elRemove(e)}))}(e[0]),this.source.$textarea.val(e[0].innerHTML),o.call(this),setTimeout(function(){this.focus.end(),i(this.core.editor()[0])}.bind(this),100),this.placeholder.enable()}.bind(this),e=this.source.$textarea[0],this.$element[0].parentNode.insertBefore(e,this.$element[0]),t=this.source.show,this.source.show=function(){var n,o=this.$editor[0].offsetHeight,l=this.code.get();t.call(this),this.source.$textarea.val(l.replace(/ /g," ")),e.style.setProperty("height",Math.ceil(o)+"px",""),e.style.setProperty("display","block",""),(n=elCreate("div")).innerHTML=e.value,i(n),r(n),e.value=this.WoltLabSource.format(n.innerHTML),e.selectionStart=e.selectionEnd=e.value.length}.bind(this),WCF.System.Event.addListener("com.woltlab.wcf.redactor2","validate_"+n,function(t){e.clientHeight&&(t.api.throwError(this.$element[0],WCF.Language.get("wcf.editor.source.error.active")),t.valid=!1)}.bind(this))},isActive:function(){return"none"===this.$editor[0].style.getPropertyValue("display")},format:function(e){var t,n,i,r,o,l,a,c,s,h,u,d,p=["ul","ol","li","table","tbody","thead","tr","td","th"];for(this.block.tags.forEach((function(e){p.push(e)})),p=p.join("|").toLowerCase(),t=["p","li","td","th"],n="[^'\">]*(?:(?:\"[^\"]*\"|'[^']*')[^'\">]*)*",i=[],r=(e=(e=(e=(e=(e=(e=(e=e.replace(new RegExp("[\\s\\S]*?","g"),(function(e){return i.push(e),"@@@WCF_PRE_BACKUP_"+(i.length-1)+"@@@"}))).replace(new RegExp("\\s*\\s*","g"),(function(e,n){return(-1===t.indexOf(n)?"\n":"")+""}))).replace(new RegExp("\\s*<("+p+")("+n+")>\\s*","g"),(function(e,n,i){return"\n<"+n+i+">"+(-1===t.indexOf(n)?"\n":"")}))).replace(new RegExp("(<(?:"+p+")(?:"+n+")>\n)\n+(?=<(?:"+p+")(?:"+n+")>)","g"),"$1")).replace(/]*)>\n\t*\n(\t*)

\n$2\\s*","g"),"<$1$2>\n")).replace(/(<\/[ou]l>)<\/li>/g,"$1\n")).split(/\n/),o=0,s=new RegExp("^<("+p+")"),h=new RegExp("^$"),u=!1,l=0,a=r.length;l0){for(d=o,r[l]="";d--;)r[l]+="\t";r[l]+=c}u&&o++}for(e=r.join("\n"),l=0,a=i.length;l/g,"")).trim()}}}; })(this); +(function (window, undefined) { $.Redactor.prototype.WoltLabSource=function(){"use strict";return{init:function(){var e,t,r,i,n,o=this.$element[0].id,l=function(e){elBySelAll("woltlab-quote",e,(function(e){var t;2===e.childElementCount&&"P"===e.children[0].nodeName&&"P"===e.children[1].nodeName&&""===(t=e.children[0]).innerHTML.trim()&&"
"===e.children[1].innerHTML.trim()&&e.removeChild(t)}))},a=function(e){elBySelAll("pre, woltlab-quote, woltlab-spoiler",e,(function(e){e.removeAttribute("data-title")})),WCF.System.Event.fireEvent("com.woltlab.wcf.redactor2","source_stripIntermediateCode_"+o,{div:e})},s=this.source.hide;this.source.hide=function(){var e=$("

").html(this.source.$textarea.val());!function(e){elBySelAll(".icon, .fa",e,(function(e){var t=e.className.split(" ");t=t.filter((function(e){return"fa"!==e&&"icon"!==e&&!e.match(/^icon\d{2}$/)&&!e.match(/^fa-[a-z\-]+$/)})),e.className=t.join(" "),""===e.className.trim()&&""===e.innerHTML&&elRemove(e)}))}(e[0]),this.source.$textarea.val(e[0].innerHTML),s.call(this),setTimeout(function(){this.focus.end(),l(this.core.editor()[0])}.bind(this),100),this.placeholder.enable()}.bind(this),e=this.source.$textarea[0],this.$element[0].parentNode.insertBefore(e,this.$element[0]),t=this.source.show,this.source.show=function(){var r,i=this.$editor[0].offsetHeight,n=this.code.get();t.call(this),this.source.$textarea.val(n.replace(/ /g," ")),e.style.setProperty("height",Math.ceil(i)+"px",""),e.style.setProperty("display","block",""),(r=elCreate("div")).innerHTML=e.value,l(r),a(r),e.value=this.WoltLabSource.format(r.innerHTML),e.selectionStart=e.selectionEnd=e.value.length}.bind(this),WCF.System.Event.addListener("com.woltlab.wcf.redactor2","validate_"+o,function(e){this.WoltLabSource.isActive()&&(e.api.throwError(this.$element[0],WCF.Language.get("wcf.editor.source.error.active")),e.valid=!1)}.bind(this)),r=this.core.box()[0],(i=r.closest("form"))&&(n=r.closest("dl"),i.addEventListener("submit",function(e){var t,o="";this.WoltLabSource.isActive()&&(e.preventDefault(),o=WCF.Language.get("wcf.editor.source.error.active"),(t=i.querySelector(".formSubmit input[type=submit]"))&&(t.disabled=!1),require(["WoltLabSuite/Core/Ui/TabMenu"],(function(e){e._selectErroneousTabs()}))),elInnerError(r,o),o?n.classList.add("formError"):n.classList.remove("formError")}.bind(this)))},isActive:function(){return"none"===this.$editor[0].style.getPropertyValue("display")},format:function(e){var t,r,i,n,o,l,a,s,c,u,h,d,f=["ul","ol","li","table","tbody","thead","tr","td","th"];for(this.block.tags.forEach((function(e){f.push(e)})),f=f.join("|").toLowerCase(),t=["p","li","td","th"],r="[^'\">]*(?:(?:\"[^\"]*\"|'[^']*')[^'\">]*)*",i=[],n=(e=(e=(e=(e=(e=(e=(e=e.replace(new RegExp("[\\s\\S]*?","g"),(function(e){return i.push(e),"@@@WCF_PRE_BACKUP_"+(i.length-1)+"@@@"}))).replace(new RegExp("\\s*\\s*","g"),(function(e,r){return(-1===t.indexOf(r)?"\n":"")+""}))).replace(new RegExp("\\s*<("+f+")("+r+")>\\s*","g"),(function(e,r,i){return"\n<"+r+i+">"+(-1===t.indexOf(r)?"\n":"")}))).replace(new RegExp("(<(?:"+f+")(?:"+r+")>\n)\n+(?=<(?:"+f+")(?:"+r+")>)","g"),"$1")).replace(/]*)>\n\t*\n(\t*)

\n$2\\s*","g"),"<$1$2>\n")).replace(/(<\/[ou]l>)<\/li>/g,"$1\n")).split(/\n/),o=0,c=new RegExp("^<("+f+")"),u=new RegExp("^$"),h=!1,l=0,a=n.length;l0){for(d=o,n[l]="";d--;)n[l]+="\t";n[l]+=s}h&&o++}for(e=n.join("\n"),l=0,a=i.length;l/g,"")).trim()}}}; })(this); // plugins/WoltLabSpoiler.js (function (window, undefined) { $.Redactor.prototype.WoltLabSpoiler=function(){"use strict";return{init:function(){this.WoltLabBlock.register("woltlab-spoiler",!0),this.opts.activeButtonsStates["woltlab-spoiler"]="woltlabSpoiler",require(["WoltLabSuite/Core/Ui/Redactor/Spoiler"],function(t){new t(this)}.bind(this))}}}; })(this); diff --git a/wcfsetup/install/files/js/WCF.Combined.min.js b/wcfsetup/install/files/js/WCF.Combined.min.js index 963b4b3412..5d7c3e8a56 100755 --- a/wcfsetup/install/files/js/WCF.Combined.min.js +++ b/wcfsetup/install/files/js/WCF.Combined.min.js @@ -28,7 +28,7 @@ (function (window, undefined) { "use strict";WCF.ACL={},WCF.ACL.List=Class.extend({_categoryName:"",_container:null,_containerElements:{},_objectID:0,_objectTypeID:null,_options:{},_proxy:null,_search:null,_values:{group:{},user:{}},init:function(e,t,n,i,a,s,r){var c,l,o,h,p,d;this._objectID=i||0,this._objectTypeID=t,this._categoryName=n,void 0===a&&(a=!0),this._values={group:{},user:{}},this._aclValuesFieldName=r||"aclValues",this._proxy=new WCF.Action.Proxy({showLoadingOverlay:!1,success:$.proxy(this._success,this)}),this._container=$(e).hide().addClass("aclContainer"),c=this._container.children("dd"),l=$('