orgmode-to-gemini-blog/exports/html/Récapitulatif de mon contenu twitter - Dragonfeu - Medium_fichiers/7880.b3d77a02.chunk.js
2024-11-03 11:06:34 +01:00

2 lines
20 KiB
JavaScript

"use strict";(self.webpackChunklite=self.webpackChunklite||[]).push([[7880],{48188:(e,n,a)=>{a.d(n,{Y:()=>U});var i=a(96540),t=a(54239),r=a(26118),l=a(2665),d=a(15706),o=a(64122),m=a(85764),s=a(37216),c=a(7580),u=a(52290),k=a(86527),p=a(86975),v=a(5600),g=a(36557),f=a(39410),N=a(72130),S=a(49287),y=a(44402),E=a(79429),b=a(51260),h=a(42976),x=a(50684),F=a(39160),w=a(85583),C=a(15371),D=a(42600),I=function(e){var n=e.catalog,a=e.breakpoints,t=n.listItemsConnection.items,r=(0,d.r)(a),l={xs:140,sm:166,md:90,lg:166},o={xs:105,sm:105,md:144,lg:144};return i.useMemo((function(){return i.createElement(d.G,{coverHeight:o[r],coverWidth:l[r],catalogItems:t,isEmbeded:!0,breakpoints:a})}),[r,t])},_=a(36469),O=a(88474),T=function(e){return{marginBottom:"1px","& path":{fill:e.colorTokens.foreground.neutral.secondary.base}}},A={position:"absolute",inset:"0",border:"none"},P={pointerEvents:"none"},U=function(e){var n=e.catalog,a=e.titleClamp,U=void 0===a?2:a,j=e.maxWidth,L=void 0===j?{xs:"100%",sm:"100%",md:"740px",lg:"740px",xl:"740px"}:j,R=e.marginBottom,M=void 0===R?"40px":R,G=e.breakpoints,W=n.name,z=n.visibility,V=n.id,B=n.predefined,H=n.creator,Y=(0,m.b5)(n),Z=z!==h.y_.PUBLIC,X=B?(0,C.cm)(B):W,q=(0,N.$L)(),K=(0,S.jI)(),Q=(0,t.zy)().pathname,$=(0,F.d4)((function(e){return e.navigation.referrer})),J=(0,x.MW)(),ee=(0,d.r)(G),ne=(0,E.s)({onPresentedFn:function(){q.event("list.presented",{listId:n.id,source:K,referrerSource:J,referrer:$||Q})}}),ae=(0,y.l)(),ie="sm"===ee||"xs"===ee,te=(0,b.Nw)("ShowUserList",{username:n.creator.username||"",catalogSlugId:(0,C.KY)(n)}),re=(0,o.f)(H),le=(0,O.E)(H);return i.createElement(u.a,{ref:ne,border:"neutral.primary",borderRadius:"4px",marginBottom:M,maxWidth:L,width:"100%",display:"flex",justifyContent:"space-between",backgroundColor:"BASE_LIGHT",flexDirection:ie?"column":"row",position:"relative",zIndex:0},i.createElement(k.N,{href:te,rules:A,"aria-label":n.name}),i.createElement(u.a,{key:V,display:"flex",flexDirection:"column",padding:"24px 24px 10px",flexGrow:"1",flexShrink:"0",flexBasis:"0",justifyContent:"space-between",wordBreak:"break-word"},i.createElement(p.D,{href:re,"aria-label":H.name||"List creator"},i.createElement(u.a,{display:"flex"},i.createElement(c.r,{miroId:H.imageId||D._3,alt:H.name||"",diameter:20,freezeGifs:!0}),i.createElement(u.a,{paddingLeft:"8px",zIndex:"1",display:"flex",alignItems:"center"},i.createElement(g.kZ,{scale:"M",color:"DARKER",clamp:1},H.name),le&&H.id&&i.createElement(_.G,{marginLeft:"2px",marginTop:"2px",size:"S",userId:H.id})))),i.createElement(u.a,{marginTop:"12px"},i.createElement(f.hE,{clamp:U,scale:{xs:"XS",sm:"XS",md:"S",lg:"S",xl:"S"}},X)),i.createElement(u.a,{display:"flex",alignItems:"center",justifyContent:"space-between"},i.createElement(u.a,{display:"flex",margin:"6px 0"},i.createElement(g.kZ,{scale:"S",color:"LIGHTER"},Y||"No stories"),Z&&i.createElement(u.a,{paddingLeft:"8px"},i.createElement(w.A,{className:ae(T)}))),i.createElement(u.a,{display:"flex",position:"relative"},i.createElement(s.b,{catalog:n}),i.createElement(r.hP,{catalog:n},i.createElement(v.G,{tooltipText:"More",targetDistance:10},i.createElement(l.o,{catalog:n})))))),i.createElement("div",{className:ae(P)},i.createElement(I,{catalog:n,breakpoints:G})))}},15706:(e,n,a)=>{a.d(n,{G:()=>h,r:()=>y});var i=a(80296),t=a(64467),r=a(96540),l=a(90280),d=a(77865),o=a(52290),m=a(20239),s=a(44402),c=a(66305),u=a(42976),k=a(39160),p=a(90383);function v(e,n){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);n&&(i=i.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),a.push.apply(a,i)}return a}function g(e){for(var n=1;n<arguments.length;n++){var a=null!=arguments[n]?arguments[n]:{};n%2?v(Object(a),!0).forEach((function(n){(0,t.A)(e,n,a[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(a)):v(Object(a)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(a,n))}))}return e}var f={xs:-40,sm:-40,md:-45,lg:-80},N={xs:-55,sm:-60,md:-65,lg:-130},S={xs:0,sm:350,md:490,lg:680},y=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:S,n=(0,k.d4)((function(e){return e.client.hydrated})),a=g(g({},S),e),t=r.useState("lg"),l=(0,i.A)(t,2),d=l[0],o=l[1];return r.useEffect((function(){var e=function(){window.innerWidth>=a.lg?o("lg"):window.innerWidth>=a.md?o("md"):window.innerWidth>=a.sm?o("sm"):window.innerWidth>=a.xs&&o("xs")};return n&&(e(),c.R5.on("resize",e)),function(){n&&c.R5.off("resize",e)}}),[n,a.lg,a.md,a.sm,a.xs]),d},E=function(e,n,a){return function(i){var t=a&&("xs"===n||"sm"===n),r=t?3*f[n]:N[n],l=1===e?"".concat(t?2*f[n]:f[n],"px"):2===e?"".concat(r,"px"):void 0;return{position:"relative",borderRight:e<2?"".concat(3,"px solid ").concat(i.colorTokens.background.neutral.tertiary.base):void 0,backgroundColor:i.colorTokens.background.neutral.tertiary.base,zIndex:3-e,marginLeft:l,paddingLeft:0===e?"0":"4px"}}},b=function(e){var n,a=e.catalogItem,i=e.width,t=e.height,s=e.isMobile,c=null==a?void 0:a.entity,u=(0,m.D)(),k=r.createElement(o.a,{height:"inherit",minHeight:"".concat(t,"px"),width:"".concat(i,"px"),background:u.colorTokens.background.neutral.secondary.base});return c&&"Post"===c.__typename&&null!==(n=c.previewImage)&&void 0!==n&&n.id&&(k=r.createElement(l.pg,{miroId:c.previewImage.id,alt:c.previewImage.alt||"",width:i,height:t,aspectRatio:s?l.l8.FourToThree:void 0,strategy:p.qY.Crop,loading:d.u.LAZY,rules:s?void 0:{height:"100%"}})),r.createElement(o.a,{height:"100%"},k)},h=function(e){var n=e.catalogItems,a=e.isEmbeded,i=void 0!==a&&a,t=e.coverWidth,l=e.coverHeight,d=e.breakpoints,m=(0,s.l)(),c=y(d),k=n.filter((function(e){var n,a=e.entity;return!("Post"!==(null==a?void 0:a.__typename)||null===(n=a.previewImage)||void 0===n||!n.id||a.visibility===u.dL.UNLISTED)})),p=[k[0],k[1],k[2]],v="sm"===c||"xs"===c,g=function(e,n){return 3*n+f[e]+N[e]+6}(c,t);return r.createElement(o.a,{display:"flex",overflow:"hidden",justifyContent:v?i?"space-between":"flex-start":"flex-end",width:v?"100%":"".concat(g,"px"),height:"100%",borderRadius:v?"0 0 3px 3px":"0 3px 3px 0",position:"relative",flexShrink:"0"},p.map((function(e,n){return r.createElement("div",{key:(null==e?void 0:e.catalogItemId)||n,className:m(E(n,c,i))},r.createElement(b,{isMobile:v,catalogItem:e,height:l,width:t}))})))}},47880:(e,n,a)=>{a.d(n,{O:()=>V});var i=a(45458),t=a(39181),r=a(96540),l=a(13397),d={kind:"Document",definitions:[{kind:"FragmentDefinition",name:{kind:"Name",value:"UserCatalogsScreen_catalog"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Catalog"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"CatalogsListItem_catalog"}}]}}].concat((0,i.A)(l.m.definitions))},o=a(59265),m=a(91339),s={kind:"Document",definitions:[{kind:"FragmentDefinition",name:{kind:"Name",value:"CatalogsMetadata_user"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"User"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"username"}},{kind:"FragmentSpread",name:{kind:"Name",value:"userUrl_user"}},{kind:"FragmentSpread",name:{kind:"Name",value:"UserProfileMetadataHelmet_user"}}]}}].concat((0,i.A)(o.v0.definitions),(0,i.A)(m.P.definitions))},c=a(83611),u=a(48049),k=a(16052),p={kind:"Document",definitions:[{kind:"FragmentDefinition",name:{kind:"Name",value:"UserCatalogs_catalog"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Catalog"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"UserCatalogsScreen_catalog"}},{kind:"FragmentSpread",name:{kind:"Name",value:"CatalogsMetadata_catalog"}}]}}].concat((0,i.A)(d.definitions),(0,i.A)([{kind:"FragmentDefinition",name:{kind:"Name",value:"CatalogsMetadata_catalog"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Catalog"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"predefined"}}]}}]))},v={kind:"Document",definitions:[{kind:"FragmentDefinition",name:{kind:"Name",value:"UserCatalogs_user"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"User"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"UserCatalogsScreen_user"}},{kind:"FragmentSpread",name:{kind:"Name",value:"PublisherHeader_publisher"}},{kind:"FragmentSpread",name:{kind:"Name",value:"CatalogsMetadata_user"}},{kind:"FragmentSpread",name:{kind:"Name",value:"SuspendedBannerLoader_user"}},{kind:"FragmentSpread",name:{kind:"Name",value:"useAnalytics_user"}}]}}].concat((0,i.A)([{kind:"FragmentDefinition",name:{kind:"Name",value:"UserCatalogsScreen_user"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"User"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"viewerEdge"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"isUser"}}]}}]}}]),(0,i.A)(c.J.definitions),(0,i.A)(s.definitions),(0,i.A)(u.x.definitions),(0,i.A)(k.W.definitions))},g=a(36042),f={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"UserCatalogsHandlerQuery"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"username"}},type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"id"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"pagingOptions"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"CatalogPagingOptionsInput"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"userResult"},arguments:[{kind:"Argument",name:{kind:"Name",value:"username"},value:{kind:"Variable",name:{kind:"Name",value:"username"}}},{kind:"Argument",name:{kind:"Name",value:"id"},value:{kind:"Variable",name:{kind:"Name",value:"id"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"User"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"FragmentSpread",name:{kind:"Name",value:"UserCatalogs_user"}},{kind:"FragmentSpread",name:{kind:"Name",value:"UserCanonicalizer_user"}},{kind:"Field",name:{kind:"Name",value:"viewerEdge"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"catalogsConnection"},arguments:[{kind:"Argument",name:{kind:"Name",value:"pagingOptions"},value:{kind:"Variable",name:{kind:"Name",value:"pagingOptions"}}},{kind:"Argument",name:{kind:"Name",value:"type"},value:{kind:"EnumValue",value:"LISTS"}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"Field",name:{kind:"Name",value:"catalogs"},selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"UserCatalogs_catalog"}}]}},{kind:"Field",name:{kind:"Name",value:"paging"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"Field",name:{kind:"Name",value:"nextPageCursor"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}}]}}]}}]}}]}}]}}]}}]}}].concat((0,i.A)(v.definitions),(0,i.A)(g.A.definitions),(0,i.A)(p.definitions))},N={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"UserReadingListQuery"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"userId"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",alias:{kind:"Name",value:"readingList"},name:{kind:"Name",value:"getPredefinedCatalog"},arguments:[{kind:"Argument",name:{kind:"Name",value:"userId"},value:{kind:"Variable",name:{kind:"Name",value:"userId"}}},{kind:"Argument",name:{kind:"Name",value:"type"},value:{kind:"EnumValue",value:"READING_LIST"}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"FragmentSpread",name:{kind:"Name",value:"UserCatalogs_catalog"}}]}}]}}].concat((0,i.A)(p.definitions))},S=a(22554),y=a(26365),E=a(51622),b=a(95765),h=a(35460),x=a(5009),F=a(99270),w=a(49287),C=a(65866),D=a(54625),I=a(37075),_=a(52290),O=a(28072),T=a(24023),A=a(54119),P=a(39160),U=a(15371),j=a(46879),L=function(e){var n,a=e.user,i=e.catalogs,t=(0,P.d4)((function(e){return e.config.authDomain})),l=(0,P.d4)((function(e){return e.config.productName})),d=a.username,o=a.customDomainState,m=a.name,s="".concat(null!=m?m:d," on ").concat(l," curated some lists"),c=i.slice(0,3).map((function(e){return e.predefined?(0,U.cm)(e.predefined):e.name})).join(", "),u="Start exploring ".concat(c).concat(i.length>3?" and more":""),k=d?(0,j.hOq)(d):null,p=null;return null!=o&&null!==(n=o.live)&&void 0!==n&&n.domain&&(p=(0,j.w5g)(a,t)),r.createElement(A.D,{user:a,path:k,url:p,title:s,description:u})},R=a(48188),M=a(30142),G=a(36557),W=function(e){var n=e.catalogs,a=e.user,i=e.fetchMore,t=n.length>0;return r.createElement(r.Fragment,null,t?r.createElement(_.a,{xs:{display:"flex",justifyContent:"center"},sm:{display:"flex",justifyContent:"center"}},r.createElement(M.i,{fetchMore:i},n.map((function(e,n){return r.createElement(w.Ne,{key:e.id,extendSource:!0,source:{index:n,catalogId:e.id}},r.createElement(R.Y,{catalog:e}))})))):r.createElement(_.a,{textAlign:"center",marginTop:"80px"},r.createElement(G.kZ,{scale:"L",tag:"div"},a.name," hasn't created any lists yet.")))},z=function(e){var n=e.user,a=e.fetchMore,i=e.catalogs;(0,D.s)(n);var t=i.filter(T.se).slice(0,4);return r.createElement(r.Fragment,null,r.createElement(I.f,{user:n}),r.createElement(L,{user:n,catalogs:t}),r.createElement(_.a,{backgroundColor:"BACKGROUND",display:"flex",flexDirection:"column",minHeight:"100vh"},r.createElement(C.s,{publisher:n}),r.createElement(_.a,{flexGrow:"1"},r.createElement(O.P,{size:"app"},r.createElement(W,{catalogs:i,user:n,fetchMore:a})))))},V=function(e){var n,a,l,d,o,m,s=e.params,c=e.sourceName,u=e.userId,k=(0,h.m)(s),p=k.id,v=k.username,g=u||p,C=(0,t.I)(f,{variables:{username:v,id:null!=g?g:"",pagingOptions:{limit:S.O1}},skip:!g&&!v}),D=C.data,I=C.loading,_=C.fetchMore,O=C.error,T="User"===(null==D||null===(n=D.userResult)||void 0===n?void 0:n.__typename)?D.userResult.id:g||"",A=(0,t.I)(N,{variables:{userId:null!=T?T:""},skip:!T}),P=A.data,U=A.loading,j=A.error,L=O||j;if(!I&&!T)return O?r.createElement(y.z,{error:O}):r.createElement(E.u,null);var R=!T;if(I||R)return r.createElement(b.x,null);if(U||I||R)return r.createElement(b.x,null);if(L)return r.createElement(y.z,{error:L});var M=null==D?void 0:D.userResult;if((0,x.H)(M))return r.createElement(x.T,{userResult:M});var G,W=null==M||null===(a=M.viewerEdge.catalogsConnection)||void 0===a?void 0:a.catalogs;if(W&&"Catalog"===(null==P||null===(l=P.readingList)||void 0===l?void 0:l.__typename)&&(W=[P.readingList].concat((0,i.A)(W))),null!=M&&null!==(d=M.viewerEdge.catalogsConnection)&&void 0!==d&&null!==(o=d.paging)&&void 0!==o&&o.nextPageCursor){var V=M.viewerEdge.catalogsConnection.paging.nextPageCursor.id;G=function(){return _({variables:{username:v,id:T,pagingOptions:{limit:S.O1,cursor:{id:V}}}})}}return r.createElement(F.Y,{user:M},r.createElement(w.Ne,{source:{name:c,authorId:T}},r.createElement(z,{user:M,fetchMore:G,catalogs:null!==(m=W)&&void 0!==m?m:[]})))}},54625:(e,n,a)=>{a.d(n,{s:()=>u});var i=a(96540),t=a(49912),r=a(21335),l=a(72130),d=a(49287),o=a(91830),m=a(50684),s=a(42600),c=a(90383),u=function(e){var n=(0,l.$L)(),a=(0,d.jI)(),u=(0,o.zF)(),k=(0,m.oC)(),p=(0,r.cd)(e),v=p.viewerEdge,g=p.loading,f=(null!=v?v:{}).isUser;(0,i.useEffect)((function(){n.event("profile.viewed",{profileId:e.id,source:a})}),[n,e.id,a]),(0,i.useEffect)((function(){g||"unsubscribe-newsletter"===k&&u(f?{duration:"NEXTPAGE",message:"You cannot unsubscribe from yourself."}:{duration:"NEXTPAGE",toastStyle:"NEWSLETTER_UNSUBSCRIBE",extraParams:{newsletterName:e.name||""}})}),[g,f]),(0,t.O)({data:{creatorViewerEdge:v,pageType:"profile",profileName:e.name,profilePhoto:(0,c.rP)({miroId:e.imageId||s._3,width:64,height:64,strategy:c.qY.Resample}),profileUsername:e.username},isBlocked:!!f,loading:g,show:!0})}},16052:(e,n,a)=>{a.d(n,{W:()=>i});var i={kind:"Document",definitions:[{kind:"FragmentDefinition",name:{kind:"Name",value:"useAnalytics_user"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"User"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"imageId"}},{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"username"}}]}}]}},48049:(e,n,a)=>{a.d(n,{W:()=>t,x:()=>i});var i={kind:"Document",definitions:[{kind:"FragmentDefinition",name:{kind:"Name",value:"SuspendedBannerLoader_user"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"User"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"isSuspended"}}]}}]},t={kind:"Document",definitions:[{kind:"FragmentDefinition",name:{kind:"Name",value:"SuspendedBannerLoader_post"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Post"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"isSuspended"}}]}}]}},37075:(e,n,a)=>{a.d(n,{f:()=>d});var i=a(96540),t=a(69733),r=a(75636),l=a(91830),d=function(e){var n=e.user,a=e.post,d=e.forceLoad,o=void 0!==d&&d,m=(0,t.wA)(),s=(0,r.z)({name:"can_view_suspended_content",placeholder:!1})||o;return i.useEffect((function(){s&&(n&&n.isSuspended?m((0,l.MZ)({duration:"NEXTPAGE",toastStyle:"USER_SUSPENDED"})):a&&a.isSuspended&&m((0,l.MZ)({duration:"NEXTPAGE",toastStyle:"POST_SUSPENDED"})))}),[s]),null}},36042:(e,n,a)=>{a.d(n,{A:()=>i});var i={kind:"Document",definitions:[{kind:"FragmentDefinition",name:{kind:"Name",value:"UserCanonicalizer_user"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"User"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"username"}},{kind:"Field",name:{kind:"Name",value:"hasSubdomain"}},{kind:"Field",name:{kind:"Name",value:"customDomainState"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"live"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"domain"}}]}}]}}]}}]}},99270:(e,n,a)=>{a.d(n,{Y:()=>u});var i=a(64467),t=a(96540),r=a(9942),l=a(50684),d=a(39160),o=a(79959),m=a(46879);function s(e,n){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);n&&(i=i.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),a.push.apply(a,i)}return a}function c(e){for(var n=1;n<arguments.length;n++){var a=null!=arguments[n]?arguments[n]:{};n%2?s(Object(a),!0).forEach((function(n){(0,i.A)(e,n,a[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(a)):s(Object(a)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(a,n))}))}return e}var u=function(e){var n,a,i,s=e.user,u=e.children,k=(0,d.d4)((function(e){return e.config.authDomain})),p=(0,d.d4)((function(e){return e.navigation.host})),v=(0,d.d4)((function(e){return e.navigation.currentLocation})),g=(0,d.d4)((function(e){return e.config.nodeEnv})),f=(0,o.GA)(),N=(0,l.MW)(),S=(0,l.oC)(),y=(0,l.WZ)(),E=s.username,b=s.hasSubdomain,h=null===(n=s.customDomainState)||void 0===n||null===(a=n.live)||void 0===a?void 0:a.domain;if(!h&&!b)return u;var x,F,w,C=c(c(c({},N?{source:N}:{}),y?{sk:y}:{}),S?{interstitial:S}:{});try{var D=new URL(v);x=D.protocol,F=D.host,w=D.pathname+D.search}catch(e){return u}var I=new RegExp("^/@".concat(E),"i"),_=null===(i=w)||void 0===i?void 0:i.replace(I,""),O="development"===g&&p.endsWith(":8080")?":8080":"",T="".concat(x,"//").concat(F),A="".concat(x,"//").concat(h).concat(O),P="".concat((0,m.MNO)(E,k)),U=A===T,j=null;return h&&!U?j="".concat(A).concat(_):b&&P!==T&&!U&&(j="".concat(P).concat(_)),j&&!f?t.createElement(r.r,{to:(0,o.ST)(j,C),replace:!0}):u}}}]);
//# sourceMappingURL=https://stats.medium.build/lite/sourcemaps/7880.b3d77a02.chunk.js.map