1import{j}from"./vendor-antd-BBP9elV-.js";import{c as q,s as L,k as Q,d as T,eh as $,ei as H,w as C}from"./index-B5sQTxjn.js";import{R as z,u as G,b as U,d as O}from"./vendor-redux-KLK4bked.js";import{u as _}from"./ra-packages-feutils-BT9hW3Hl.js";const B=z.createContext({loadingFollowList:!1,error:null,loaded:!1,items:[],followerId:null,isAllowed:!1});var D={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"filterFollows"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"followerId"}},type:{kind:"NamedType",name:{kind:"Name",value:"IntOrString"}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"filterFollows"},arguments:[{kind:"Argument",name:{kind:"Name",value:"followerId"},value:{kind:"Variable",name:{kind:"Name",value:"followerId"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"items"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"followerId"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"leaderId"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"collection"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"items"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"type"},arguments:[],directives:[]}]}}]}}]}}],loc:{start:0,end:202}};D.loc.source={body:`query filterFollows($followerId: IntOrString) { 2 filterFollows(followerId: $followerId) { 3 items { 4 id 5 followerId 6 leaderId 7 } 8 collection { 9 items 10 type 11 } 12 } 13} 14`,name:"GraphQL request",locationOffset:{line:1,column:1}};function b(i,e){if(i.kind==="FragmentSpread")e.add(i.name.value);else if(i.kind==="VariableDefinition"){var n=i.type;n.kind==="NamedType"&&e.add(n.name.value)}i.selectionSet&&i.selectionSet.selections.forEach(function(t){b(t,e)}),i.variableDefinitions&&i.variableDefinitions.forEach(function(t){b(t,e)}),i.definitions&&i.definitions.forEach(function(t){b(t,e)})}var E={};(function(){D.definitions.forEach(function(e){if(e.name){var n=new Set;b(e,n),E[e.name.value]=n}})})();function P(i,e){for(var n=0;n<i.definitions.length;n++){var t=i.definitions[n];if(t.name&&t.name.value==e)return t}}function J(i,e){var n={kind:i.kind,definitions:[P(i,e)]};i.hasOwnProperty("loc")&&(n.loc=i.loc);var t=E[e]||new Set,a=new Set,o=new Set;for(t.forEach(function(l){o.add(l)});o.size>0;){var p=o;o=new Set,p.forEach(function(l){if(!a.has(l)){a.add(l);var s=E[l]||new Set;s.forEach(function(r){o.add(r)})}})}return a.forEach(function(l){var s=P(i,l);s&&n.definitions.push(s)}),n}J(D,"filterFollows");function Z(i){const e=q.c(34),{children:n}=i,t=G();let a;e[0]!==t?(a=U({actionCreateFollow:H,actionDeleteFollow:$},t),e[0]=t,e[1]=a):a=e[1];const{actionCreateFollow:o,actionDeleteFollow:p}=a,l=O(L),s=O(Q);let r;e[2]!==s?(r={role:s,resourcePermissions:C.acl.resourcePermissions.follow,rolesHierarchy:C.acl.rolesHierarchy},e[2]=s,e[3]=r):r=e[3];const{isAllowed:S}=_(r);let d;e[4]!==l?(d={followerId:l},e[4]=l,e[5]=d):d=e[5];const N=!S||!l;let h;e[6]!==d||e[7]!==N?(h={variables:d,ssr:!1,skip:N},e[6]=d,e[7]=N,e[8]=h):h=e[8];const{loading:I,error:R,data:g}=T(D,h);let c,f,u,m,v,w,k;if(e[9]!==o||e[10]!==p||e[11]!==R||e[12]!==I||e[13]!==g){const x=g===void 0?{}:g,{items:A}=x&&x.filterFollows||{},V=A===void 0?[]:A;c=B.Provider,v=o,w=p,k=I,f=R,u=!I,m=V.reduce(K,{}),e[9]=o,e[10]=p,e[11]=R,e[12]=I,e[13]=g,e[14]=c,e[15]=f,e[16]=u,e[17]=m,e[18]=v,e[19]=w,e[20]=k}else c=e[14],f=e[15],u=e[16],m=e[17],v=e[18],w=e[19],k=e[20];let F;e[21]!==S||e[22]!==f||e[23]!==u||e[24]!==m||e[25]!==v||e[26]!==w||e[27]!==k||e[28]!==l?(F={actionCreateFollow:v,actionDeleteFollow:w,loadingFollowList:k,error:f,loaded:u,items:m,followerId:l,isAllowed:S},e[21]=S,e[22]=f,e[23]=u,e[24]=m,e[25]=v,e[26]=w,e[27]=k,e[28]=l,e[29]=F):F=e[29];let y;return e[30]!==c||e[31]!==n||e[32]!==F?(y=j.jsx(c,{value:F,children:n}),e[30]=c,e[31]=n,e[32]=F,e[33]=y):y=e[33],y}function K(i,e){const{leaderId:n,...t}=e;return{...i,[n]:t}}export{Z as F,B as a,D as d};
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.