PageSourceSearch

https://softcollie.ai/chunk-SWH5CKOF.js

js softcollie.ai collected 2026-10-05 15:02:53 UTC 6,579 bytes, 1 lines download raw bytes

1import{a as Z,b as ee}from"./chunk-YU36PPIJ.js";import{E as J,F as X}from"./chunk-VLJ55T5Q.js";import{d as K}from"./chunk-V2PPMFND.js";import{Aa as f,C as g,Cb as P,Eb as G,Ha as x,Hc as H,Kc as U,O as _,Pb as q,Tc as C,U as L,X as v,Y as D,_ as b,aa as N,ba as o,ca as T,cc as F,da as V,dc as W,gb as E,kb as j,kd as Y,l as a,m as R,md as Q,oa as $,pb as I,q as M,qb as z,ta as O}from"./chunk-5SAOKRHL.js";import{g as k}from"./chunk-NZN5XTIE.js";var p=class{},ne=(()=>{class s extends p{constructor(e){super(),this.http=e}getSvg(e){return this.http.get(e,{responseType:"text"})}static{this.\u0275fac=function(t){return new(t||s)(N(K))}}static{this.\u0275prov=v({token:s,factory:s.\u0275fac})}}return s})(),oe=new b("SERVER_URL"),m=(()=>{class s{constructor(){this.loader=o(p),this.serverUrl=o(oe,{optional:!0}),this.document=o(C),this.iconsByUrl=new Map,this.iconsLoadingByUrl=new Map}addSvg(e,t){if(!this.iconsByUrl.has(e)){let i=this.document.createElement("DIV");i.innerHTML=t;let r=i.querySelector("svg");this.iconsByUrl.set(e,r)}}loadSvg(e,t=e){if(this.serverUrl&&e.match(/^(http(s)?):/)===null&&(e=this.serverUrl+e,t=e),this.iconsByUrl.has(t))return a(this.iconsByUrl.get(t));if(this.iconsLoadingByUrl.has(t))return this.iconsLoadingByUrl.get(t);let i=this.loader.getSvg(e).pipe(M(r=>{let n=this.document.createElement("DIV");return n.innerHTML=r,n.querySelector("svg")}),L(r=>{this.iconsByUrl.set(t,r),this.iconsLoadingByUrl.delete(t)}),g(r=>(console.error(r),R(r))),_());return this.iconsLoadingByUrl.set(t,i),i}getSvgByName(e){return this.iconsByUrl.has(e)?a(this.iconsByUrl.get(e)):this.iconsLoadingByUrl.has(e)?this.iconsLoadingByUrl.get(e):R(`No svg with name '${e}' has been loaded`)}unloadSvg(e){this.iconsByUrl.has(e)&&this.iconsByUrl.delete(e)}static{this.\u0275fac=function(t){return new(t||s)}}static{this.\u0275prov=v({token:s,factory:s.\u0275fac})}}return s})();function le(s){return s||new m}var ce={provide:m,deps:[[new T,new V,m]],useFactory:le};var Ue=(()=>{class s{static forRoot(e={}){return{ngModule:s,providers:[ce,e.loader||{provide:p,useClass:ne}]}}static{this.\u0275fac=function(t){return new(t||s)}}static{this.\u0275mod=z({type:s})}static{this.\u0275inj=D({})}}return s})();var se=(()=>{class s{constructor(){this.platformId=o(x),this.document=o(C)}isBrowser(){return Q(this.platformId)}copyToClipboard(e){return k(this,null,function*(){if(!this.isBrowser())return;yield this.window?.navigator?.clipboard?.writeText?.(e).catch(console.error)})}get window(){return this.isBrowser()?this.document.defaultView:null}static{this.\u0275fac=function(t){return new(t||s)}}static{this.\u0275prov=v({token:s,factory:s.\u0275fac,providedIn:"root"})}}return s})();var he=["svgRoot"],ae=new b("SPRITES_SVG_URL",{factory:()=>"/assets/icons"}),Pe=(()=>{class s{constructor(){this.name=f.required(),this.size=f.required(),this.cover=f(!1,{transform:H}),this.color=f(),this.twColorClass=f(),this.svgRoot=j("svgRoot"),this.spriteSvgUrl=o(ae),this.iconReg=o(m),this.browserUtilsService=o(se),this.spritesSvg=ee((this.browserUtilsService.isBrowser()?this.iconReg.loadSvg(`${this.spriteSvgUrl}/sprite.svg`,"IconSprites")?.pipe(g(()=>a(void 0))):a(void 0))??a(void 0)),this.renderer=o(E),this.destroyRef=o(O),U(()=>{if(!this.browserUtilsService.isBrowser())return;let e=this.spritesSvg(),t=this.name();if(t?.startsWith("ic_")){let i=t.match(/^ic_fluent_(.+)_(\d+)_(filled|regular)$/);if(i){let[,r,,n]=i,u=`ic_fluent_${r}_${n}.svg`,S=`${this.spriteSvgUrl}/src/fluent/${u}`;this.iconReg.loadSvg(S)?.pipe(g(()=>a(void 0)),Z(this.destroyRef)).subscribe(h=>{h?this.renderSvgElement(h):e&&this.renderSymbol(e,t)});return}}e&&t&&this.renderSymbol(e,t)})}get iconUrl(){return`${this.spriteSvgUrl}/sprite.svg#${this.name()}`}get iconSize(){let e=this.size();return typeof e=="number"||/^\d+$/.test(String(e))?`${e}px`:String(e)}get cssColor(){let e=this.color();return e?e.startsWith("#")||e.startsWith("rgb")||e.startsWith("hsl")||e.startsWith("var(")?e:`var(--${e})`:null}
1renderSvgElement(e){if(!this.browserUtilsService.isBrowser())return;let t=this.svgRoot()?.nativeElement;if(!t)return;for(;t.firstChild;)t.removeChild(t.firstChild);let i=e.getAttribute("viewBox");i&&this.renderer.setAttribute(t,"viewBox",i),this.cover()&&this.renderer.setAttribute(t,"preserveAspectRatio","xMidYMid slice");let r=`_${Math.random().toString(36).substr(2,9)}`,n=e.cloneNode(!0);(h=>{let ie=h.querySelectorAll("[id]"),w=new Map;ie.forEach(d=>{let c=d.getAttribute("id");if(c){let l=`${c}${r}`;d.setAttribute("id",l),w.set(c,l)}}),h.querySelectorAll("*").forEach(d=>{["fill","stroke","clip-path","mask","filter"].forEach(c=>{let l=d.getAttribute(c);if(l&&l.includes("url(#")){let A=l.replace(/url\(#([^)]+)\)/g,(y,re)=>{let B=w.get(re);return B?`url(#${B})`:y});d.setAttribute(c,A)}}),["href","xlink:href"].forEach(c=>{let l=d.getAttribute(c);if(l&&l.startsWith("#")){let A=l.substring(1),y=w.get(A);y&&d.setAttribute(c,`#${y}`)}})})})(n);let S=n.querySelector("defs");S&&this.renderer.appendChild(t,S),Array.from(n.childNodes).forEach(h=>{h.nodeName.toLowerCase()!=="defs"&&this.renderer.appendChild(t,h)}),this.ensureCurrentColor(t)}renderSymbol(e,t){if(!this.browserUtilsService.isBrowser())return;let i=`symbol#${globalThis.CSS?.escape?.(t)??t}`,r=e.querySelector(i);if(!r){let n=this.svgRoot()?.nativeElement;if(n){for(;n.firstChild;)n.removeChild(n.firstChild);let u=this.renderer.createElement("use","svg");this.renderer.setAttribute(u,"href",this.iconUrl),this.renderer.appendChild(n,u)}return}this.renderSvgElement(r)}ensureCurrentColor(e){e.querySelectorAll("path").forEach(i=>{!i.hasAttribute("fill")&&!i.hasAttribute("stroke")&&i.setAttribute("fill","currentColor")})}static{this.\u0275fac=function(t){return new(t||s)}}static{this.\u0275cmp=I({type:s,selectors:[["sc-icon"]],viewQuery:function(t,i){t&1&&F(i.svgRoot,he,5),t&2&&W()},inputs:{name:[1,"name"],size:[1,"size"],cover:[1,"cover"],color:[1,"color"],twColorClass:[1,"twColorClass"]},decls:2,vars:8,consts:[["svgRoot",""],[1,"icon-svg"]],template:function(t,i){t&1&&($(),q(0,"svg",1,0)),t&2&&(G("width",i.iconSize)("height",i.iconSize)("color",i.cssColor),P("width",i.iconSize)("height",i.iconSize))},dependencies:[Y],styles:["[_nghost-%COMP%]{display:inline-block;line-height:0;vertical-align:middle}.icon[_ngcontent-%COMP%]{display:inline-block;line-height:0;vertical-align:middle;padding:0;margin:0}.icon-svg[_ngcontent-%COMP%]{display:inline-block;vertical-align:middle;fill:currentColor}"]})}}return s})(),Ge=[...Object.values(X),...Object.values(J)];export{p as a,ne as b,m as c,Ue as d,se as e,ae as f,Pe as g};

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.