PageSourceSearch

https://uni.xyz/chunk-3BWI6KAN.js

js uni.xyz collected 2026-10-01 11:41:01 UTC 16,599 bytes, 1 lines download raw bytes

1import{Ge as ne,Hc as X,Tb as $,Td as Q,We as ie,_b as W,ec as G,jc as q,je as Z,kf as oe,lb as j,nf as y,oc as Y,oe as J,p as b,pc as K,re as ee,sf as re,ve as te}from"./chunk-HIVZMOGT.js";import{e as B}from"./chunk-UKNSY7J4.js";import{Ab as I,Bb as s,C as k,Ea as F,Ia as o,Kb as D,Lc as V,Mb as p,Nb as v,Ob as P,Sa as A,Tc as N,Ua as O,Ub as U,Uc as H,Va as _,Vb as m,Wb as f,Yb as L,aa as h,fa as T,ga as E,l as z,mb as c,nb as d,sa as C,sb as w,tb as r,ub as a,vb as g,zb as R}from"./chunk-L45A6KDO.js";import{a as x,b as S}from"./chunk-6MDQTQU3.js";function le(t,u){t&1&&g(0,"ng-icon",8)}function ce(t,u){if(t&1&&(r(0,"p",9),p(1),a()),t&2){let e=s(2);o(),v(e.data.tagline)}}function de(t,u){if(t&1&&(r(0,"p",10),p(1),a()),t&2){let e=s(2);o(),v(e.getDisplayRole())}}function pe(t,u){if(t&1&&(r(0,"div",12),g(1,"ng-icon",17),r(2,"span"),p(3),a()()),t&2){s();let e=f(0);o(3),v(e)}}function ue(t,u){if(t&1&&(r(0,"div",12),g(1,"ng-icon",18),r(2,"span"),p(3),a()()),t&2){s();let e=f(1),n=s();o(3),P("",n.formatNumber(e)," followers")}}function he(t,u){if(t&1&&(r(0,"div",12),g(1,"ng-icon",19),r(2,"span"),p(3),a()()),t&2){s();let e=f(3);o(3),P("Joined ",e)}}function ge(t,u){if(t&1){let e=R();r(0,"uni-button",20),I("onClick",function(i){T(e);let l=s(2);return E(l.handleFollowClick(i))}),p(1),a()}if(t&2){s();let e=f(2),n=s();w("variant",e?"solid":"outline")("color","primary")("loading",n.isFollowLoading)("disabled",n.isFollowLoading)("icon",e?"matPersonRemove":"matPersonAdd"),o(),P(" ",e?"Following":"Follow"," ")}}function ve(t,u){if(t&1&&(U(0)(1)(2)(3),r(4,"div",1)(5,"div",2),g(6,"uni-organization-avatar",3),r(7,"div",4)(8,"div",5)(9,"h3",6)(10,"span",7),p(11),a(),c(12,le,1,0,"ng-icon",8),a()(),c(13,ce,2,1,"p",9),c(14,de,2,1,"p",10),a()(),r(15,"div",11),c(16,pe,4,1,"div",12),c(17,ue,4,1,"div",12),c(18,he,4,1,"div",12),a(),r(19,"div",13),c(20,ge,2,6,"uni-button",14),r(21,"a",15)(22,"uni-button",16),p(23," View Profile "),a()()()()),t&2){let e=s(),n=e.getDisplayName(),i=m(e.getLocationText());o();let l=m(e.getFollowersCount());o(),m(e.isFollowing()),o();let M=m(e.getJoinedDate()),ae=e.getProfileUrl(),se=e.isVerified();o(3),w("organization",e.data)("size",48),o(5),v(n),o(),d(se?12:-1),o(),d(e.data.tagline?13:-1),o(),d(e.getDisplayRole()?14:-1),o(2),d(i?16:-1),o(),d(l>0?17:-1),o(),d(M?18:-1),o(2),d(e.showFollowButton?20:-1),o(),w("href",ae,F)}}var me=()=>import("./chunk-AXSITOPN.js").then(t=>t.UniUserAvatarPopoverComponent),fe=()=>import("./chunk-OCE6SIMK.js").then(t=>t.UniTeamPopoverComponent),Ce={userAvatar:me,team:fe};var _e=(()=>{class t extends oe{get organization(){return this.data}set organization(e){this.data=e}followStateService=h(te);toastService=h(Z);authModalService=h(J);http=h(B);hasLoadedFullData=!1;ngOnInit(){super.ngOnInit(),this.data?.slug&&(this.subscribeToFollowState(),this.followStateService.setFollowState("organization",this.data.slug,this.isFollowing(),this.getFollowerId()),!this.data.tagline&&!this.hasLoadedFullData&&this.fetchFullOrganizationData())}fetchFullOrganizationData(){if(!this.data?.slug||this.hasLoadedFullData)return;this.hasLoadedFullData=!0;let e=Q(`/api/v2/organizations/${this.data.slug}/`);this.http.get(e).pipe(b(this.destroyRef),k(n=>(console.warn("Failed to fetch organization details:",n),z(null)))).subscribe(n=>{n&&this.data&&(this.data=S(x({},this.data),{tagline:n.tagline||this.data.tagline,bio:n.desc||this.data.bio,description:n.desc||this.data.description,website:n.website||this.data.website,email:n.email||this.data.email}),this.cdr.markForCheck())})}onDataChange(){super.onDataChange(),this.hasLoadedFullData=!1,this.data?.slug&&!this.data.tagline&&this.fetchFullOrganizationData()}getDisplayName(){return this.data&&(this.data.title||this.data.name)||""}getAvatarUrl(){return this.data&&(this.data.logo||this.data.avatar)||""}getBio(){if(!this.data)return"";let e=this.data.bio||this.data.description||this.data.about||this.data.mission||"";return this.truncateText(e,120)}getProfileUrl(){let e=this.data?.slug;return e?`/organizations/${e}`:"#"}isVerified(){return this.data?.status==="VERIFIED"}getCleanWebsiteUrl(e){return!e||typeof e!="string"?"":e.replace(/^https?:\/\/(www\.)?/,"").replace(/\/$/,"")}getJoinedDate(){if(!this.data)return"";let e=this.data.date_joined||this.data.joined_date||this.data.created_at;if(!e)return"";try{let n=new Date(e),i={month:"long",year:"numeric"};return n.toLocaleDateString("en-US",i)}catch{return""}}getLocationText(){return re.formatLocationDisplay(this.data)}getDisplayRole(){return!this.data?.role||["OWNER","ADMIN","MEMBER","VIEWER","EDITOR","CURATOR"].includes(this.data.role.toUpperCase())?"":this.data.role}updateFollowerCount(e){if(!this.data)return;let n=this.getFollowersCount(),i=e?n+1:Math.max(0,n-1);this.data.follower_count!==void 0?this.data.follower_count=i:this.data.followers!==void 0&&(this.data.followers=i)}handleFollowClick(e){if(e&&(e.preventDefault(),e.stopPropagation()),!this.data||this.isFollowLoading)return;if(!this.isAuthenticated()){this.elementRef.nativeElement.closest('[data-floating-sidebar="true"]')?this.toastService.show("Please log in to follow organizations","info"):(this.hide(),this.authModalService.showLoginModal().then(()=>{}).catch(l=>{console.error("Failed to show login modal:",l),this.toastService.show("Please log in to follow organizations","info")}));return}let n=typeof this.currentUserId=="string"?parseInt(this.currentUserId,10):this.currentUserId;this.followStateService.toggleOrganizationFollow(this.data.slug||"",this.isFollowing(),this.getFollowerId(),n).pipe(b(this.destroyRef)).subscribe({next:i=>{i?.id?this.data&&(this.data.is_following=!0,this.data.follower_id=i.id,this.updateFollowerCount(!0)):this.data&&(this.data.is_following=!1,this.data.follower_id=void 0,this.updateFollowerCount(!1)),this.followClick.emit({data:this.data,isFollowing:this.isFollowing(),followId:this.getFollowerId()}),this.cdr.markForCheck()},error:i=>{console.error("Follow operation failed:",i);let l=this.isFollowing()?"unfollow":"follow",M=this.getDisplayName()||"this organization";this.toastService.show(`Unable to ${l} ${M}. Please try again.`,"error"),this.isFollowLoading=!1,this.cdr.markForCheck()}})}subscribeToFollowState(){this.data?.slug&&this.followStateService.getFollowState("organization",this.data.slug).pipe(b(this.destroyRef)).subscribe(e=>{this.isFollowLoading=e.isLoading,this.data&&e.isFollowing!==this.isFollowing()&&(this.data.is_following=e.isFollowing,this.data.follower_id=e.followId),this.cdr.markForCheck()})}static \u0275fac=(()=>{let e;return function(i){return(e||(e=C(t)))(i||t)}})();static \u0275cmp=A({type:t,selectors:[["uni-organization-popover"]],inputs:{organization:"organization"},features:[L([N({matLocationOn:G,matLanguage:W,matVerified:X,matOpenInNew:q,matGroup:$,matCalendarToday:j,matPersonAdd:Y,matPersonRemove:K})]),_],decls:2,vars:3,consts:[[1,"uni-popover","organization-popover"],[1,"popover-content"],[1,"popover-header"],["borderRadius","10px","fallbackType","architectural",1,"logo-container",3,"organization","size"],[1,"header-info"],[1,"title-row"],[1,"primary-title"],[1,"title-text"],["name","matVerified","size","16",1,"verified-icon","org-verified"],[1,"secondary-text"],[1,"role-text"],[1,"popover-info"],[1,"info-item"],[1,"popover-actions"],["size","sm","iconPosition","start",1,"follow-btn",3,"variant","color","loading","disabled","icon"],["target","_blank",1,"view-profile-link",3,"href"],["variant","outline","color","secondary","size","sm","icon","matOpenInNew","iconPosition","end"],["name","matLocationOn","size","14"],["name","matGroup","size","14"],["name","matCalendarToday","size","14"],["size","sm","iconPosition","start",1,"follow-btn",3,"onClick","variant","color","loading","disabled","icon"]],template:function(n,i){n&1&&(r(0,"div",0),c(1,ve,24,15,"div",1),a()),n&2&&(D("visible",i.visible),o(),d(i.data?1:-1))},dependencies:[V,H,ie,ne],styles:['@charset "UTF-8";.organization-popover[_ngcontent-%COMP%]{position:absolute;z-index:var(--z-40);opacity:var(--opacity-0);visibility:hidden;transform:scale(var(--scale-95)) translateY(var(--size-2));transition:opacity var(--duration-normal) var(--easing-in-out),visibility var(--duration-normal) var(--easing-in-out),transform var(--duration-normal) var(--easing-in-out);pointer-events:none}.organization-popover.visible[_ngcontent-%COMP%]{opacity:var(--opacity-100);visibility:visible;transform:scale(var(--scale-100)) translateY(0);pointer-events:auto}.organization-popover.floating-sidebar-context[_ngcontent-%COMP%]{position:fixed!important;z-index:var(--z-modal)!important;left:var(--popover-left, auto);top:var(--popover-top, auto)}.popover-content[_ngcontent-%COMP%]{background:var(--glass-white-80);backdrop-filter:var(--backdrop-blur-3xl);-webkit-backdrop-filter:var(--backdrop-blur-3xl);box-shadow:var(--glass-shadow);border:var(--border-width-thin) solid var(--glass-border-light, rgba(var(--white-rgb), var(--opacity-20)));border-radius:var(--radius-xl);padding:var(--size-6);width:var(--size-80);max-width:var(--size-96);position:relative;z-index:var(--z-popover)}.popover-header[_ngcontent-%COMP%]{display:flex;gap:var(--size-4);margin-bottom:var(--size-4)}.popover-header[_ngcontent-%COMP%]   .avatar-container[_ngcontent-%COMP%], .popover-header[_ngcontent-%COMP%]   .logo-container[_ngcontent-%COMP%]{flex-shrink:0;position:relative}.popover-header[_ngcontent-%COMP%]   .header-info[_ngcontent-%COMP%]{flex:1;min-width:0}.popover-header[_ngcontent-%COMP%]   .title-row[_ngcontent-%COMP%]{display:flex;align-items:center;gap:var(--size-2);margin-bottom:var(--size-0-5)}.popover-header[_ngcontent-%COMP%]   .primary-title[_ngcontent-%COMP%]{margin:0;font-size:var(--font-size-base);font-weight:var(--font-weight-semibold);color:var(--text-primary);line-height:var(--line-height-tight);display:flex;align-items:center;gap:var(--size-1);max-width:100%;white-space:nowrap}.popover-header[_ngcontent-%COMP%]   .primary-title[_ngcontent-%COMP%]   .membership-badge-inline[_ngcontent-%COMP%]{position:relative;z-index:calc(var(--z-popover) + 10)}.popover-header[_ngcontent-%COMP%]   .primary-title[_ngcontent-%COMP%]   .title-text[_ngcontent-%COMP%]{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;min-width:0}.popover-header[_ngcontent-%COMP%]   .verified-icon[_ngcontent-%COMP%]{flex-shrink:0;display:inline-flex;align-items:center;vertical-align:middle}.popover-header[_ngcontent-%COMP%]   .verified-icon.user-verified[_ngcontent-%COMP%]{color:var(--orange-600)}.popover-header[_ngcontent-%COMP%]   .verified-icon.org-verified[_ngcontent-%COMP%]{color:var(--warning-500)}.popover-header[_ngcontent-%COMP%]   .role-text[_ngcontent-%COMP%]{margin:var(--size-0-5) 0 0 0;font-size:var(--font-size-xs);color:var(--text-secondary);line-height:var(--line-height-relaxed);font-weight:var(--font-weight-medium);letter-spacing:var(--letter-spacing-wide)}.popover-header[_ngcontent-%COMP%]   .secondary-text[_ngcontent-%COMP%]{margin:calc(var(--size-0-5) * -1) 0 0 0;font-size:var(--font-size-xs);color:var(--text-secondary);line-height:var(--line-height-relaxed);font-style:italic}.popover-header[_ngcontent-%COMP%]   .bio-text[_ngcontent-%COMP%]{margin:var(--size-0-5) 0 0 0;font-size:var(--font-size-xs);color:var(--text-tertiary);line-height:var(--line-height-snug);overflow:hidden;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;text-overflow:ellipsis;max-width:100%;word-break:break-word}.popover-header[_ngcontent-%COMP%]   .logo-container[_ngcontent-%COMP%]{width:var(--size-12);height:var(--size-12);flex-shrink:0}.popover-info[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:var(--size-2);margin-bottom:var(--size-4)}.popover-info[_ngcontent-%COMP%]   .info-item[_ngcontent-%COMP%]{display:flex;align-items:center;gap:var(--size-2);font-size:var(--font-size-xs);color:var(--text-secondary)}.popover-info[_ngcontent-%COMP%]   .info-item[_ngcontent-%COMP%]   ng-icon[_ngcontent-%COMP%]{color:var(--text-tertiary);flex-shrink:0}.popover-info[_ngcontent-%COMP%]   .info-item[_ngcontent-%COMP%]   .info-link[_ngcontent-%COMP%]{color:var(--info-600);text-decoration:none;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.popover-info[_ngcontent-%COMP%]   .info-item[_ngcontent-%COMP%]   .info-link[_ngcontent-%COMP%]:hover{text-decoration:underline}.popover-actions[_ngcontent-%COMP%]{display:flex;flex-direction:row;gap:var(--size-3);padding-top:var(--size-4);border-top:var(--border-width-thin) solid var(--border)}.popover-actions[_ngcontent-%COMP%]     uni-button.follow-btn{flex:1}.popover-actions[_ngcontent-%COMP%]     uni-button.follow-btn .uni-button{width:100%}.popover-actions[_ngcontent-%COMP%]     a.view-profile-link{text-decoration:none;flex:1}.popover-actions[_ngcontent-%COMP%]     a.view-profile-link uni-button{width:100%}.popover-actions[_ngcontent-%COMP%]     a.view-profile-link uni-button .uni-button{width:100%}[data-theme=dark][_nghost-%COMP%]   .popover-content[_ngcontent-%COMP%], [data-theme=dark]   [_nghost-%COMP%]   .popover-content[_ngcontent-%COMP%]{background:var(--glass-black-80);backdrop-filter:var(--backdrop-blur-3xl);-webkit-backdrop-filter:var(--backdrop-blur-3xl);box-shadow:var(--glass-shadow);border:var(--border-width-thin) solid var(--glass-border-dark, rgba(var(--white-rgb), var(--opacity-10)))}[data-theme=dark][_nghost-%COMP%]   .primary-title[_ngcontent-%COMP%], [data-theme=dark]   [_nghost-%COMP%]   .primary-title[_ngcontent-%COMP%]{color:var(--text-primary)}[data-theme=dark][_nghost-%COMP%]   .secondary-text[_ngcontent-%COMP%], [data-theme=dark]   [_nghost-%COMP%]   .secondary-text[_ngcontent-%COMP%]{color:var(--text-secondary)}[data-theme=dark][_nghost-%COMP%]   .bio-text[_ngcontent-%COMP%], [data-theme=dark]   [_nghost-%COMP%]   .bio-text[_ngcontent-%COMP%]{color:var(--text-tertiary)}[data-theme=dark][_nghost-%COMP%]   .stat-item[_ngcontent-%COMP%], [data-theme=dark]   [_nghost-%COMP%]   .stat-item[_ngcontent-%COMP%]{color:var(--text-secondary)}[data-theme=dark][_nghost-%COMP%]   .stat-item[_ngcontent-%COMP%]   .stat-number[_ngcontent-%COMP%], [data-theme=dark]   [_nghost-%COMP%]   .stat-item[_ngcontent-%COMP%]   .stat-number[_ngcontent-%COMP%]{color:var(--text-primary)}[data-theme=dark][_nghost-%COMP%]   .popover-actions[_ngcontent-%COMP%], [data-theme=dark]   [_nghost-%COMP%]   .popover-actions[_ngcontent-%COMP%]{border-top-color:var(--border)}@media (max-width: 767.98px){.popover-content[_ngcontent-%COMP%]{width:var(--size-80);padding:var(--size-4)}.popover-header[_ngcontent-%COMP%]{gap:var(--size-3);margin-bottom:var(--size-3)}.popover-header[_ngcontent-%COMP%]   .primary-title[_ngcontent-%COMP%]{font-size:var(--font-size-base)}.popover-header[_ngcontent-%COMP%]   .secondary-text[_ngcontent-%COMP%], .popover-header[_ngcontent-%COMP%]   .bio-text[_ngcontent-%COMP%]{font-size:var(--font-size-xs)}.popover-stats[_ngcontent-%COMP%], .popover-info[_ngcontent-%COMP%]{gap:var(--size-2);margin-bottom:var(--size-3)}.popover-actions[_ngcontent-%COMP%]{gap:var(--size-2)}}'],changeDetection:0})}return t})(),Dt=(()=>{class t extends y{organization;getInputData(){return this.organization}getPopoverComponent(){return _e}getIdentifier(){return this.organization?.slug}getApiEndpoint(e){return`/api/v2/organizations/${e}/`}configurePopoverInstance(e){e.organization=this.entityDetails,e.visible=!0,e.showFollowButton=!0,e.currentUserId=this.currentUser?.id||this.currentUser?.pk||null}updateEntityFollowState(e,n){this.entityDetails&&(this.entityDetails.is_following=e,this.entityDetails.follower_id=n)}static \u0275fac=(()=>{let e;return function(i){return(e||(e=C(t)))(i||t)}})();static \u0275dir=O({type:t,selectors:[["","uniOrganizationPopover",""]],inputs:{organization:[0,"uniOrganizationPopover","organization"]},features:[_]})}return t})(),Ut=(()=>{class t extends y{user;authService=h(ee);getInputData(){return this.user}getPopoverComponent(){return Ce.userAvatar()}getIdentifier(){return this.user?.username}getApiEndpoint(e){return`/api/v2/users/${e}/`}configurePopoverInstance(e){e.user=this.entityDetails||null,e.visible=!0,e.showFollowButton=!0;let i=this.currentUser?.id||this.currentUser?.pk||null;if(!i){let l=this.authService.userSignal();i=l?.id??l?.pk??null}e.currentUserId=i}updateEntityFollowState(e,n){this.entityDetails&&(this.entityDetails.is_following=e,this.entityDetails.follower_id=n)}static \u0275fac=(()=>{let e;return funct
1ion(i){return(e||(e=C(t)))(i||t)}})();static \u0275dir=O({type:t,selectors:[["","uni-user-avatar-popover",""]],inputs:{user:[0,"uni-user-avatar-popover","user"]},features:[_]})}return t})();export{Dt as a,Ut as 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.