PageSourceSearch

https://utaitedb.net/assets/TagIndex-DuSgmuyd.js

js utaitedb.net collected 2026-09-24 18:56:12 UTC 3,259 bytes, 1 lines download raw bytes

1var C=Object.defineProperty;var x=(a,e,t)=>e in a?C(a,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):a[e]=t;var g=(a,e,t)=>x(a,typeof e!="symbol"?e+"":e,t);import{m as _,l as V,cl as M,i as d,o as b,f as B,R as f,bf as T,j as r,am as L,F as y,s as S,ae as R,b_ as I,a as p,ao as O,E as w,C as P}from"./index-gMe9H88Y.js";import{A as j,L as A}from"./Layout-DlAsL32I.js";import{J as D}from"./JQueryUIButton-_V0TZG2a.js";import{J as E}from"./JQueryUIDialog-BAFRlDw4.js";import{l as F}from"./index-DFeX-SaI.js";import"./useWillUnmount-DtH49aY0.js";(function(){try{var a=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};a.__faroBundleId_vocadb_frontend="1774128384054d7495f5124"}catch{}})();var Q=Object.defineProperty,U=Object.getOwnPropertyDescriptor,h=(a,e,t,l)=>{for(var i=l>1?void 0:l?U(e,t):e,c=a.length-1,u;c>=0;c--)(u=a[c])&&(i=(l?u(e,t,i):u(i))||i);return l&&i&&Q(e,t,i),i};class m{constructor(e){g(this,"dialogVisible",!1);g(this,"duplicateName",!1);g(this,"newTagName","");g(this,"createTag",async()=>{const e=await this.tagRepo.create({name:this.newTagName});return d(()=>{this.newTagName="",this.dialogVisible=!1}),e});this.tagRepo=e,_(this),V(()=>this.newTagName,t=>{if(!t){this.duplicateName=!1;return}e.getList({queryParams:{start:0,maxResults:1,getTotalCount:!1,query:t,nameMatchMode:M.Exact,allowAliases:!0}}).then(l=>{d(()=>{this.duplicateName=l.items.length>0})})})}get isValid(){return!!this.newTagName&&!this.duplicateName}}h([b],m.prototype,"dialogVisible",2);h([b],m.prototype,"duplicateName",2);h([b],m.prototype,"newTagName",2);h([B],m.prototype,"isValid",1);const o=new m(T),k=(a,e)=>Math.min(Math.max(a*80/e,60),100),J=L(({model:a})=>{const e=S(),{t,ready:l}=R(["ViewRes"]),i=t("ViewRes:Shared.Tags"),c=a.sumBy(s=>s.tags.length),u=a.sumBy(s=>s.tags.sumBy(n=>n.usageCount))/c,v=I();return p(A,{pageTitle:i,ready:l,title:i,toolbar:r(y,{children:e.canManageDatabase&&r(D,{as:P,href:"#",onClick:()=>d(()=>{o.dialogVisible=!0}),children:"Create new"})}),children:[a.map(s=>p("div",{className:"tag-cloud",children:[r("h3",{children:s.name||t("ViewRes:Shared.Unsorted")}),s.tags.map((n,N)=>p(f.Fragment,{children:[N>0&&" ",r("span",{className:"tag",style:{fontSize:`${k(n.usageCount,u)}%`},children:r(O,{to:w.details_tag_contract(n),title:n.additionalNames,style:{fontSize:"",background:n.name==="LGBTQ+"?"linear-gradient(90deg, red, orange, yellow, green, blue, indigo, violet)":void 0,WebkitBackgroundClip:n.name==="LGBTQ+"?"text":void 0,WebkitTextFillColor:n.name==="LGBTQ+"?"transparent":void 0},children:n.name})},n.id)]},n.id))]},s.name)),p(E,{title:"Create tag",autoOpen:o.dialogVisible,close:()=>d(()=>{o.dialogVisible=!1}),width:310,modal:!0,buttons:[{text:"Create",click:()=>{o.createTag().then(s=>{v(w.details_tag_contract(s))})},disabled:!o.isValid},{text:t("ViewRes:Shared.Cancel"),click:()=>d(()=>{o.dialogVisible=!1})}],children:[r(F.DebounceInput,{type:"text",value:o.newTagName,onChange:s=>d(()=>{o.newTagName=s.target.value}),maxLength:200,debounceTimeout:100}),o.duplicateName&&r(j,{variant:"danger",children:"Tag name must be unique"})]})]})}),X=()=>{const[a,e]=f.useState();return f.useEffect(()=>{T.getTagsByCategories().then(t=>e(t))},[]),a?r(J,{model:a}):r(y,{})};export{X as default};

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.