PageSourceSearch

https://mistarg.cn/assets/modules/settings-sorted-list.ef6bda1c86e4bb2a5133.min.js

js mistarg.cn collected 2026-10-06 13:19:59 UTC 5,105 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunknodebb=self.webpackChunknodebb||[]).push([[22067,43602,66173],{65303(v,w,i){i.r(w),i.d(w,{alert:()=>p,confirm:()=>B,dialog:()=>o,prompt:()=>A,promptPassword:()=>O});var r=i(33530),b=i.n(r),c=i(17459),M=i.n(c);r.setDefaults({locale:config.userLang}),c.translateKeys(["modules:bootbox.ok","modules:bootbox.cancel","modules:bootbox.confirm"]).then(t=>{r.addLocale(config.userLang,{OK:t[0],CANCEL:t[1],CONFIRM:t[2]}),r.setLocale(config.userLang)});async function o(t){const[e,a,s]=await Promise.all([c.translate(t.title||""),y(t)||"",E(t.buttons)]);return r.dialog({...t,title:e,message:a,buttons:s})}async function p(t,e){const[a,s]=await Promise.all([t&&t.title?c.translate(t.title):null,y(t)]);return e=typeof e=="function"?e:t.callback,r.alert({...t,title:a,message:s,callback:e})}async function B(t,e){const[a,s]=await Promise.all([t&&t.title?c.translate(t.title):null,y(t)]);return e=typeof e=="function"?e:t.callback,r.confirm({...t,title:a,message:s,callback:e})}async function A(t,e){const[a,s]=await Promise.all([c.translate(typeof t=="string"?t:t.title),t&&t.message?y(t):null]);return e=typeof e=="function"?e:t.callback,r.prompt({...t,title:a,message:s,callback:e})}async function O(t){return typeof t=="string"&&(t={title:t}),t=t||{title:"[[user:current-password]]",message:"[[user:emailUpdate.password-challenge]]"},await new Promise(e=>{A({...t,inputType:"password",required:!0,value:"",callback:e})})}function y(t){const e=t&&t.message?t.message:t;return e instanceof jQuery?e:c.translate(e||"")}async function E(t){if(!Object.keys(t||{}).length)return;const e=Object.values(t);return await Promise.all(e.map(async a=>({...a,label:await c.translateKey(a.label)})))}},59175(v,w,i){var r,b;r=[i(81335),i(65303),i(91749),i(65285)],b=(function(c,M,o){let p;const B={types:["sorted-list"],use:function(){p=this},set:function(t,e){const a=t.attr("data-sorted-list");e[a]=[],t.find('[data-type="item"]').each(function(s,d){const n=$(d).attr("data-sorted-list-uuid"),f=p.helper.serializeForm($('[data-sorted-list-object="'+a+'"][data-sorted-list-uuid="'+n+'"]'));E(f),e[a].push(f)})},get:async(t,e)=>{const{listEl:a,key:s,formTpl:d,formValues:n}=await o.fire("filter:settings.sorted-list.load",{listEl:t.find('[data-type="list"]'),key:t.attr("data-sorted-list"),formTpl:t.attr("data-form-template"),formValues:{}}),f=await c.render(d,n);$('[data-sorted-list="'+s+'"] [data-type="add"]').on("click",async function(){const g=await M.confirm(f,function(m){m&&B.addItem(g.find("form").children(),t)});o.fire("action:settings.sorted-list.modal",{modal:g})});const L=t.parents("form").attr("data-socket-get"),u=ajaxify.data[L?e:"settings"][s];if(Array.isArray(u)&&typeof u[0]!="string"){const g=await Promise.all(u.map(async m=>{({item:m}=await o.fire("filter:settings.sorted-list.loadItem",{item:m}));const T=utils.generateUUID(),P=$(f).deserialize(m);return P.attr("data-sorted-list-uuid",T),P.attr("data-sorted-list-object",s),$("#content").append(P.hide()),{itemUUID:T,item:m}}));for(const{itemUUID:m,item:T}of g){const P=await y(t,m,T);o.fire("action:settings.sorted-list.itemLoaded",{element:P})}o.fire("action:settings.sorted-list.loaded",{containerEl:t.get(0),listEl:a.get(0),hash:e,key:s})}a.sortable().addClass("pointer")},addItem:async(t,e)=>{const a=e.attr("data-sorted-list"),s=utils.generateUUID(),d=$('<form class="" data-sorted-list-uuid="'+s+'" data-sorted-list-object="'+a+'"></form>');d.append(t),$("#content").append(d.hide());let n=p.helper.serializeForm(d);({item:n}=await o.fire("filter:settings.sorted-list.loadItem",{item:n})),y(e,s,n)}};function A(t,e){t.find('[data-sorted-list-uuid="'+e+'"] [data-type="remove"]').on("click",function(){$('[data-sorted-list-uuid="'+e+'"]').remove()})}function O(t,e){const a=t.find('[data-type="list"]'),s=t.attr("data-sorted-list");$('[data-sorted-list-uuid="'+e+'"] [data-type="edit"]').on("click",async function(){const n=$('[data-sorted-list-uuid="'+e+'"][data-sorted-list-object="'+s+'"]'),f=n.clone(!0).show();f.find("select").each((L,u)=>{u.value=n.find(`select#${u.id}`).val()});const l=await M.confirm(f,async L=>{if(L){const u=$('<form class="" data-sorted-list-uuid="'+e+'" data-sorted-list-object="'+s+'"></form>');u.append(l.find("form").children()),$("#content").find('[data-sorted-list-uuid="'+e+'"][data-sorted-list-object="'+s+'"]').remove(),$("#content").append(u.hide());let g=p.helper.serializeForm(u);({item:g}=await o.fire("filter:settings.sorted-list.loadItem",{item:g})),E(g);const m=a.find('[data-sorted-list-uuid="'+e+'"]');y(t,e,g,m)}});o.fire("action:settings.sorted-list.modal",{modal:l})})}function y(t,e,a,s){const d=t.find('[data-type="list"]'),n=t.attr("data-item-template");return E(a),new Promise(f=>{app.parseAndTranslate(n,a,function(l){l=$(l),s?s.replaceWith(l):d.append(l),l.attr("data-sorted-list-uuid",e),A(t,e),O(t,e),o.fire("action:settings.sorted-list.parse",{itemHtml:l}),f(l.get(0))})})}function E(t){return Object.entries(t||{}
1).forEach(([e,a])=>{t[e]=typeof a=="string"?utils.stripHTMLTags(a,utils.stripTags):a})}return B}).apply(w,r),b!==void 0&&(v.exports=b)}}]);

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.