1import{a as W}from"./chunk-LDJMJM3L.js";import{c as Q,l as R}from"./chunk-KBCSINVM.js";import"./chunk-ANTXSUFV.js";import{Pa as u,ua as O}from"./chunk-ZR5OL33G.js";import{Bb as h,Bc as L,Fb as V,Gb as D,Hb as E,Ld as G,Na as c,Qb as r,Sb as g,Ta as v,Ua as C,Ub as k,Vb as N,Wb as M,Xd as $,_d as I,de as F,ib as f,jb as x,kb as y,la as l,lb as T,mb as i,nb as o,ob as _,pa as p,qa as d,re as j,ub as w,wb as b,zb as m}from"./chunk-Y6E6L56N.js";var A={headingTitle:"SVGs Library",description:"This is a list of all the SVGs that are available in the project. Click the name, import or tag to copy it to your clipboard."};var q=["dynamicComponentContainer"];function H(s,Z){if(s&1){let e=b();i(0,"tbody")(1,"tr")(2,"td",12)(3,"div",13),w(4,null,0),o()(),i(6,"td",14),m("click",function(){let t=p(e).$implicit,a=h();return d(a.copyToClipboard(t.name,"SVG name"))}),r(7),o(),i(8,"td",14),m("click",function(){let t=p(e).$implicit,a=h();return d(a.copyToClipboard(t.import,"SVG import"))}),r(9),o(),i(10,"td",14),m("click",function(){let t=p(e).$implicit,a=h();return d(a.copyToClipboard(t.tag,"SVG tag"))}),r(11),o()()()}if(s&2){let e=Z.$implicit;c(7),g(" ",e.name," "),c(2),g(" ",e.import," "),c(2),g(" ",e.tag," ")}}var B=(()=>{class s{constructor(){this._seoSrv=l(G),this._toastr=l(Q),this._clipboard=l(W),this._cd=l(L),this.headingData=A,this.svgComponents=u,this.svgComponentNames=Object.keys(u),this.svgData=[],this.searchText="",this.filteredSvgData=[],this.filteredSvgComponentNames=[...this.svgComponentNames]}ngOnInit(){this._seoSrv.updateTitle("SVG Library"),this._formatSvgs()}copyToClipboard(e,n){this._clipboard.copy(e)===!0?this._toastr.show("",`${n} copied to clipboard!`):this._toastr.show("","Oops! Something went wrong")}onSearch(){this.filteredSvgData=this.svgData.filter(e=>e.name.toLowerCase().includes(this.searchText.toLowerCase())),this.filteredSvgComponentNames=this.svgComponentNames.filter(e=>e.toLowerCase().includes(this.searchText.toLowerCase())),this._cd.detectChanges(),this._loadComponents()}_formatSvgs(){this.svgData=this.svgComponentNames.map(e=>({name:e,tag:this._createTag(e),import:`import { ${e} } from '@uc/shared/svg';`})),this.filteredSvgData=this.svgData,this._cd.detectChanges(),this._loadComponents()}_createTag(e){return`<uc${e.replace("Component","").replace(/([A-Z])/g,"-$1").toLowerCase()}></uc${e.replace("Component","").replace(/([A-Z])/g,"-$1").toLowerCase()}>`}_loadComponents(){this.container.map((e,n)=>{e.clear();let t=this.filteredSvgComponentNames[n],a=this.svgComponents[t];e.createComponent(a)})}static{this.\u0275fac=function(n){return new(n||s)}}static{this.\u0275cmp=C({type:s,selectors:[["uc-svgs"]],viewQuery:function(n,t){if(n&1&&V(q,5,v),n&2){let a;D(a=E())&&(t.container=a)}},decls:30,vars:3,consts:[["dynamicComponentContainer",""],[1,"container","py-16"],[1,"mb-16"],[3,"headingTitle","description"],[1,"relative","flex-1","mb-8","max-h-max"],["for","svg-search",1,"sr-only"],[1,"absolute","inset-y-0","flex","items-center","pointer-events-none","start-0","ps-3"],["customStyles","w-4 h-4 text-gray-500"],["type","search","id","svg-search","placeholder","Search SVGs","autocomplete","off",1,"form-input","!pl-10","w-96","rounded-lg",3,"ngModelChange","input","ngModel"],[1,"table-fixed"],[1,"px-8","py-4","text-left","border"],[1,"text-xs"],[1,"px-8","border","hover:bg-uc-blue-800"],[1,"flex","items-center","justify-center"],[1,"px-4","py-2","text-xs","border","cursor-pointer","hover:text-uc-blue-800",3,"click"]],template:function(n,t){n&1&&(i(0,"div",1)(1,"div",2),_(2,"uc-heading",3),o(),i(3,"div",4)(4,"label",5),r(5,"Search"),o(),i(6,"div",6),_(7,"uc-white-search-svg",7),o(),i(8,"input",8),M("ngModelChange",function(S){return N(t.searchText,S)||(t.searchText=S),S}),m("input",function(){return t.onSearch()}),o()(),i(9,"table",9)(10,"thead")(11,"tr")(12,"th",10),r(13," Image "),i(14,"span",11),r(15,"(hover)"),o()(),i(16,"th",10),r(17," Name "),i(18,"span",11),r(19,"(click to copy)"),o()(),i(20,"th",10),r(21," Import "),i(22,"span",11),r(23,"(click to copy)"),o()(),i(24,"th",10),r(25," Tag "),i(26,"span",11),r(27,"(click to copy)"),o()()()(),x(28,H,12,3,"tbody",null,f),o()()),n&2&&(c(2),T("headingTitle",t.headingData.headingTitle)("description",t.headingData.description),c(6),k("ngModel",t.searchText),c(20),y(t.filteredSvgData))},dependencies:[R,j,$,I,F,O],encapsulation:2})}}return s})();var se=[{path:"",component:B}];export{se as SVGS_ROUTES};
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.