PageSourceSearch

https://static.alugha.com/assets/CollaborationsPage-index-DS7vG1dw.js

js alugha.com collected 2026-09-24 23:07:24 UTC 23,286 bytes, 41 lines download raw bytes

1import{d as F,r as h,b6 as k,H as b,x as c,y as E,b7 as T,b8 as _,c as L,aq as Q,b9 as U,ae as G,z as I,p as R,j as t,ac as M,aB as z,q as P,az as W,ap as H,ba as X,o as $,bb as K,bc as Y,bd as Z,a1 as J,be as ee,a0 as D,a2 as x,a3 as S,bf as ie,aA as ne,aE as p,bg as ae,bh as te,aw as oe,bi as le,bj as j,aF as se,bk as re,aj as de,bl as ce,u as ue}from"./index-CNagSlXC.js";import{C as me}from"./ContentWide-index-CRfP4tTu.js";const be=`mutation acceptCollaboration($collaborationId: ObjectID!) {
2  acceptCollaboration(collaborationId: $collaborationId) {
3    id
4    state
5  }
6}
7`,fe={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"acceptCollaboration"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"collaborationId"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ObjectID"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"acceptCollaboration"},arguments:[{kind:"Argument",name:{kind:"Name",value:"collaborationId"},value:{kind:"Variable",name:{kind:"Name",value:"collaborationId"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"state"},arguments:[],directives:[]}]}}]}}],loc:{start:0,end:180,source:{name:"GraphQL request",locationOffset:{line:1,column:1},body:be}}},B=()=>{const[e,n]=F(fe);return[h.useCallback(o=>{!n.loading&&o&&e({variables:{collaborationId:o},optimisticResponse:{acceptCollaboration:{__typename:"Collaboration",id:o,state:k.Active}},update:(r,d)=>{const g=d?.data?.acceptCollaboration;r.modify({fields:{collaborations(v,{storeFieldName:u}){if(u.includes('collaborations({"states":["Invited"]})')){const m=r.identify({__typename:"Collaboration",id:g?.id});return v?.filter(i=>i==null?!0:r.identify(i)!==m)}return v}}})}})},[e,n.loading]),n]},ge=`mutation declineCollaboration($collaborationId: ObjectID!) {
8  declineCollaboration(collaborationId: $collaborationId) {
9    id
10    state
11  }
12}
13`,ve={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"declineCollaboration"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"collaborationId"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ObjectID"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"declineCollaboration"},arguments:[{kind:"Argument",name:{kind:"Name",value:"collaborationId"},value:{kind:"Variable",name:{kind:"Name",value:"collaborationId"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"state"},arguments:[],directives:[]}]}}]}}],loc:{start:0,end:182,source:{name:"GraphQL request",locationOffset:{line:1,column:1},body:ge}}},O=()=>{const[e,n]=F(ve);return[h.useCallback(o=>{!n.loading&&o&&e({variables:{collaborationId:o},optimisticResponse:{declineCollaboration:{__typename:"Collaboration",id:o,state:k.Cancelled}},update:(r,d)=>{const g=d?.data?.declineCollaboration;r.modify({fields:{collaborations(v,{storeFieldName:u}){if(u.includes('collaborations({"states":["Invited"]})')){const m=r.identify({__typename:"Collaboration",id:g?.id});return v?.filter(i=>i==null?!0:r.identify(i)!==m)}return v}}})}})},[e,n.loading]),n]},pe=b.div.withConfig({componentId:"sc-baaf6ea4-0"})(["display:flex;flex-wrap:nowrap;"]),ke=b.div.withConfig({componentId:"sc-baaf6ea4-1"})(["display:flex;flex-wrap:nowrap;height:288px;font-size:",";flex:1 1 auto;"],c(14)),he=b.div.withConfig({componentId:"sc-baaf6ea4-2"})(["overflow:hidden;flex:0 0 40%;height:100%;background-position:center;background-size:cover;background-repeat:no-repeat;"]),Ce=b.div.withConfig({componentId:"sc-baaf6ea4-3"})(["display:flex;flex:1 1 auto;flex-flow:column nowrap;background:",";",";",";padding-top:",";padding-bottom:",";@media (min-width:","){",";",";}"],({theme:e})=>
13e.colors.dubbrBackgroundDark,T(c(20)),_(c(20)),c(24),c(30),({theme:e})=>`${e.newScreenBreakpoints.large}px`,T(c(40)),_(c(67))),xe=b.div.withConfig({componentId:"sc-baaf6ea4-4"})(["display:flex;"]),Se=b.div.withConfig({componentId:"sc-baaf6ea4-5"})(["display:flex;justify-content:center;height:",";"],c(74)),ye=b.button.withConfig({componentId:"sc-baaf6ea4-6"})(["width:",";height:",";border:0;cursor:pointer;padding:0;outline:0;margin:"," ",";border-radius:50%;background:",";transition:background 100ms ease-in-out;"],c(10),c(10),c(32),c(11),({theme:e,isActive:n})=>n?e.colors.accentPrimary:e.colors.accentSecondary),we=b(L).withConfig({componentId:"sc-baaf6ea4-7"})(["display:flex;flex:0 0 auto;flex-flow:row-reverse nowrap;align-items:center;color:",";margin-left:auto;"],({theme:e})=>e.colors.dubbrLightGray),Ie=b.h3.withConfig({componentId:"sc-baaf6ea4-8"})(["font-size:",";margin:"," 0 "," 0;flex:0 0 auto;"],c(18),c(16),c(20)),Ne=b.div.withConfig({componentId:"sc-baaf6ea4-9"})(["flex:1 1 auto;overflow-y:auto;margin-right:-1rem;padding-right:1rem;"]),je=b.div.withConfig({componentId:"sc-baaf6ea4-10"})(["flex:0 0 auto;display:flex;flex-flow:row nowrap;margin:"," 0;"],c(14)),De=b(Q).withConfig({componentId:"sc-baaf6ea4-11"})(["width:",";height:",";",";"],c(24),c(24),U(c(8))),Fe=b.span.withConfig({componentId:"sc-baaf6ea4-12"})(["background:#2f3d52;border-radius:",";padding:"," ",";",";"],c(4),c(3),c(9),G(c(16))),Re=b.div.withConfig({componentId:"sc-baaf6ea4-13"})(["display:flex;justify-content:center;flex:0 0 auto;"]),A=b.button.withConfig({componentId:"sc-baaf6ea4-14"})(({theme:e,colorVariant:n,disabled:a})=>{const o=n==="primary";return I([""," flex:1 1 auto;max-width:11.75rem;min-height:2.25rem;height:auto;margin:0.3125rem 0.625rem;text-transform:uppercase;border-radius:0.375rem;border:1px solid ",";color:",";background-color:transparent;font-size:",";font-weight:bold;cursor:pointer;transition:color,background-color 100ms ease-in-out;:hover{color:",";background:",";}",";"],E,o?e.colors.accentPrimary:e.colors.accentNegative,o?e.colors.accentPrimary:e.colors.accentNegative,e.fontSizes.small,e.colors.dubbrTextWhite,o?e.colors.accentPrimary:e.colors.accentNegative,a&&I(["opacity:0.4;cursor:not-allowed;pointer-events:none;"]))}),Te=b.div.withConfig({componentId:"sc-baaf6ea4-15"})([""," border:3px dashed #403d3d;height:288px;flex:1 1 auto;font-size:2rem;color:#656565;font-style:italic;"],E),_e=b.span.withConfig({componentId:"sc-baaf6ea4-16"})(["overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:10rem;"]),Me=({collaborationId:e})=>{const n=R(),[a,{loading:o}]=B(),[r,{loading:d}]=O();return t.jsxs(Re,{children:[t.jsx(A,{colorVariant:"negative",onClick:()=>r(e),disabled:d,children:n.formatMessage(M.decline)}),t.jsx(A,{colorVariant:"primary",onClick:()=>a(e),disabled:o,children:n.formatMessage(M.accept)})]})},Ae=""+__alugha__.clientFilesBaseUrl+"assets/collaborations-invitations-1-BAuBD_5o.jpg",qe=""+__alugha__.clientFilesBaseUrl+"assets/collaborations-invitations-2-CAMKx9Rt.jpg",Ee=""+__alugha__.clientFilesBaseUrl+"assets/collaborations-invitations-3-BsXgd5Oh.jpg",Le=[Ae,qe,Ee],Pe=e=>{const a=(e?new Date(e):new Date).getTime()%3;return Le[a]},$e=({collaboration:{video:e,invitationMessage:n,invitedAt:a,id:o}})=>{const r=P(),d=W(),g=h.useCallback(u=>{u.src=H},[]),v=Pe(a);return e==null?null:t.jsxs(t.Fragment,{children:[t.jsx(X,{query:`(min-width: ${d.newScreenBreakpoints.large}px)`,children:t.jsx(he,{style:{backgroundImage:`url(${v})`}})}),t.jsxs(Ce,{children:[t.jsx(xe,{children:t.jsxs(we,{to:r.toUser(e.owner.id),children:[t.jsx(De,{src:e.owner.avatar?e.owner.avatar.href:"",alt:e.owner.name,round:!0,onError:g}),t.jsx(_e,{title:e.owner.name,children:e.owner.name})]})}),t.jsx(Ie,{children:e.track?e.track.title:""}),t.jsx(Ne,{children:n}),t.jsx(je,{children:(e.languages||[]).map(u=>t.jsx(Fe,{children:u.toLocaleUpperCase()},u))}),t.jsx(Me,{collaborationId:o})]})]})},Be=z.memo($e),w=$({heading:{id:"dubbr.CollaborationInvitations.heading",defaultMessage:"Project Invitations"},previousInvitationButtonLabel:{id:"dubbr.CollaborationInvitations.previousInvitationButtonLabel",defaultMessage:"Show previous invitation"},nextInvitationButtonLabel:{id:"dubbr.CollaborationInvitations.nextInvitationButtonLabel",defaultMessage:"Show next invitation"},noInvitationsPlaceholder:{id:"dubbr.CollaborationInvitations.noInvitationsPlaceholder",defaultMessage:"Coming soon: Request invitations for publicly listed projects"}}),Oe=({numPages:e,currentIndex:n,setCurrentIndex:a})=>{const o=h.useCallback(r=>()=>{r!==n&&r<=e-1&&a(r)}
13,[e,n,a]);return t.jsx(Se,{style:{visibility:e<=1?"hidden":"visible"},children:Array.from(Array(e)).map((r,d)=>t.jsx(ye,{isActive:d===n,onPointerDown:o(d),"data-pep":"none"},d))})},Ve=Z(["from{min-height:174px;}50%{min-height:164px;}to{min-height:174px;}"]),Qe=b.button.withConfig({componentId:"sc-55c20303-0"})(["flex:0 0 auto;width:50px;min-height:174px;background:",";color:",";cursor:",";margin:auto 0;"," padding:0;border:0;outline:none;transition:background 100ms ease-in-out;animation:"," 0.2s ease-in-out;visibility:",";:hover{background:",";}"],({theme:e})=>e.colors.backgroundSecondary,({theme:e})=>e.colors.dubbrTextWhite,({disabled:e})=>e?"not-allowed":"pointer",({paginationType:e})=>e==="prev"?I(["margin-right:16px;"]):I(["margin-left:16px;"]),Ve,({isHidden:e})=>e?"hidden":"visible",({theme:e})=>J(.1,e.colors.backgroundSecondary)),q=({type:e,numPages:n,currentIndex:a,setCurrentIndex:o,label:r})=>{const[d,g]=h.useState(0),v=Math.min(d,1),u=h.useCallback(()=>{if(e==="prev"&&a>0)return g(d+1),o(a-1);if(e==="next"&&a<n-1)return g(d+1),o(a+1)},[e,a,n,d,o]),m=e==="prev"&&a<=0||e==="next"&&a>=n-1;return t.jsx(Qe,{onPointerDown:u,disabled:m,paginationType:e,"aria-label":r,"data-pep":"none",style:{animationIterationCount:v},isHidden:n<=1,children:e==="prev"?t.jsx(K,{denyHover:!0}):t.jsx(Y,{denyHover:!0})},d)},Ue=({collaborations:e})=>{const[n,a]=h.useState(-2),o=R();h.useEffect(()=>{if(n===-2)return a(e.length?0:-1);if(n===-1&&e.length>0)return a(0);if(n+1>e.length)return a(e.length-1)},[e.length,n]);const r=n!==-1?e[n]:null;return n===-2?null:t.jsxs(D,{fluid:!0,children:[t.jsx(x,{children:t.jsx(S,{xs:!0,children:t.jsx("h2",{children:o.formatMessage(w.heading)})})}),t.jsx(x,{children:t.jsxs(S,{as:pe,xs:!0,children:[t.jsx(q,{type:"prev",currentIndex:n,numPages:e.length,setCurrentIndex:a,label:o.formatMessage(w.previousInvitationButtonLabel)}),t.jsx(ie,{in:r?r.id:!1,wrapperComponent:ke,children:r?t.jsx(Be,{collaboration:r}):t.jsx(Te,{children:o.formatMessage(w.noInvitationsPlaceholder)},n)}),t.jsx(q,{type:"next",currentIndex:n,numPages:e.length,setCurrentIndex:a,label:o.formatMessage(w.nextInvitationButtonLabel)})]})}),t.jsx(x,{children:t.jsx(S,{xs:!0,children:t.jsx(Oe,{currentIndex:n,numPages:e.length,setCurrentIndex:a})})})]})},Ge=ee(Ue),V={definitions:[{kind:"FragmentDefinition",name:{kind:"Name",value:"CollaborationsPageCollaboration"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Collaboration"}},directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"state"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"collaborationType"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"requestedInviteAt"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"invitedAt"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"invitationMessage"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"video"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"languages"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"views"},arguments:[],directives:[]}
13,{kind:"Field",alias:{kind:"Name",value:"smallThumbnail"},name:{kind:"Name",value:"thumbnail"},arguments:[{kind:"Argument",name:{kind:"Name",value:"height"},value:{kind:"IntValue",value:"65"}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"href"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"owner"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"avatar"},arguments:[{kind:"Argument",name:{kind:"Name",value:"width"},value:{kind:"IntValue",value:"24"}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"href"},arguments:[],directives:[]}]}}]}},{kind:"Field",name:{kind:"Name",value:"track"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"langCode"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"title"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"description"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"tracks"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"langCode"},arguments:[],directives:[]}]}}]}}]}}]},ze=`#import "../fragments/CollaborationsPageCollaboration.graphql"
14
15query CollaborationsPageQuery {
16  viewer {
17    id
18  }
19  collaborations {
20    id
21    ...CollaborationsPageCollaboration
22  }
23}
24`,y={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"CollaborationsPageQuery"},variableDefinitions:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"viewer"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"collaborations"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"FragmentSpread",name:{kind:"Name",value:"CollaborationsPageCollaboration"},directives:[]}]}}]}}],loc:{start:0,end:227,source:{name:"GraphQL request",locationOffset:{line:1,column:1},body:ze}}},We=e=>{const n={};return e.filter(function(a){if(a.kind!=="FragmentDefinition")return!0;const o=a.name.value;return n[o]?!1:(n[o]=!0,!0)})};y.definitions=We(y.definitions.concat(V.definitions));const He=(e,n)=>{const a=(i,s)=>{if(i.kind==="FragmentSpread")s.add(i.name.value);else if(i.kind==="VariableDefinition"){const l=i.type;l.kind==="NamedType"&&s.add(l.name.value)}return i&&"selectionSet"in i&&i.selectionSet&&i.selectionSet.selections.forEach(l=>{a(l,s)}),i&&"variableDefinitions"in i&&i.variableDefinitions&&i.variableDefinitions.forEach(l=>{a(l,s)}),i&&"definitions"in i&&i.definitions&&i.definitions.forEach(l=>{a(l,s)}),s},o=i=>{const s={};return i.definitions.forEach(function(l){"name"in l&&l.name&&(s[l.name.value]=a(l,new Set))}),s},r=(i,s)=>{for(let l=0;l<i.definitions.length;l++){const f=i.definitions[l];if(f&&"name"in f&&f.name&&f.name.value==s)return f}},d=o(e),g=Object.assign({},e,{definitions:[r(e,n)]}),v=d[n]||new Set,u=new Set;let m=new Set;for(v.forEach(i=>{m.add(i)});m.size>0;){const i=m;m=new Set,i.forEach(s=>{u.has(s)||(u.add(s),(d[s]||new Set).forEach(f=>{m.add(f)}))})}return u.forEach(i=>{const s=r(e,i);s&&g.definitions.push(s)}),g};He(y,"CollaborationsPageQuery");const Xe=`mutation finishCollaboration($collaborationId: ObjectID!) {
25  finishCollaboration(collaborationId: $collaborationId) {
26    id
27    state
28  }
29}
30`,Ke={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"finishCollaboration"}
30,variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"collaborationId"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ObjectID"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"finishCollaboration"},arguments:[{kind:"Argument",name:{kind:"Name",value:"collaborationId"},value:{kind:"Variable",name:{kind:"Name",value:"collaborationId"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"state"},arguments:[],directives:[]}]}}]}}],loc:{start:0,end:180,source:{name:"GraphQL request",locationOffset:{line:1,column:1},body:Xe}}},Ye=()=>{const[e,n]=F(Ke);return[h.useCallback(o=>{!n.loading&&o&&e({variables:{collaborationId:o},optimisticResponse:{finishCollaboration:{__typename:"Collaboration",id:o,state:k.Finished}}})},[e,n.loading]),n]},C=$({heading:{id:"app.CollaborationTable.heading",defaultMessage:"My Dubbr collaborations"},headerRowRole:{id:"app.CollaborationTable.headerRowRole",defaultMessage:"Your Role"},toDubbr:{id:"app.CollaborationTable.toDubbr",defaultMessage:"Open in Dubbr"},noCollaborations:{id:"app.CollaborationTable.noCollaborations",defaultMessage:"There are no collaborations"},missingTitle:{id:"app.CollaborationTable.missingTitle",defaultMessage:"No title"}}),Ze=({collaborations:e})=>{const n=R(),a=P(),o=ne("(max-width: 75rem)"),r=h.useMemo(()=>o?[{type:p.Section,accessor:i=>i,options:[p.Thumb,p.Title,p.Languages,p.UserLink,p.CollaborationState,p.Text,p.Actions]}
30]:[{type:p.Thumb,accessor:"video.smallThumbnail.href"},{type:p.Title,accessor:i=>i.video.track?.title||n.formatMessage(C.missingTitle)},{type:p.Languages,accessor:i=>ae(i,"video.languages")},{type:p.UserLink,accessor:i=>i.video.owner},{type:p.Text,accessor:"collaborationType[0]",header:n.formatMessage(C.headerRowRole).toLocaleUpperCase()},{type:p.CollaborationState,accessor:"state"},{type:p.Actions}],[n,o]),d=h.useMemo(()=>[{render:i=>!i.original.video||i.original.state===k.Invited?null:t.jsx(L,{style:{flexShrink:.8},to:a.toDubbrVideoInfo(i.original.video.id),children:t.jsxs(te,{children:[t.jsx(oe,{style:{marginTop:0}}),t.jsx(le,{style:{minWidth:62},children:n.formatMessage(C.toDubbr)})]})})}],[n,a]),[g]=B(),[v]=O(),[u]=Ye(),m=h.useMemo(()=>i=>{const s=i.original.id,l=[];switch(i.original.state){case k.Invited:l.push({label:n.formatMessage(j.acceptInvite),handler:()=>g(s)},{label:n.formatMessage(j.declineInvite),handler:()=>v(s)});break;case k.Active:l.push({label:n.formatMessage(j.finishCollaboration),handler:()=>u(s)}),o&&l.push({label:n.formatMessage(C.toDubbr),withRouterLinkTo:f=>f.original.video?.id?a.toDubbrVideoInfo(f.original.video.id):void 0});break}return l},[n,g,v,u,o,a]);return e.length==0?t.jsx(D,{fluid:!0,children:t.jsx(x,{children:t.jsx(S,{xs:!0,children:n.formatMessage(C.noCollaborations)})})}):t.jsxs(D,{fluid:!0,children:[t.jsx(x,{children:t.jsx(S,{xs:!0,children:t.jsx("h2",{children:n.formatMessage(C.heading)})})}),t.jsx(x,{children:t.jsx(S,{xs:!0,children:t.jsx(se,{data:e,columnOptions:r,actions:o?void 0:d,contextActions:m,noHeader:o,assetType:"collaboration"})})})]})},Je=`#import "../fragments/CollaborationsPageCollaboration.graphql"
31
32subscription UserCollaborationsSubscription($userId: ID!) {
33  collaborations(input: { userId: $userId }) {
34    type
35    payload {
36      id
37      ...CollaborationsPageCollaboration
38    }
39  }
40}
41`,N={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"subscription",name:{kind:"Name",value:"UserCollaborationsSubscription"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"userId"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"collaborations"},arguments:[{kind:"Argument",name:{kind:"Name",value:"input"},value:{kind:"ObjectValue",fields:[{kind:"ObjectField",name:{kind:"Name",value:"userId"},value:{kind:"Variable",name:{kind:"Name",value:"userId"}}}]}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"type"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"payload"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"FragmentSpread",name:{kind:"Name",value:"CollaborationsPageCollaboration"},directives:[]}]}}]}}]}}],loc:{start:0,end:294,source:{name:"GraphQL request",locationOffset:{line:1,column:1},body:Je}}},ei=e=>{const n={};return e.filter(function(a){if(a.kind!=="FragmentDefinition")return!0;const o=a.name.value;return n[o]?!1:(n[o]=!0,!0)})};N.definitions=ei(N.definitions.concat(V.definitions));const ii=(e,n)=>{const a=(i,s)=>{if(i.kind==="FragmentSpread")s.add(i.name.value);else if(i.kind==="VariableDefinition"){const l=i.type;l.kind==="NamedType"&&s.add(l.name.value)}return i&&"selectionSet"in i&&i.selectionSet&&i.selectionSet.selections.forEach(l=>{a(l,s)}),i&&"variableDefinitions"in i&&i.variableDefinitions&&i.variableDefinitions.forEach(l=>{a(l,s)}),i&&"definitions"in i&&i.definitions&&i.definitions.forEach(l=>{a(l,s)}),s},o=i=>{const s={};return i.definitions.forEach(function(l){"name"in l&&l.name&&(s[l.name.value]=a(l,new Set))}),s},r=(i,s)=>{for(let l=0;l<i.definitions.length;l++){const f=i.definitions[l];if(f&&"name"in f&&f.name&&f.name.value==s)return f}},d=o(e),g=Object.assign({},e,{definitions:[r(e,n)]}),v=d[n]||new Set,u=new Set;let m=new Set;for(v.forEach(i=>{m.add(i)});m.size>0;){const i=m;
41m=new Set,i.forEach(s=>{u.has(s)||(u.add(s),(d[s]||new Set).forEach(f=>{m.add(f)}))})}return u.forEach(i=>{const s=r(e,i);s&&g.definitions.push(s)}),g};ii(N,"UserCollaborationsSubscription");const ni=({client:e,data:n})=>{const a=n.data;if(a&&a.collaborations.type===re.Add){const o=e.readQuery({query:y});if(!o)return;e.writeQuery({query:y,data:de(o,{collaborations:{$push:[a.collaborations.payload]}})})}},ai=({userId:e,children:n})=>(ce(N,{variables:{userId:e},onData:ni}),t.jsx(t.Fragment,{children:n})),ti=b(me).withConfig({componentId:"sc-11451b06-0"})(["padding-top:",";@media (max-width:","){padding:0;}"],c(60),({theme:e})=>`${e.newScreenBreakpoints.medium-1}px`),oi=[k.Active,k.Invited,k.Finished,k.RecordingSamples,k.Renegotiating,k.RequestedInvite,k.Reviewing,k.ReviewingSamples],ri=()=>{const{data:e,loading:n}=ue(y),a=h.useMemo(()=>e?e.collaborations.filter(d=>d.video!=null):[],[e]),o=h.useMemo(()=>a.filter(d=>d.state===k.Invited),[a]),r=h.useMemo(()=>a.filter(d=>oi.includes(d.state)),[a]);if(n)return null;if(!e||!e.collaborations||!e.viewer)throw new Error("Invalid response");return t.jsx(ai,{userId:e.viewer.id,children:t.jsxs(ti,{children:[t.jsx(Ge,{collaborations:o}),t.jsx(Ze,{collaborations:r})]})})};export{ti as Wrapper,ri 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.