1"use strict";(self.webpackChunknodebb=self.webpackChunknodebb||[]).push([[1852,34405],{43930:(E,A,c)=>{var m,l;m=[c(67910),c(29930),c(49897),c(91749),c(34405)],l=function(w,f,y,h,x){const u={};return u.init=function(){w.init();const r=$('[component="tags/watch"]');r.tagsinput({tagClass:"badge text-bg-info",confirmKeys:[13,44],trimValue:!0});const d=r.siblings(".bootstrap-tagsinput").find("input");d.translateAttr("aria-label","[[aria:user-watched-tags]]"),x.tag(d),ajaxify.data.tags.forEach(function(o){r.tagsinput("add",o)}),r.on("itemAdded",function(o){d.length&&d.autocomplete("close"),y.put(`/tags/${o.item}/follow`,{}).then(()=>{f.alert({alert_id:"follow_tag",message:"[[tags:following-tag.message]]",type:"success",timeout:5e3}),h.fire("action:tags.changeWatching",{tag:ajaxify.data.tag,type:"follow"})}).catch(t=>f.error(t))}),r.on("itemRemoved",function(o){y.del(`/tags/${o.item}/follow`,{}).then(()=>{f.alert({alert_id:"follow_tag",message:"[[tags:not-following-tag.message]]",type:"info",timeout:5e3}),h.fire("action:tags.changeWatching",{tag:ajaxify.data.tag,type:"unfollow"})}).catch(t=>f.error(t))})},u}.apply(A,m),l!==void 0&&(E.exports=l)},34405:(E,A,c)=>{var m,l;m=[c(49897),c(29930),c(36e3),c(9787),c(35786)],l=function(w,f,{Textcomplete:y},{TextareaEditor:h},{ContenteditableEditor:x}){const u={},r={delay:200,appendTo:null};u.init=o=>{const t={...r,...o},{input:i,onSelect:e}=t;app.loadJQueryUI(function(){i.autocomplete({...t,open:function(){$(this).autocomplete("widget").css("z-index",100005)},select:function(n,a){d(i,e,n,a)}})})},u.user=function(o,t,i){typeof t=="function"&&(i=t,t={}),t=t||{},u.init({input:o,onSelect:i,source:(e,n)=>{t.query=e.term,w.get("/api/users",t,function(a,p){if(a)return f.error(a);if(p&&p.users){const g=p.users.map(function(s){const b=$("<div></div>").html(s.username).text();return s&&{label:b,value:b,user:{uid:s.uid,name:s.username,slug:s.userslug,username:s.username,userslug:s.userslug,picture:s.picture,banned:s.banned,"icon:text":s["icon:text"],"icon:bgColor":s["icon:bgColor"]}}});n(g)}$(".ui-autocomplete a").attr("data-ajaxify","false")})}})},u.group=function(o,t){u.init({input:o,onSelect:t,source:(i,e)=>{socket.emit("groups.search",{query:i.term},function(n,a){if(n)return f.error(n);if(a&&a.length){const p=a.map(function(g){return g&&{label:g.name,value:g.name,group:g}});e(p)}$(".ui-autocomplete a").attr("data-ajaxify","false")})}})},u.tag=function(o,t){u.init({input:o,onSelect:t,delay:100,source:(i,e)=>{socket.emit("topics.autocompleteTags",{query:i.term,cid:ajaxify.data.cid||0},function(n,a){if(n)return f.error(n);a&&e(a),$(".ui-autocomplete a").attr("data-ajaxify","false")})}})};function d(o,t,i,e){t=t||function(){};const n=jQuery.Event("keypress");n.which=13,n.keyCode=13,setTimeout(function(){o.trigger(n)},100),t(i,e)}return u.setup=function({element:o,strategies:t,options:i}){const e=o.get(0);if(e){var n;if(e.nodeName==="TEXTAREA"||e.nodeName==="INPUT"?n=new h(e):e.nodeName==="DIV"&&e.getAttribute("contenteditable")==="true"&&(n=new x(e)),!n)throw new Error("unknown target element type");e.setAttribute("dir",document.querySelector("html").getAttribute("data-dir"));var a=new y(n,t,{dropdown:i});return a.on("rendered",function(){a.dropdown.items.length&&a.dropdown.items[0].activate()}),a}},u}.apply(A,m),l!==void 0&&(E.exports=l)}}]);
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.