PageSourceSearch

https://brickfilms.com/assets/Homepage-Q86P4Fss.js

js brickfilms.com collected 2026-10-01 11:33:19 UTC 24,311 bytes, 116 lines download raw bytes

1import{o as e}from"./rolldown-runtime-C0FnF6B9.js";import{A as t,L as n,M as r,P as i,c as a,t as o}from"./jsx-runtime-By_aJMXI.js";import{t as s}from"./react-DiVRNtpo.js";import{n as c,t as l}from"./withTranslation-CWGDH_j9.js";import{Bn as u,lr as d}from"./pro-solid-svg-icons-CrSqfV4d.js";import{t as f}from"./Action-yeta1Ycy.js";import{t as p}from"./Loader-B2ElroUC.js";import{t as m}from"./ScrollableList-DIipydiB.js";import{t as h}from"./isEaster-Ck7b95c9.js";import{$ as g,H as _,I as ee,K as te,Q as v,Z as y,at as b,dt as x,g as S,ot as C,r as w,st as T,u as E,w as D,x as O,y as k}from"./index-C4Fz2al5.js";import{t as A}from"./Card-CGYOwc1w.js";import{t as j}from"./PartnersList-Bm2EiFwn.js";import{t as ne}from"./useLayoutUpdate-CnF_nUl3.js";import{t as M}from"./CardGrid-CPIq1LHq.js";import{t as N}from"./GenericCard-DOrezV0I.js";import{t as P}from"./BrickfilmCard-CIw7b-pO.js";import{t as F}from"./ContestCard-CcL--7JF.js";import{n as I,t as re}from"./ResponsiveBreakLine-KkeWxM5c.js";import{t as L}from"./HeadingWithAction-D7pb1MxZ.js";import{t as R}from"./ActivityFeed-mQGUQJ6S.js";import{t as z}from"./ResourceBanner-CofZv2Uo.js";var B=e(s()),V=o(),H=({id:e=null,title:t=``,isSkeleton:n=!1,link:r=null,picture:i=null})=>(0,V.jsx)(N,{id:e,isSkeleton:n,type:`EXTERNAL_VIDEO`,action:r,title:t,picture:i,author:!1,publishedAt:!1}),U=[{id:`sixmonths`,condition:()=>new Date().getDate()>=7&&new Date().getDate()<=14&&new Date().getFullYear()==2023&&new Date().getMonth()===6,video:`https://assets.brickfilms.com/assets/background-CsSKNWWm.mp4`,picture:[{format:`jpeg`,size:59091,url:`https://assets.brickfilms.com/assets/background-DyWv8F0V.jpg`,width:1280,height:720,hasAlpha:!1},{format:`webp`,size:28060,url:`https://assets.brickfilms.com/assets/background-CCBjEbUT.webp`,width:1280,height:720,hasAlpha:!1},{format:`avif`,size:19085,url:`https://assets.brickfilms.com/assets/background-C_7np_g5.avif`,width:1280,height:720,hasAlpha:!1}]},{id:`may4th`,condition:()=>new Date().getDate()===4&&new Date().getMonth()===4,video:`https://assets.brickfilms.com/assets/background-D4QV5kXc.mp4`,picture:[{format:`jpeg`,size:67059,url:`https://assets.brickfilms.com/assets/background-0hDPr1lH.jpg`,width:1280,height:720,hasAlpha:!1},{format:`webp`,size:32212,url:`https://assets.brickfilms.com/assets/background-C1b8udlD.webp`,width:1280,height:720,hasAlpha:!1},{format:`avif`,size:24228,url:`https://assets.brickfilms.com/assets/background-r5y5LwBn.avif`,width:1280,height:720,hasAlpha:!1}]},{id:`valentinesday`,condition:()=>new Date().getDate()===14&&new Date().getMonth()===1,video:`https://assets.brickfilms.com/assets/background-DCJSTf28.mp4`,picture:[{format:`jpeg`,size:60202,url:`https://assets.brickfilms.com/assets/background-Ddfcnmu2.jpg`,width:1280,height:720,hasAlpha:!1},{format:`webp`,size:27414,url:`https://assets.brickfilms.com/assets/background-BB0-mRGJ.webp`,width:1280,height:720,hasAlpha:!1},{format:`avif`,size:18986,url:`https://assets.brickfilms.com/assets/background-DYlk2u68.avif`,width:1280,height:720,hasAlpha:!1}]},{id:`christmas`,condition:()=>new Date().getMonth()===11||new Date().getDate()<=6&&new Date().getMonth()===0,video:`https://assets.brickfilms.com/assets/background-CxGdIY1t.mp4`,picture:[{format:`jpeg`,size:84112,url:`https://assets.brickfilms.com/assets/background-BvwWOz_s.jpg`,width:1280,height:720,hasAlpha:!1},{format:`webp`,size:45062,url:`https://assets.brickfilms.com/assets/background-Bw_rFxGp.webp`,width:1280,height:720,hasAlpha:!1},{format:`avif`,size:32495,url:`https://assets.brickfilms.com/assets/background-BC15OoGq.avif`,width:1280,height:720,hasAlpha:!1}]},{id:`easter`,condition:()=>h(),video:`https://assets.brickfilms.com/assets/background-BMeOE8NH.mp4`,picture:[{format:`jpeg`,size:100640,url:`https://assets.brickfilms.com/assets/background-DM7mUlQC.jpg`,width:1280,height:720,hasAlpha:!1},{format:`webp`,size:55944,url:`https://assets.brickfilms.com/assets/background-Aa0PvqI0.webp`,width:1280,height:720,hasAlpha:!1},{format:`avif`,size:37508,url:`https://assets.brickfilms.com/assets/background-DWQcZeFV.avif`,width:1280,height:720,hasAlpha:!1}]},{id:`brickstars2025`,condition:()=>new Date().getFullYear()>=2026,video:`https://assets.brickfilms.com/assets/background-B--BZ2uS.mp4`,picture:[{format:`jpeg`,size:82329,url:`https://assets.brickfilms.com/assets/background-D0xQ_EDc.jpg`,width:1280,height:720,hasAlpha:!1},{format:`webp`,size:47684,url:`https://assets.brickfilms.com/assets/background-BOixH6I3.webp`,width:1280,height:720,hasAlpha:!1},{format:`avif`,size:30129,url:`https://assets.brickfilms.com/assets/background-D9rr-4H0.avif`,width:1280,height:720,hasAlpha:!1}]},{id:`brickstars2024`,condition:()=>new Date().getFullYear()>=2025,video:`https://assets.brickfilms.com/assets/background-Def4eweZ.mp4`,picture:[{format:`jpeg`,size:102921,url:`https://assets.brickfilms.com/assets/background-Bfd594XR.jpg`,width:1280,height:720,hasAlpha:!1},{format:`webp`,size:59004,url:`https://assets.brickfilms.com/assets/background-Bc6YLGbd.webp`,width:1280,height:720,hasAlpha:!1},{format:`avif`,size:36386,url:`https://assets.brickfilms.com/assets/background-ChcUj0I6.avif`,width:1280,height:720,hasAlpha:!1}]},{id:`brickstars2023`,condition:()=>new Date().getFullYear()>=2024,video:`https://assets.brickfilms.com/assets/background-Bd44tgYU.mp4`,picture:[{format:`jpeg`,size:60938,url:`https://assets.brickfilms.com/assets/background-CPMsoXRJ.jpg`,width:1280,height:720,hasAlpha:!1},{format:`webp`,size:27602,url:`https://assets.brickfilms.com/assets/background-CgHoZEAU.webp`,width:1280,height:720,hasAlpha:!1},{format:`avif`,size:21396,url:`https://assets.brickfilms.com/assets/background-DDXNHvbH.avif`,width:1280,height:720,hasAlpha:!1}]},{id:`default`,video:`https://assets.brickfilms.com/assets/background-COKKvuNK.mp4`,picture:[{format:`jpeg`,size:48732,url:`https://assets.brickfilms.com/assets/background-GFSMaRa4.jpg`,width:1280,height:720,hasAlpha:!1},{format:`webp`,size:22744,url:`https://assets.brickfilms.com/assets/background-CYJz8RSI.webp`,width:1280,height:720,hasAlpha:!1},{format:`avif`,size:16319,url:`https://assets.brickfilms.com/assets/background-Cce6-d3z.avif`,width:1280,height:720,hasAlpha:!1}]}],W=()=>{let e=U.filter(e=>e.id!=="default");for(let t of e)if(t.condition&&typeof t.condition==`function`&&t.condition())return t;return U.find(e=>e.id==="default")},G=`_banner_csmge_1`,K=`_content_csmge_15`,q=`_video_csmge_33`,J=`_overlay_csmge_41`,Y=`_scroll_csmge_48`,ie=`_logo_csmge_58`,ae=`_description_csmge_70`,oe=`_buttons_csmge_102`,se=l()(({t:e,children:t,onObtainBadge:n})=>
1{let r=(0,B.useRef)(null),i=W(),a=()=>{var e;window.scrollTo({top:(r==null||(e=r.current)==null?void 0:e.offsetHeight)||0,behavior:`smooth`})},o=()=>{n(`d76c9c1f-51f8-418f-a13c-8eb70d3a9121`)},{currentInterfaceLanguage:s}=b();return(0,V.jsxs)(`div`,{className:G,ref:r,children:[(0,V.jsx)(`video`,{className:q,poster:O(i.picture),src:i.video,muted:!0,loop:!0,autoPlay:!0,onError:()=>{},playsInline:!0,disablePictureInPicture:!0}),(0,V.jsx)(`div`,{className:J}),(0,V.jsxs)(`div`,{className:K,children:[(0,V.jsx)(`div`,{className:ie,onClick:o,children:(0,V.jsx)(D,{language:s,title:e(`Brickfilms.com by Brick à Brack`)})}),(0,V.jsx)(`div`,{className:ae,children:e(`Since 2000, Brickfilms.com has been the leading resource for all Brickfilmers, from beginners to experts.`)}),(0,V.jsx)(v,{scrollable:!1,className:oe,children:t})]}),(0,V.jsx)(f,{action:a,children:(0,V.jsx)(I,{className:Y})})]})}),ce=`query GetFeedQuery {
2  ... @defer {
3    feed(first: 100) {
4      edges {
5        node {
6          id
7          type
8          user {
9            id
10            role
11            login
12            slug
13            picture
14          }
15          arguments {
16            name
17            value
18          }
19          createdAt
20        }
21      }
22    }
23  }
24}
25`,X={kind:`Document`,definitions:[{kind:`OperationDefinition`,operation:`query`,name:{kind:`Name`,value:`GetFeedQuery`},selectionSet:{kind:`SelectionSet`,selections:[{kind:`InlineFragment`,directives:[{kind:`Directive`,name:{kind:`Name`,value:`defer`}}],selectionSet:{kind:`SelectionSet`,selections:[{kind:`Field`,name:{kind:`Name`,value:`feed`},arguments:[{kind:`Argument`,name:{kind:`Name`,value:`first`},value:{kind:`IntValue`,value:`100`}}],selectionSet:{kind:`SelectionSet`,selections:[{kind:`Field`,name:{kind:`Name`,value:`edges`},selectionSet:{kind:`SelectionSet`,selections:[{kind:`Field`,name:{kind:`Name`,value:`node`},selectionSet:{kind:`SelectionSet`,selections:[{kind:`Field`,name:{kind:`Name`,value:`id`}},{kind:`Field`,name:{kind:`Name`,value:`type`}},{kind:`Field`,name:{kind:`Name`,value:`user`},selectionSet:{kind:`SelectionSet`,selections:[{kind:`Field`,name:{kind:`Name`,value:`id`}},{kind:`Field`,name:{kind:`Name`,value:`role`}},{kind:`Field`,name:{kind:`Name`,value:`login`}},{kind:`Field`,name:{kind:`Name`,value:`slug`}},{kind:`Field`,name:{kind:`Name`,value:`picture`}}]}},{kind:`Field`,name:{kind:`Name`,value:`arguments`},selectionSet:{kind:`SelectionSet`,selections:[{kind:`Field`,name:{kind:`Name`,value:`name`}},{kind:`Field`,name:{kind:`Name`,value:`value`}}]}},{kind:`Field`,name:{kind:`Name`,value:`createdAt`}}]}}]}}]}}]}}]}}],loc:{start:0,end:389}};X.loc.source={name:`GraphQL request`,locationOffset:{line:1,column:1}},X.loc.source.body=ce;var le=`#import "../../fragments/UserFragment.graphql"
26
27query GetHomepageQuery($brickfilmsFilter: BrickfilmsFilter, $bannersFilter: BannersFilter) {
28  banners(filter: $bannersFilter) {
29    edges {
30      node {
31        isPublished
32        id
33        language
34        picture
35        text
36        type
37        target
38      }
39    }
40  }
41  brickfilms(first: 10, filter: $brickfilmsFilter) {
42    edges {
43      node {
44        id
45        ... on Brickfilm {
46          author {
47            ...UserFragment
48          }
49          boostEndsAt
50          type
51          title
52          slug
53          runtime
54          containsExplicitContent
55          picture
56          allowedActions
57        }
58      }
59    }
60  }
61  socialContents(first: 15) {
62    edges {
63      node {
64        id
65        title
66        type
67        reference
68        releasedAt
69        link
70        picture
71        language
72      }
73    }
74  }
75  contests(first: 15, filter: { isFutureRelevant: true, isDraft: false }) {
76    edges {
77      node {
78        picture
79        background
80        id
81        shortTitle
82        title
83        slug
84        type
85        year
86        mode
87        isEntryRegistrationAllowed
88        website {
89          id
90          name
91          color
92          link
93          code
94        }
95        startDate
96        endDate
97      }
98    }
99  }
100}
101`,Z={kind:`Document`,definitions:[{kind:`OperationDefinition`,operation:`query`,name:{kind:`N
101ame`,value:`GetHomepageQuery`},variableDefinitions:[{kind:`VariableDefinition`,variable:{kind:`Variable`,name:{kind:`Name`,value:`brickfilmsFilter`}},type:{kind:`NamedType`,name:{kind:`Name`,value:`BrickfilmsFilter`}}},{kind:`VariableDefinition`,variable:{kind:`Variable`,name:{kind:`Name`,value:`bannersFilter`}},type:{kind:`NamedType`,name:{kind:`Name`,value:`BannersFilter`}}}],selectionSet:{kind:`SelectionSet`,selections:[{kind:`Field`,name:{kind:`Name`,value:`banners`},arguments:[{kind:`Argument`,name:{kind:`Name`,value:`filter`},value:{kind:`Variable`,name:{kind:`Name`,value:`bannersFilter`}}}],selectionSet:{kind:`SelectionSet`,selections:[{kind:`Field`,name:{kind:`Name`,value:`edges`},selectionSet:{kind:`SelectionSet`,selections:[{kind:`Field`,name:{kind:`Name`,value:`node`},selectionSet:{kind:`SelectionSet`,selections:[{kind:`Field`,name:{kind:`Name`,value:`isPublished`}},{kind:`Field`,name:{kind:`Name`,value:`id`}},{kind:`Field`,name:{kind:`Name`,value:`language`}},{kind:`Field`,name:{kind:`Name`,value:`picture`}},{kind:`Field`,name:{kind:`Name`,value:`text`}},{kind:`Field`,name:{kind:`Name`,value:`type`}},{kind:`Field`,name:{kind:`Name`,value:`target`}}]}}]}}]}},{kind:`Field`,name:{kind:`Name`,value:`brickfilms`},arguments:[{kind:`Argument`,name:{kind:`Name`,value:`first`},value:{kind:`IntValue`,value:`10`}},{kind:`Argument`,name:{kind:`Name`,value:`filter`},value:{kind:`Variable`,name:{kind:`Name`,value:`brickfilmsFilter`}}}],selectionSet:{kind:`SelectionSet`,selections:[{kind:`Field`,name:{kind:`Name`,value:`edges`},selectionSet:{kind:`SelectionSet`,selections:[{kind:`Field`,name:{kind:`Name`,value:`node`},selectionSet:{kind:`SelectionSet`,selections:[{kind:`Field`,name:{kind:`Name`,value:`id`}},{kind:`InlineFragment`,typeCondition:{kind:`NamedType`,name:{kind:`Name`,value:`Brickfilm`}},selectionSet:{kind:`SelectionSet`,selections:[{kind:`Field`,name:{kind:`Name`,value:`author`},selectionSet:{kind:`SelectionSet`,selections:[{kind:`FragmentSpread`,name:{kind:`Name`,value:`UserFragment`}}]}},{kind:`Field`,name:{kind:`Name`,value:`boostEndsAt`}},{kind:`Field`,name:{kind:`Name`,value:`type`}},{kind:`Field`,name:{kind:`Name`,value:`title`}},{kind:`Field`,name:{kind:`Name`,value:`slug`}},{kind:`Field`,name:{kind:`Name`,value:`runtime`}},{kind:`Field`,name:{kind:`Name`,value:`containsExplicitContent`}},{kind:`Field`,name:{kind:`Name`,value:`picture`}},{kind:`Field`,name:{kind:`Name`,value:`allowedActions`}}]}}]}}]}}]}},{kind:`Field`,name:{kind:`Name`,value:`socialContents`},arguments:[{kind:`Argument`,name:{kind:`Name`,value:`first`},value:{kind:`IntValue`,value:`15`}}],selectionSet:{kind:`SelectionSet`,selections:[{kind:`Field`,name:{kind:`Name`,value:`edges`},selectionSet:{kind:`SelectionSet`,selections:[{kind:`Field`,name:{kind:`Name`,value:`node`},selectionSet:{kind:`SelectionSet`,selections:[{kind:`Field`,name:{kind:`Name`,value:`id`}},{kind:`Field`,name:{kind:`Name`,value:`title`}},{kind:`Field`,name:{kind:`Name`,value:`type`}},{kind:`Field`,name:{kind:`Name`,value:`reference`}},{kind:`Field`,name:{kind:`Name`,value:`releasedAt`}},{kind:`Field`,name:{kind:`Name`,value:`link`}},{kind:`Field`,name:{kind:`Name`,value:`picture`}},{kind:`Field`,name:{kind:`Name`,value:`language`}}]}}]}}]}},{kind:`Field`,name:{kind:`Name`,value:`contests`},arguments:[{kind:`Argument`,name:{kind:`Name`,value:`first`},value:{kind:`IntValue`,value:`15`}},{kind:`Argument`,name:{kind:`Name`,value:`filter`},value:{kind:`ObjectValue`,fields:[{kind:`ObjectField`,name:{kind:`Name`,value:`isFutureRelevant`},value:{kind:`BooleanValue`,value:!0}},{kind:`ObjectField`,name:{kind:`Name`,value:`isDraft`},value:{kind:`BooleanValue`,value:!1}}]}}],selectionSet:{kind:`SelectionSet`,selections:[{kind:`Field`,name:{kind:`Name`,value:`edges`},selectionSet:{kind:`SelectionSet`,selections:[{kind:`Field`,name:{kind:`Name`,value:`node`},selectionSet:{kind:`SelectionSet`,selections:[{kind:`Field`,name:{kind:`Name`,value:`picture`}},{kind:`Field`,name:{kind:`Name`,value:`background`}},{kind:`Field`,name:{kind:`Name`,value:`id`}},{kind:`Field`,name:{kind:`Name`,value:`shortTitle`}}
101,{kind:`Field`,name:{kind:`Name`,value:`title`}},{kind:`Field`,name:{kind:`Name`,value:`slug`}},{kind:`Field`,name:{kind:`Name`,value:`type`}},{kind:`Field`,name:{kind:`Name`,value:`year`}},{kind:`Field`,name:{kind:`Name`,value:`mode`}},{kind:`Field`,name:{kind:`Name`,value:`isEntryRegistrationAllowed`}},{kind:`Field`,name:{kind:`Name`,value:`website`},selectionSet:{kind:`SelectionSet`,selections:[{kind:`Field`,name:{kind:`Name`,value:`id`}},{kind:`Field`,name:{kind:`Name`,value:`name`}},{kind:`Field`,name:{kind:`Name`,value:`color`}},{kind:`Field`,name:{kind:`Name`,value:`link`}},{kind:`Field`,name:{kind:`Name`,value:`code`}}]}},{kind:`Field`,name:{kind:`Name`,value:`startDate`}},{kind:`Field`,name:{kind:`Name`,value:`endDate`}}]}}]}}]}}]}}],loc:{start:0,end:1346}};Z.loc.source={name:`GraphQL request`,locationOffset:{line:1,column:1}},Z.loc.source.body=le,Z.definitions=(e=>{let t=Object.create(null);return e.filter(function(e){if(e.kind!==`FragmentDefinition`)return!0;let n=e.name.value;return!t[n]&&(t[n]=!0,!0)})})(Z.definitions.concat(E.definitions)),((e,t)=>{let n=(e,t)=>{if(e.kind===`FragmentSpread`)t.add(e.name.value);else if(e.kind===`VariableDefinition`){let n=e.type;n.kind===`NamedType`&&t.add(n.name.value)}return e&&`selectionSet`in e&&e.selectionSet&&e.selectionSet.selections.forEach(e=>{n(e,t)}),e&&`variableDefinitions`in e&&e.variableDefinitions&&e.variableDefinitions.forEach(e=>{n(e,t)}),e&&`definitions`in e&&e.definitions&&e.definitions.forEach(e=>{n(e,t)}),t},r=e=>{let t=Object.create(null);return e.definitions.forEach(function(e){`name`in e&&e.name&&(t[e.name.value]=n(e,new Set))}),t},i=(e,t)=>{for(let n=0;n<e.definitions.length;n++){let r=e.definitions[n];if(r&&`name`in r&&r.name&&r.name.value===t)return r}},a=r(e),o=i(e,t);if(!o)throw Error(`vite-plugin-graphql-loader: operation "${t}" not found in document`);let s=Object.assign({},e,{definitions:[o]}),c=a[t]||new Set,l=new Set,u=new Set;for(c.forEach(e=>{u.add(e)});u.size>0;){let e=u;u=new Set,e.forEach(e=>{l.has(e)||(l.add(e),(a[e]||new Set).forEach(e=>{u.add(e)}))})}return l.forEach(t=>{let n=i(e,t);n&&s.definitions.push(n)}),s})(Z,`GetHomepageQuery`);var Q=`#import "../../fragments/UserFragment.graphql"
102
103query GetUsersQuery {
104  users(filter: { isOnline: true }) {
105    edges {
106      node {
107        id
108        ... on User {
109          ...UserFragment
110        }
111      }
112    }
113  }
114}
115`,$={kind:`Document`,definitions:[{kind:`OperationDefinition`,operation:`query`,name:{kind:`Name`,value:`GetUsersQuery`},selectionSet:{kind:`SelectionSet`,selections:[{kind:`Field`,name:{kind:`Name`,value:`users`},arguments:[{kind:`Argument`,name:{kind:`Name`,value:`filter`},value:{kind:`ObjectValue`,fields:[{kind:`ObjectField`,name:{kind:`Name`,value:`isOnline`},value:{kind:`BooleanValue`,value:!0}}]}}],selectionSet:{kind:`SelectionSet`,selections:[{kind:`Field`,name:{kind:`Name`,value:`edges`},selectionSet:{kind:`SelectionSet`,selections:[{kind:`Field`,name:{kind:`Name`,value:`node`},selectionSet:{kind:`SelectionSet`,selections:[{kind:`Field`,name:{kind:`Name`,value:`id`}},{kind:`InlineFragment`,typeCondition:{kind:`NamedType`,name:{kind:`Name`,value:`User`}},selectionSet:{kind:`SelectionSet`,selections:[{kind:`FragmentSpread`,name:{kind:`Name`,value:`UserFragment`}}]}}]}}]}}]}}]}}],loc:{start:0,end:260}};$.loc.source={name:`GraphQL request`,locationOffset:{line:1,column:1}},$.loc.source.body=Q,$.definitions=(e=>{let t=Object.create(null);return e.filter(function(e){if(e.kind!==`FragmentDefinition`)return!0;let n=e.name.value;return!t[n]&&(t[n]=!0,!0)})})($.definitions.concat(E.definitions)),((e,t)=>{let n=(e,t)=>{if(e.kind===`FragmentSpread`)t.add(e.name.value);else if(e.kind===`VariableDefinition`){let n=e.type;n.kind===`NamedType`&&t.add(n.name.value)}return e&&`selectionSet`in e&&e.selectionSet&&e.selectionSet.selections.forEach(e=>{n(e,t)}),e&&`variableDefinitions`in e&&e.variableDefinitions&&e.variableDefinitions.forEach(e=>{n(e,t)}),e&&`definitions`in e&&e.definitions&&e.definitions.forEach(e=>{n(e,t)}),t},r=e=>{let t=Object.create(null);return e.definitions.forEach(function(e){`name`in e&&e.name&&(t[e.name.value]=n(e,new Set))}),t},i=(e,t)=>{for(let n=0;n<e.definitions.length;n++){let r=e.definitions[n];if(r&&`name`in r&&r.name&&r.name.value===t)return r}},a=r(e),o=i(e,t);if(!o)throw Error(`vite-plugin-graphql-loader: operation "${t}" not found in document`);let s=Object.assign({},e,{definitions:[o]}),c=a[t]||new Set,l=new Set,u=new Set;
115for(c.forEach(e=>{u.add(e)});u.size>0;){let e=u;u=new Set,e.forEach(e=>{l.has(e)||(l.add(e),(a[e]||new Set).forEach(e=>{u.add(e)}))})}return l.forEach(t=>{let n=i(e,t);n&&s.definitions.push(n)}),s})($,`GetUsersQuery`);var ue=`_userList_1n6jr_5`,de=e=>{let t=[...e||[]].sort((e,t)=>e.node.login<t.node.login?-1:+(e.node.login>t.node.login));return[...new Set([...t.filter(e=>e.node.role===`ADMINISTRATOR`),...t.filter(e=>e.node.role===`MODERATOR`),...t.filter(e=>e.node.role===`USER`&&e.node.isPremium),...t.filter(e=>e.node.role===`USER`&&!e.node.isPremium)].map(e=>e.node.id))].map(e=>t.find(t=>t.node.id===e))},fe=({currentUser:e=null})=>{var t,n;let{data:r,refetch:i}=x(X),{t:a}=c();return(0,B.useEffect)(()=>{let e=setInterval(()=>{i()},15e3);return()=>clearInterval(e)},[i]),(r==null||(t=r.feed)==null||(t=t.edges)==null?void 0:t.length)===0?null:(0,V.jsxs)(V.Fragment,{children:[(0,V.jsx)(L,{title:a(`Now on Brickfilms.com`)}),e&&!e.isPremium&&(0,V.jsx)(w,{action:`/offers/`,type:`PREMIUM`,children:a(`Subscribe to the premium plan for 3.99€/month to enjoy many benefits and help the community!`)}),(0,V.jsx)(R,{activities:(r==null||(n=r.feed)==null?void 0:n.edges)||[],isScrollable:!0})]})},pe=()=>{var e;let{data:t,refetch:n}=x($),{t:r}=c();(0,B.useEffect)(()=>{let e=setInterval(()=>{n()},15e3);return()=>clearInterval(e)},[n]);let i=(0,B.useMemo)(()=>{var e;return de(t==null||(e=t.users)==null?void 0:e.edges)},[t==null||(e=t.users)==null?void 0:e.edges]);return i.length===0?null:(0,V.jsxs)(V.Fragment,{children:[(0,V.jsx)(L,{title:r(`{{count}} online user`,{count:i.length}),actionTitle:r(`More stats`),action:`/stats/`}),(0,V.jsx)(A,{disablePadding:!0,children:(0,V.jsx)(m,{className:ue,shadow:`var(--comp-card-background-color)`,children:i.map(e=>(0,V.jsx)(k,{size:`56px`,...e.node},e.node.id))})})]})},me=l()(({t:e})=>{var o,s,c,l;ne({title:null});let[m,h]=(0,B.useState)(0),{currentContentLanguages:v,currentInterfaceLanguage:E}=b(),{user:D,obtainBadge:O}=S(),{loading:k,error:N,data:I}=x(Z,{variables:{brickfilmsFilter:{languages:v,type:`NOT_PROJECT`,isAbandoned:!1,isUnavailable:!1,numberOfBoostedBrickfilms:1},bannersFilter:{isPublished:!0,language:E,showOnHome:!0}},fetchPolicy:`cache-first`,nextFetchPolicy:`cache-first`}),R=[`BRICKPIRATE`],U=[`EUROBRICKS`,`THEBRICKFILMERSGUILD`],W=[`MINIFIGSME`,...R,...U],G=((I==null||(o=I.socialContents)==null||(o=o.edges)==null?void 0:o.map(({node:e})=>e))||[]).filter(e=>!e.language||v.includes(e.language));return(0,V.jsxs)(V.Fragment,{children:[(0,V.jsxs)(se,{onObtainBadge:O,children:[!D&&(0,V.jsxs)(V.Fragment,{children:[(0,V.jsx)(T,{action:`/sign-up/`,label:e(`Join the community`),icon:u,size:`LARGE`}),(0,V.jsx)(re,{})]}),(0,V.jsx)(T,{action:t,title:e(`Discord`),icon:ee,size:`LARGE`}),(0,V.jsx)(T,{action:n,title:e(`Youtube`),icon:y,size:`LARGE`}),(0,V.jsx)(T,{action:r,title:e(`Instagram`),icon:_,size:`LARGE`}),(0,V.jsx)(T,{action:i,title:e(`Tiktok`),icon:te,size:`LARGE`})]}),N&&(0,V.jsx)(C,{message:e(`An error occurred while loading homepage.`),icon:d}),!N&&!I&&k&&(0,V.jsx)(p,{}),!N&&I&&(0,V.jsxs)(g,{children:[(I==null||(s=I.banners)==null||(s=s.edges)==null?void 0:s.length)>0&&(0,V.jsxs)(V.Fragment,{children:[(0,V.jsx)(L,{title:e(`Today's hot news`)}),I==null||(c=I.banners)==null||(c=c.edges)==null?void 0:c.map(({node:e})=>{var t;return(e==null?void 0:e.type)===`IMAGE`?(0,V.jsx)(z,{type:`CUSTOM`,action:e.target,picture:e.picture,margin:!0},e.id):(0,V.jsx)(w,{action:e.target,type:e==null||(t=e.type)==null?void 0:t.toUpperCase(),children:e.text},e.id)})]}),I.contests.edges.length>0&&(0,V.jsxs)(V.Fragment,{children:[(0,V.jsx)(L,{title:e(`Current contests`),action:`/contests/`,actionTitle:e(`
115See all`)}),(0,V.jsxs)(M,{isScrollable:!0,children:[I.contests.edges.map(e=>(0,V.jsx)(F,{...e.node},e.node.id)),k&&!I&&Array(10).fill(0).map((e,t)=>(0,V.jsx)(F,{isSkeleton:!0},`skeleton-contest-${t}`))]})]}),(0,V.jsx)(fe,{currentUser:D}),(k&&!I||(I==null||(l=I.brickfilms)==null||(l=l.edges)==null?void 0:l.length)>0)&&(0,V.jsxs)(V.Fragment,{children:[(0,V.jsx)(L,{title:e(`Latest brickfilms`),actionTitle:e(`See all`),action:`/brickfilms/`}),(0,V.jsxs)(M,{isScrollable:!0,children:[I.brickfilms.edges.map(e=>(0,V.jsx)(P,{...e.node},e.node.id)),k&&!I&&Array(10).fill(0).map((e,t)=>(0,V.jsx)(P,{isSkeleton:!0},`skeleton-brickfilm-${t}`))]})]}),(k&&!I||G.length>0)&&(0,V.jsxs)(V.Fragment,{children:[(0,V.jsx)(L,{title:e(`On our social media`),actionTitle:e(`See all`),action:`https://www.youtube.com/@BrickfilmsCommunity`}),(0,V.jsxs)(M,{isScrollable:!0,children:[G.map(e=>(0,V.jsx)(H,{...e},e.id)),k&&!I&&Array(10).fill(0).map((e,t)=>(0,V.jsx)(H,{isSkeleton:!0},`skeleton-external-${t}`))]})]}),(0,V.jsx)(pe,{}),(0,V.jsx)(L,{title:e(`Partners`),actionTitle:e(`About us`),action:`/about-us/`}),(0,V.jsx)(A,{disablePadding:!0,children:(0,V.jsx)(j,{partners:W})}),(0,V.jsx)(f,{action:m>3?`/build`:()=>h(e=>e+1),className:`_build_1n6jr_25`,children:a})]})]})});export{me as default};
116//# sourceMappingURL=Homepage-Q86P4Fss.js.map

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.