(()=>{"use strict";var e,s={69129:(e,s,i)=>{var n=i(74692),a=i.n(n);window.addEventListener("DOMContentLoaded",(()=>{a()("#loglevel").change((function(){a().post(OC.generateUrl("/settings/admin/log/level"),{level:a()(this).val()},(()=>{OC.Log.reload()}))})),a()("#mail_smtpauth").change((function(){this.checked?a()("#mail_credentials").removeClass("hidden"):a()("#mail_credentials").addClass("hidden")})),a()("#mail_smtpmode").change((function(){"smtp"!==a()(this).val()?(a()("#setting_smtpauth").addClass("hidden"),a()("#setting_smtphost").addClass("hidden"),a()("#mail_smtpsecure_label").addClass("hidden"),a()("#mail_smtpsecure").addClass("hidden"),a()("#mail_credentials").addClass("hidden"),a()("#mail_sendmailmode_label, #mail_sendmailmode").removeClass("hidden")):(a()("#setting_smtpauth").removeClass("hidden"),a()("#setting_smtphost").removeClass("hidden"),a()("#mail_smtpsecure_label").removeClass("hidden"),a()("#mail_smtpsecure").removeClass("hidden"),a()("#mail_smtpauth").is(":checked")&&a()("#mail_credentials").removeClass("hidden"),a()("#mail_sendmailmode_label, #mail_sendmailmode").addClass("hidden"))}));const e=function(){OC.PasswordConfirmation.requiresPasswordConfirmation()?OC.PasswordConfirmation.requirePasswordConfirmation(e):(OC.msg.startSaving("#mail_settings_msg"),a().ajax({url:OC.generateUrl("/settings/admin/mailsettings"),type:"POST",data:a()("#mail_general_settings_form").serialize(),success:()=>{OC.msg.finishedSuccess("#mail_settings_msg",t("settings","Saved"))},error:e=>{OC.msg.finishedError("#mail_settings_msg",e.responseJSON)}}))},s=function(){OC.PasswordConfirmation.requiresPasswordConfirmation()?OC.PasswordConfirmation.requirePasswordConfirmation(s):(OC.msg.startSaving("#mail_settings_msg"),a().ajax({url:OC.generateUrl("/settings/admin/mailsettings/credentials"),type:"POST",data:a()("#mail_credentials_settings").serialize(),success:()=>{OC.msg.finishedSuccess("#mail_settings_msg",t("settings","Saved"))},error:e=>{OC.msg.finishedError("#mail_settings_msg",e.responseJSON)}}))};a()("#mail_general_settings_form").change(e),a()("#mail_credentials_settings_submit").click(s),a()("#mail_smtppassword").click((()=>{"text"===(void 0).type&&"********"===(void 0).value&&((void 0).type="password",(void 0).value="")})),a()("#sendtestemail").click((e=>{e.preventDefault(),OC.msg.startAction("#sendtestmail_msg",t("settings","Sending…")),a().ajax({url:OC.generateUrl("/settings/admin/mailtest"),type:"POST",success:()=>{OC.msg.finishedSuccess("#sendtestmail_msg",t("settings","Email sent"))},error:e=>{OC.msg.finishedError("#sendtestmail_msg",e.responseJSON)}})})),null!==document.getElementById("security-warning")&&a().when(OC.SetupChecks.checkSetup()).then((e=>{const s=a()("#postsetupchecks");a()("#security-warning-state-loading").addClass("hidden");let i=!1;const t=s.find(".errors"),n=s.find(".warnings"),r=s.find(".info");for(let s=0;s"+e[s].msg+"");break;case OC.SetupChecks.MESSAGE_TYPE_WARNING:n.append("
  • "+e[s].msg+"
  • ");break;case OC.SetupChecks.MESSAGE_TYPE_ERROR:default:t.append("
  • "+e[s].msg+"
  • ")}t.find("li").length>0&&(t.removeClass("hidden"),i=!0),n.find("li").length>0&&(n.removeClass("hidden"),i=!0),r.find("li").length>0&&(r.removeClass("hidden"),i=!0),i?(a()("#postsetupchecks-hint").removeClass("hidden"),t.find("li").length>0?a()("#security-warning-state-failure").removeClass("hidden"):a()("#security-warning-state-warning").removeClass("hidden")):0===a()("#security-warning").children("ul").children().length?a()("#security-warning-state-ok").removeClass("hidden"):a()("#security-warning-state-failure").removeClass("hidden")}))}))}},i={};function n(e){var t=i[e];if(void 0!==t)return t.exports;var a=i[e]={id:e,loaded:!1,exports:{}};return s[e].call(a.exports,a,a.exports,n),a.loaded=!0,a.exports}n.m=s,e=[],n.O=(s,i,t,a)=>{if(!i){var r=1/0;for(m=0;m=a)&&Object.keys(n.O).every((e=>n.O[e](i[d])))?i.splice(d--,1):(l=!1,a0&&e[m-1][2]>a;m--)e[m]=e[m-1];e[m]=[i,t,a]},n.n=e=>{var s=e&&e.__esModule?()=>e.default:()=>e;return n.d(s,{a:s}),s},n.d=(e,s)=>{for(var i in s)n.o(s,i)&&!n.o(e,i)&&Object.defineProperty(e,i,{enumerable:!0,get:s[i]})},n.e=()=>Promise.resolve(),n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),n.o=(e,s)=>Object.prototype.hasOwnProperty.call(e,s),n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.nmd=e=>(e.paths=[],e.children||(e.children=[]),e),n.j=6010,(()=>{n.b=document.baseURI||self.location.href;var e={6010:0};n.O.j=s=>0===e[s];var s=(s,i)=>{var t,a,r=i[0],l=i[1],d=i[2],o=0;if(r.some((s=>0!==e[s]))){for(t in l)n.o(l,t)&&(n.m[t]=l[t]);if(d)var m=d(n)}for(s&&s(i);on(69129)));a=n.O(a)})(); //# sourceMappingURL=settings-legacy-admin.js.map?v=2329421ea5c0e635ce6d