forked from duneanalytics/DuneQueryRepo
-
-
Notifications
You must be signed in to change notification settings - Fork 1
/
library-1b2d33e0dd409136.js.download
2 lines (2 loc) · 6.27 KB
/
library-1b2d33e0dd409136.js.download
1
2
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6924],{6851:function(e,r,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/workspace/library",function(){return n(31261)}])},58789:function(e,r,n){"use strict";n.d(r,{a:function(){return c},u:function(){return s}});var t=n(85893),i=n(67294);let u=(0,i.createContext)(void 0);function s(e){return(0,t.jsx)(u.Provider,{value:e.value,children:e.children})}function c(){let e=(0,i.useContext)(u);if(void 0===e)throw Error("Attempted to use LoggedInContext outside it's provider!");return e}},5228:function(e,r,n){"use strict";n.d(r,{c:function(){return f}});var t=n(85893),i=n(37242),u=n(11163),s=n(67294),c=n(57831),o=n(85361),l=n(58789),a=n(10475),d=n(71909);function f(e){return function(r){let n=(0,u.useRouter)(),f=(0,d.J)(),{session:h,sessionLoading:x}=(0,s.useContext)(c.B3),j=(0,o._0)(),v=(0,s.useMemo)(()=>(null==h?void 0:h.user)?{...h,user:h.user}:void 0,[h]);return x||(0,a.s$)()||!n.isReady?(0,t.jsx)(i.h,{}):v?j?(0,t.jsx)(l.u,{value:{activeContext:j,session:v},children:(0,t.jsx)(e,{...r})}):(0,t.jsx)(i.h,{}):(n.replace(f),(0,t.jsx)(i.h,{}))}}},36986:function(e,r,n){"use strict";n.d(r,{a:function(){return t.a},c:function(){return i.c}});var t=n(58789),i=n(5228)},55395:function(e,r,n){"use strict";n.d(r,{v:function(){return p}});var t=n(85893),i=n(31821),u=n(37242),s=n(40804),c=n(80403),o=n(55860),l=n(90888),a=n(36986),d=n(89941),f=n(18035);function h(e){let{teams:r,subPath:n=""}=e,{session:i,activeContext:u}=(0,a.a)(),s=(0,d.Y)(r,u),{user:c}=i;return(0,t.jsxs)(l.im,{children:[(0,t.jsxs)(l.ck,{children:[(0,t.jsx)(l.s1,{user:c}),(0,t.jsx)(l.DL,{theme:"secondary",user:c,getRootUrl:f.Y,subPath:n,children:"My library"})]}),s.map(e=>(0,t.jsxs)(l.ck,{children:[(0,t.jsx)(l.r,{team:e}),(0,t.jsx)(l.Mk,{theme:"primary",team:e,getRootUrl:f.Y,subPath:n,children:"Team library"})]},e.id))]})}var x=n(4564),j=n(31544),v=n.n(j),m=n(45466);function p(e){let{subPath:r=""}=e,{session:n}=(0,a.a)(),l=(0,m.MI)(n);if(l.loading)return(0,t.jsx)(u.h,{});if(0===l.list.length)return(0,t.jsx)(s.Z,{href:(0,f.Y)({type:"user",handle:n.user.name})+r});let d=l.list;return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(i.yG,{title:"Select context | Library"}),(0,t.jsxs)(o.T,{children:[(0,t.jsx)(c.h,{}),(0,t.jsx)(o.o,{children:(0,t.jsx)(x.uN,{size:"M",label:"Select context",content:(0,t.jsxs)("div",{className:v().body,children:[(0,t.jsxs)("div",{className:v().header,children:[(0,t.jsx)("div",{className:v().titleRow,children:(0,t.jsx)("h2",{children:"Library"})}),(0,t.jsxs)("p",{className:v().description,children:["You have a personal library, and a library for"," ",1===d.length?"your team":"each of your teams","."]})]}),(0,t.jsx)(h,{teams:d,subPath:r})]})})})]})]})}},90888:function(e,r,n){"use strict";n.d(r,{DL:function(){return h},Mk:function(){return x},ck:function(){return a},im:function(){return l},r:function(){return v},s1:function(){return j},xv:function(){return d}});var t=n(85893),i=n(74869),u=n.n(i),s=n(43953),c=n(61857),o=n(68357);function l(e){return(0,t.jsx)("ul",{className:u().contextList,children:e.children})}function a(e){return(0,t.jsx)("li",{children:e.children})}function d(e){return(0,t.jsx)("span",{children:e.children})}function f(e){let{theme:r,href:n,children:i}=e;return(0,t.jsxs)(o.L,{size:"M",theme:r,href:n,insideText:!0,children:[i,(0,t.jsx)(s.IconArrowRight,{})]})}function h(e){let{user:r,getRootUrl:n,subPath:i="",children:u}=e;return(0,t.jsx)(f,{theme:"secondary",href:n(m(r))+i,children:u})}function x(e){let{team:r,getRootUrl:n,subPath:i="",children:u}=e;return(0,t.jsx)(f,{theme:"primary",href:n(p(r))+i,children:u})}function j(e){return(0,t.jsx)(c.i,{size:"L",color:"text-primary",owner:m(e.user)})}function v(e){return(0,t.jsx)(c.i,{size:"L",color:"text-primary",owner:p(e.team)})}function m(e){var r;return{type:"user",id:e.id,handle:e.name,profile_image_url:null!==(r=e.profileImageUrl)&&void 0!==r?r:void 0}}function p(e){var r;return{type:"team",id:e.id,handle:e.handle,profile_image_url:null!==(r=e.profileImageUrl)&&void 0!==r?r:void 0}}},55860:function(e,r,n){"use strict";n.d(r,{T:function(){return s},o:function(){return c}});var t=n(85893),i=n(96272),u=n.n(i);function s(e){return(0,t.jsx)("div",{className:u().page,children:e.children})}function c(e){return(0,t.jsx)("main",{children:e.children})}},89941:function(e,r,n){"use strict";n.d(r,{Y:function(){return i}});var t=n(31269);function i(e,r){let n=e=>e.id===r.id;return"team"===r.type?[e.find(n),...e.filter((0,t.ff)(n))].filter(e=>!!e):e}},40804:function(e,r,n){"use strict";n.d(r,{Z:function(){return o}});var t=n(85893),i=n(80403),u=n(31821),s=n(34201),c=n(20705);let o=e=>(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(u.yG,{title:"Dune"}),(0,t.jsx)(i.h,{}),(0,t.jsx)(s.r,{size:"md",children:(0,t.jsx)(c.l,{...e})})]})},20705:function(e,r,n){"use strict";n.d(r,{l:function(){return l},p:function(){return a}});var t=n(85893),i=n(67294),u=n(15490),s=n(51577),c=n(11163),o=n(71909);let l=e=>{let{replace:r,push:n}=(0,c.useRouter)(),o=!e.href.startsWith("/");return i.useEffect(()=>{e.replace&&o?window.location.replace(e.href):e.replace?r(e.href).catch(s.k.error):o?window.location.href=e.href:n(e.href).catch(s.k.error)},[e.href,o]),(0,t.jsx)(u.g,{})},a=()=>{let e=(0,o.J)();return(0,t.jsx)(l,{href:e})}},43953:function(e,r,n){"use strict";n.r(r),n.d(r,{IconArrowRight:function(){return i}});var t=n(85893);function i(){return(0,t.jsx)("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,t.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M1 8C1 7.72386 1.22386 7.5 1.5 7.5L13.2929 7.5L10.1464 4.35355C9.95118 4.15829 9.95118 3.84171 10.1464 3.64645C10.3417 3.45118 10.6583 3.45118 10.8536 3.64645L14.8536 7.64645C15.0488 7.84171 15.0488 8.15829 14.8536 8.35355L10.8536 12.3536C10.6583 12.5488 10.3417 12.5488 10.1464 12.3536C9.95118 12.1583 9.95118 11.8417 10.1464 11.6464L13.2929 8.5H1.5C1.22386 8.5 1 8.27614 1 8Z",fill:"currentColor"})})}},31261:function(e,r,n){"use strict";n.r(r);var t=n(55395),i=n(36986);r.default=(0,i.c)(t.v)},74869:function(e){e.exports={contextList:"ContextList_contextList__01nPR"}},96272:function(e){e.exports={page:"Layout_page__OSS3e"}}},function(e){var r=function(r){return e(e.s=r)};e.O(0,[9225,3318,8110,3295,777,6746,1444,9002,9938,9694,9774,2888,179],function(){return r(73611),r(6851)}),_N_E=e.O()}]);
//# sourceMappingURL=library-1b2d33e0dd409136.js.map