1(self.webpackChunknodebb=self.webpackChunknodebb||[]).push([[33701,25655],{14490:(A,v,l)=>{A.exports=l(3343)},18340:(A,v,l)=>{"use strict";var R,p;R=[l(85233),l(7927)],p=function(S,k){let f,m=[],h=0,a;function u(n,t){typeof n!="string"&&(n=$(n),n=n.data("type")||n.attr("type")||n.prop("tagName"));const i=f.plugins[n.toLowerCase()];if(i==null)return;const e=i[t];return typeof e=="function"?e:null}return a={deepClone:function(n){return typeof n=="object"?JSON.parse(JSON.stringify(n)):n},createElement:function(n,t,i){const e=document.createElement(n);for(const s in t)t.hasOwnProperty(s)&&e.setAttribute(s,t[s]);return i&&e.appendChild(document.createTextNode(i)),e},initElement:function(n){const t=u(n,"init");t?.call(f,$(n))},destructElement:function(n){const t=u(n,"destruct");t?.call(f,$(n))},createElementOfType:function(n,t,i){let e;const s=u(n,"create");return s!=null?e=$(s.call(f,n,t,i)):(i==null&&(i={}),n!=null&&(i.type=n),e=$(a.createElement(t||"input",i))),e.data("type",n),a.initElement(e),e},cleanArray:function(n,t,i){const e=[];if(!t&&i)return n;for(let s=0;s<n.length;s+=1){let o=n[s];t&&(o===!!o?o=+o:o&&typeof o.trim=="function"&&(o=o.trim())),(i||o!=null&&o.length)&&e.push(o)}return e},isTrue:function(n){return n==="true"||+n==1},isFalse:function(n){return n==="false"||+n==0},readValue:function(n){let t=!a.isFalse(n.data("empty"));const i=!a.isFalse(n.data("trim")),e=n.data("split"),s=u(n,"get");let o;if(s!=null)return s.call(f,n,i,t);if(e!=null){t=a.isTrue(n.data("empty")),o=n.val();const d=o!=null&&o.split(e||",")||[];return a.cleanArray(d,i,t)}if(o=n.val(),i&&o!=null&&typeof o.trim=="function"&&(o=o.trim()),t||o!==void 0&&(o==null||o.length!==0))return o},fillField:function(n,t){const i=u(n,"set");let e=n.data("trim");if(e=e!=="false"&&+e!=0,i!=null)return i.call(f,n,t,e);t instanceof Array&&(t=t.join(n.data("split")||(e?", ":","))),e&&t&&typeof t.trim=="function"?(t=t.trim(),typeof t.toString=="function"&&(t=t.toString())):t!=null?(typeof t.toString=="function"&&(t=t.toString()),e&&(t=t.trim())):t="",t!==void 0&&n.val(t)},initFields:function(n){$("[data-key]",n).each(function(t,i){i=$(i);const e=u(i,"init"),s=i.data("key").split(".");let o=f.get();e?.call(f,i);for(let d=0;d<s.length;d+=1){const r=s[d];r&&o!=null&&(o=o[r])}a.fillField(i,o)})},registerReadyJobs:function(n){return h+=n,h},beforeReadyJobsDecreased:function(n){if(n==null&&(n=1),h>0&&(h-=n,h<=0)){for(let t=0;t<m.length;t+=1)m[t]();m=[]}},whenReady:function(n){h<=0?n():m.push(n)},serializeForm:function(n){const t=n.serializeObject();return n.find('input[type="checkbox"]').each(function(i,e){e=$(e),e.is(":checked")||(t[e.attr("name")]="off")}),n.find("select[multiple]").each(function(i,e){e=$(e),t[e.attr("name")]=JSON.stringify(e.val())}),t},persistSettings:function(n,t,i,e){t!=null&&t._!=null&&typeof t._!="string"&&(t=a.deepClone(t),t._=JSON.stringify(t._)),socket.emit("admin.settings.set",{hash:n,values:t},function(s){i&&(s?k.alert({title:"[[admin/admin:changes-not-saved]]",type:"danger",message:`[[admin/admin/changes-not-saved-message, ${s.message}]]`,timeout:5e3}):k.alert({title:"[[admin/admin:changes-saved]]",type:"success",message:"[[admin/admin:changes-saved-message]]",timeout:2500})),typeof e=="function"&&e(s)})},use:function(n){try{n._=JSON.parse(n._)}catch{}f.cfg=n}},f={helper:a,plugins:{},cfg:{},get:function(){return f.cfg!=null&&f.cfg._!==void 0?f.cfg._:f.cfg},registerPlugin:function(n,t){t==null?t=n.types:n.types=t,typeof n.use=="function"&&n.use.call(f);for(let i=0;i<t.length;i+=1){const e=t[i].toLowerCase();f.plugins[e]==null&&(f.plugins[e]=n)}},set:function(n,t,i,e,s){s==null&&(s=!0),a.whenReady(function(){a.use(t),a.initFields(i||"form"),a.persistSettings(n,t,s,e)})},sync:function(n,t,i){socket.emit("admin.settings.get",{hash:n},function(e,s){e?typeof i=="function"&&i(e):a.whenReady(function(){a.use(s),a.initFields(t||"form"),typeof i=="function"&&i()})})},persist:function(n,t,i,e){const s=[],o=$("[data-key]",t||"form").toArray();e==null&&(e=!0);for(let d=0;d<o.length;d+=1){const r=$(o[d]),g=a.readValue(r);let c=f.get();const y=r.data("key").split("."),P=y[y.length-1];if(y.length>1)for(let x=0;x<y.length-1;x+=1){const C=y[x];C&&c!=null&&(c=c[C])}c!=null?g!=null?c[P]=g:delete c[P]:s.push(r.data("key"))}s.length&&k.alert({title:"Attributes Not Saved",message:"'"+s.join(", ")+"' could not be saved. Please contact the plugin-author!",type:"danger",timeout:5e3}),a.persistSettings(n,f.cfg,e,i)},load:function(n,t,i){i=i||function(){};const e=t.attr("data-socket-get");socket.emit(e||"admin.settings.get",{hash:n},function(s,o){if(s)return i(s);$(t).find("select[multiple]").each(function(r,g){const c=$(g).attr("name");
1if(c&&o.hasOwnProperty(c))try{o[c]=JSON.parse(o[c])}catch{}}),ajaxify.data[e?n:"settings"]=o,a.whenReady(function(){$(t).find("[data-sorted-list]").each(function(r,g){u(g,"get").call(f,$(g),n)})}),$(t).deserialize(o),S.fire("action:admin.settingsLoaded"),$(t).on("change","input, select, textarea",function(){app.flags=app.flags||{},app.flags._unsaved=!0});const d=document.getElementById("save");d&&l.e(42441).then(function(){var r=[l(42441)];(function(g){g.bind("ctrl+s",function(c){d.click(),c.preventDefault()})}).apply(null,r)}).catch(l.oe),i(null,o)})},save:function(n,t,i){t=$(t);const e=t.get(0).elements;if(f.check(e)&&t.length){const o=a.serializeForm(t);a.whenReady(function(){const r=t.find("[data-sorted-list]");r.length&&r.each((g,c)=>{u(c,"set").call(f,$(c),o)})});const d=t.attr("data-socket-set");socket.emit(d||"admin.settings.set",{hash:n,values:o},function(r){if(app.flags._unsaved=!1,ajaxify.data[d?n:"settings"]=o,typeof i=="function")i(r);else if(r)k.alert({title:"[[admin/admin:changes-not-saved]]",message:`[[admin/admin:changes-not-saved-message, ${r.message}]]`,type:"error",timeout:2500});else{const g=document.getElementById("save");g.classList.toggle("saved",!0),setTimeout(()=>{g.classList.toggle("saved",!1)},1500)}})}},check:function(n){const t=i=>{const e=i.target.closest(".form-group");e&&e.classList.add("has-error"),i.target.removeEventListener("invalid",t)};return Array.prototype.map.call(n,i=>{const e=i.closest(".form-group");return e&&e.classList.remove("has-error"),i.addEventListener("invalid",t),i.reportValidity()}).every(Boolean)}},a.registerReadyJobs(1),Promise.all([l.e(66177),l.e(62526),l.e(26069)]).then(function(){var n=[l(16631),l(73143),l(7448),l(15101),l(846),l(88839),l(53411),l(66370)];(function(){for(let t=0;t<arguments.length;t+=1)f.registerPlugin(arguments[t]);a.beforeReadyJobsDecreased()}).apply(null,n)}).catch(l.oe),f}.apply(v,R),p!==void 0&&(A.exports=p)},3343:(A,v,l)=>{"use strict";var R,p;R=[l(18340),l(7927)],p=function(S,k){var f={};return f.init=function(){S.load("markdown",$(".markdown-settings"),function(m,h){m&&(h={});var a={html:!1,langPrefix:"language-",highlight:!0,highlightTheme:"default.css",probe:!0,probeCacheSize:256,xhtmlOut:!0,breaks:!0,linkify:!0,typographer:!1,externalBlank:!1,nofollow:!0,allowRTLO:!1,checkboxes:!0,multimdTables:!0};for(var u in a)h.hasOwnProperty(u)||(typeof a[u]=="boolean"?$("#"+u).prop("checked",a[u]):$("#"+u).val(a[u]))}),$("#save").on("click",function(){S.save("markdown",$(".markdown-settings"))})},f}.apply(v,R),p!==void 0&&(A.exports=p)}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.