owncast/static/web/_next/static/chunks/3663.57c8df5f22ffb74b.js
2023-02-27 17:15:17 +00:00

1 line
No EOL
16 KiB
JavaScript
Vendored

(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3663],{80882:function(e,t,r){"use strict";r.d(t,{Z:function(){return i}});var n=r(1413),o=r(67294),a={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M884 256h-75c-5.1 0-9.9 2.5-12.9 6.6L512 654.2 227.9 262.6c-3-4.1-7.8-6.6-12.9-6.6h-75c-6.5 0-10.3 7.4-6.5 12.7l352.6 486.1c12.8 17.6 39 17.6 51.7 0l352.6-486.1c3.9-5.3.1-12.7-6.4-12.7z"}}]},name:"down",theme:"outlined"},c=r(42135),l=function(e,t){return o.createElement(c.Z,(0,n.Z)((0,n.Z)({},e),{},{ref:t,icon:a}))};l.displayName="DownOutlined";var i=o.forwardRef(l)},68795:function(e,t,r){"use strict";r.d(t,{Z:function(){return i}});var n=r(1413),o=r(67294),a={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M909.6 854.5L649.9 594.8C690.2 542.7 712 479 712 412c0-80.2-31.3-155.4-87.9-212.1-56.6-56.7-132-87.9-212.1-87.9s-155.5 31.3-212.1 87.9C143.2 256.5 112 331.8 112 412c0 80.1 31.3 155.5 87.9 212.1C256.5 680.8 331.8 712 412 712c67 0 130.6-21.8 182.7-62l259.7 259.6a8.2 8.2 0 0011.6 0l43.6-43.5a8.2 8.2 0 000-11.6zM570.4 570.4C528 612.7 471.8 636 412 636s-116-23.3-158.4-65.6C211.3 528 188 471.8 188 412s23.3-116.1 65.6-158.4C296 211.3 352.2 188 412 188s116.1 23.2 158.4 65.6S636 352.2 636 412s-23.3 116.1-65.6 158.4z"}}]},name:"search",theme:"outlined"},c=r(42135),l=function(e,t){return o.createElement(c.Z,(0,n.Z)((0,n.Z)({},e),{},{ref:t,icon:a}))};l.displayName="SearchOutlined";var i=o.forwardRef(l)},81643:function(e,t,r){"use strict";r.d(t,{Z:function(){return n}});var n=function(e){return e?"function"==typeof e?e():e:null}},57838:function(e,t,r){"use strict";r.d(t,{Z:function(){return a}});var n=r(97685),o=r(67294);function a(){var e=o.useReducer(function(e){return e+1},0);return(0,n.Z)(e,2)[1]}},24308:function(e,t,r){"use strict";r.d(t,{c4:function(){return a}});var n=r(4942),o=r(87462),a=["xxl","xl","lg","md","sm","xs"],c={xs:"(max-width: 575px)",sm:"(min-width: 576px)",md:"(min-width: 768px)",lg:"(min-width: 992px)",xl:"(min-width: 1200px)",xxl:"(min-width: 1600px)"},l=new Map,i=-1,s={};t.ZP={matchHandlers:{},dispatch:function(e){return s=e,l.forEach(function(e){return e(s)}),l.size>=1},subscribe:function(e){return l.size||this.register(),i+=1,l.set(i,e),e(s),i},unsubscribe:function(e){l.delete(e),l.size||this.unregister()},unregister:function(){var e=this;Object.keys(c).forEach(function(t){var r=c[t],n=e.matchHandlers[r];null==n||n.mql.removeListener(null==n?void 0:n.listener)}),l.clear()},register:function(){var e=this;Object.keys(c).forEach(function(t){var r=c[t],a=function(r){var a=r.matches;e.dispatch((0,o.Z)((0,o.Z)({},s),(0,n.Z)({},t,a)))},l=window.matchMedia(r);l.addListener(a),e.matchHandlers[r]={mql:l,listener:a},a(l)})}}},24093:function(e,t,r){"use strict";r.d(t,{C:function(){return j}});var n=r(87462),o=r(4942),a=r(71002),c=r(97685),l=r(94184),i=r.n(l),s=r(48555),u=r(42550),f=r(67294),p=r(53124),d=r(25378),m=r(24308),v=f.createContext("default"),h=function(e){var t=e.children,r=e.size;return f.createElement(v.Consumer,null,function(e){return f.createElement(v.Provider,{value:r||e},t)})},g=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&0>t.indexOf(n)&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var o=0,n=Object.getOwnPropertySymbols(e);o<n.length;o++)0>t.indexOf(n[o])&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]]);return r},x=f.forwardRef(function(e,t){var r,l,h,x=f.useContext(v),y=f.useState(1),Z=(0,c.Z)(y,2),w=Z[0],b=Z[1],j=f.useState(!1),E=(0,c.Z)(j,2),C=E[0],O=E[1],S=f.useState(!0),_=(0,c.Z)(S,2),N=_[0],P=_[1],k=f.useRef(null),z=f.useRef(null),F=(0,u.sQ)(t,k),R=f.useContext(p.E_).getPrefixCls,L=function(){if(z.current&&k.current){var t=z.current.offsetWidth,r=k.current.offsetWidth;if(0!==t&&0!==r){var n=e.gap,o=void 0===n?4:n;2*o<r&&b(r-2*o<t?(r-2*o)/t:1)}}};f.useEffect(function(){O(!0)},[]),f.useEffect(function(){P(!0),b(1)},[e.src]),f.useEffect(function(){L()},[e.gap]);var T=e.prefixCls,D=e.shape,A=void 0===D?"circle":D,B=e.size,H=void 0===B?"default":B,M=e.src,G=e.srcSet,W=e.icon,I=e.className,J=e.alt,V=e.draggable,q=e.children,U=e.crossOrigin,Q=g(e,["prefixCls","shape","size","src","srcSet","icon","className","alt","draggable","children","crossOrigin"]),X="default"===H?x:H,$=Object.keys("object"===(0,a.Z)(X)&&X||{}).some(function(e){return["xs","sm","md","lg","xl","xxl"].includes(e)}),K=(0,d.Z)($),Y=f.useMemo(function(){if("object"!==(0,a.Z)(X))return{};var e=X[m.c4.find(function(e){return K[e]})];return e?{width:e,height:e,lineHeight:"".concat(e,"px"),fontSize:W?e/2:18}:{}},[K,X]),ee=R("avatar",T),et=i()((r={},(0,o.Z)(r,"".concat(ee,"-lg"),"large"===X),(0,o.Z)(r,"".concat(ee,"-sm"),"small"===X),r)),er=f.isValidElement(M),en=i()(ee,et,(l={},(0,o.Z)(l,"".concat(ee,"-").concat(A),!!A),(0,o.Z)(l,"".concat(ee,"-image"),er||M&&N),(0,o.Z)(l,"".concat(ee,"-icon"),!!W),l),I);if("string"==typeof M&&N)h=f.createElement("img",{src:M,draggable:V,srcSet:G,onError:function(){var t=e.onError;!1!==(t?t():void 0)&&P(!1)},alt:J,crossOrigin:U});else if(er)h=M;else if(W)h=W;else if(C||1!==w){var eo="scale(".concat(w,") translateX(-50%)");h=f.createElement(s.default,{onResize:L},f.createElement("span",{className:"".concat(ee,"-string"),ref:z,style:(0,n.Z)((0,n.Z)({},"number"==typeof X?{lineHeight:"".concat(X,"px")}:{}),{msTransform:eo,WebkitTransform:eo,transform:eo})},q))}else h=f.createElement("span",{className:"".concat(ee,"-string"),style:{opacity:0},ref:z},q);return delete Q.onError,delete Q.gap,f.createElement("span",(0,n.Z)({},Q,{style:(0,n.Z)((0,n.Z)((0,n.Z)({},"number"==typeof X?{width:X,height:X,lineHeight:"".concat(X,"px"),fontSize:W?X/2:18}:{}),Y),Q.style),className:en,ref:F}),h)}),y=r(50344),Z=r(55241),w=r(96159),b=x;b.Group=function(e){var t=f.useContext(p.E_),r=t.getPrefixCls,n=t.direction,a=e.prefixCls,c=e.className,l=e.maxCount,s=e.maxStyle,u=e.size,d=r("avatar-group",a),m=i()(d,(0,o.Z)({},"".concat(d,"-rtl"),"rtl"===n),void 0===c?"":c),v=e.children,g=e.maxPopoverPlacement,b=e.maxPopoverTrigger,j=(0,y.Z)(v).map(function(e,t){return(0,w.Tm)(e,{key:"avatar-key-".concat(t)})}),E=j.length;if(l&&l<E){var C=j.slice(0,l),O=j.slice(l,E);return C.push(f.createElement(Z.Z,{key:"avatar-popover-key",content:O,trigger:void 0===b?"hover":b,placement:void 0===g?"top":g,overlayClassName:"".concat(d,"-popover")},f.createElement(x,{style:s},"+".concat(E-l)))),f.createElement(h,{size:u},f.createElement("div",{className:m,style:e.style},C))}return f.createElement(h,{size:u},f.createElement("div",{className:m,style:e.style},j))};var j=b},15746:function(e,t,r){"use strict";var n=r(21584);t.Z=n.Z},99134:function(e,t,r){"use strict";var n=(0,r(67294).createContext)({});t.Z=n},21584:function(e,t,r){"use strict";var n=r(4942),o=r(87462),a=r(71002),c=r(94184),l=r.n(c),i=r(67294),s=r(53124),u=r(99134),f=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&0>t.indexOf(n)&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var o=0,n=Object.getOwnPropertySymbols(e);o<n.length;o++)0>t.indexOf(n[o])&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]]);return r},p=["xs","sm","md","lg","xl","xxl"],d=i.forwardRef(function(e,t){var r,c=i.useContext(s.E_),d=c.getPrefixCls,m=c.direction,v=i.useContext(u.Z),h=v.gutter,g=v.wrap,x=v.supportFlexGap,y=e.prefixCls,Z=e.span,w=e.order,b=e.offset,j=e.push,E=e.pull,C=e.className,O=e.children,S=e.flex,_=e.style,N=f(e,["prefixCls","span","order","offset","push","pull","className","children","flex","style"]),P=d("col",y),k={};p.forEach(function(t){var r,c={},l=e[t];"number"==typeof l?c.span=l:"object"===(0,a.Z)(l)&&(c=l||{}),delete N[t],k=(0,o.Z)((0,o.Z)({},k),(r={},(0,n.Z)(r,"".concat(P,"-").concat(t,"-").concat(c.span),void 0!==c.span),(0,n.Z)(r,"".concat(P,"-").concat(t,"-order-").concat(c.order),c.order||0===c.order),(0,n.Z)(r,"".concat(P,"-").concat(t,"-offset-").concat(c.offset),c.offset||0===c.offset),(0,n.Z)(r,"".concat(P,"-").concat(t,"-push-").concat(c.push),c.push||0===c.push),(0,n.Z)(r,"".concat(P,"-").concat(t,"-pull-").concat(c.pull),c.pull||0===c.pull),(0,n.Z)(r,"".concat(P,"-rtl"),"rtl"===m),r))});var z=l()(P,(r={},(0,n.Z)(r,"".concat(P,"-").concat(Z),void 0!==Z),(0,n.Z)(r,"".concat(P,"-order-").concat(w),w),(0,n.Z)(r,"".concat(P,"-offset-").concat(b),b),(0,n.Z)(r,"".concat(P,"-push-").concat(j),j),(0,n.Z)(r,"".concat(P,"-pull-").concat(E),E),r),C,k),F={};if(h&&h[0]>0){var R=h[0]/2;F.paddingLeft=R,F.paddingRight=R}if(h&&h[1]>0&&!x){var L=h[1]/2;F.paddingTop=L,F.paddingBottom=L}return S&&(F.flex="number"==typeof S?"".concat(S," ").concat(S," auto"):/^\d+(\.\d+)?(px|em|rem|%)$/.test(S)?"0 0 ".concat(S):S,!1!==g||F.minWidth||(F.minWidth=0)),i.createElement("div",(0,o.Z)({},N,{style:(0,o.Z)((0,o.Z)({},F),_),className:z,ref:t}),O)});t.Z=d},25378:function(e,t,r){"use strict";var n=r(67294),o=r(57838),a=r(24308);t.Z=function(){var e=!(arguments.length>0)||void 0===arguments[0]||arguments[0],t=(0,n.useRef)({}),r=(0,o.Z)();return(0,n.useEffect)(function(){var n=a.ZP.subscribe(function(n){t.current=n,e&&r()});return function(){return a.ZP.unsubscribe(n)}},[]),t.current}},92820:function(e,t,r){"use strict";var n=r(87462),o=r(4942),a=r(71002),c=r(97685),l=r(94184),i=r.n(l),s=r(67294),u=r(53124),f=r(98082),p=r(24308),d=r(93355),m=r(99134),v=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&0>t.indexOf(n)&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var o=0,n=Object.getOwnPropertySymbols(e);o<n.length;o++)0>t.indexOf(n[o])&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]]);return r};function h(e,t){var r=s.useState("string"==typeof e?e:""),n=(0,c.Z)(r,2),o=n[0],l=n[1],i=function(){if("string"==typeof e&&l(e),"object"===(0,a.Z)(e))for(var r=0;r<p.c4.length;r++){var n=p.c4[r];if(t[n]){var o=e[n];if(void 0!==o){l(o);return}}}};return s.useEffect(function(){i()},[JSON.stringify(e),t]),o}(0,d.b)("top","middle","bottom","stretch"),(0,d.b)("start","end","center","space-around","space-between","space-evenly");var g=s.forwardRef(function(e,t){var r,l,d=e.prefixCls,g=e.justify,x=e.align,y=e.className,Z=e.style,w=e.children,b=e.gutter,j=void 0===b?0:b,E=e.wrap,C=v(e,["prefixCls","justify","align","className","style","children","gutter","wrap"]),O=s.useContext(u.E_),S=O.getPrefixCls,_=O.direction,N=s.useState({xs:!0,sm:!0,md:!0,lg:!0,xl:!0,xxl:!0}),P=(0,c.Z)(N,2),k=P[0],z=P[1],F=s.useState({xs:!1,sm:!1,md:!1,lg:!1,xl:!1,xxl:!1}),R=(0,c.Z)(F,2),L=R[0],T=R[1],D=h(x,L),A=h(g,L),B=(0,f.Z)(),H=s.useRef(j);s.useEffect(function(){var e=p.ZP.subscribe(function(e){T(e);var t=H.current||0;(!Array.isArray(t)&&"object"===(0,a.Z)(t)||Array.isArray(t)&&("object"===(0,a.Z)(t[0])||"object"===(0,a.Z)(t[1])))&&z(e)});return function(){return p.ZP.unsubscribe(e)}},[]);var M=S("row",d),G=(r=[void 0,void 0],(Array.isArray(j)?j:[j,void 0]).forEach(function(e,t){if("object"===(0,a.Z)(e))for(var n=0;n<p.c4.length;n++){var o=p.c4[n];if(k[o]&&void 0!==e[o]){r[t]=e[o];break}}else r[t]=e}),r),W=i()(M,(l={},(0,o.Z)(l,"".concat(M,"-no-wrap"),!1===E),(0,o.Z)(l,"".concat(M,"-").concat(A),A),(0,o.Z)(l,"".concat(M,"-").concat(D),D),(0,o.Z)(l,"".concat(M,"-rtl"),"rtl"===_),l),y),I={},J=null!=G[0]&&G[0]>0?-(G[0]/2):void 0,V=null!=G[1]&&G[1]>0?-(G[1]/2):void 0;if(J&&(I.marginLeft=J,I.marginRight=J),B){var q=(0,c.Z)(G,2);I.rowGap=q[1]}else V&&(I.marginTop=V,I.marginBottom=V);var U=(0,c.Z)(G,2),Q=U[0],X=U[1],$=s.useMemo(function(){return{gutter:[Q,X],wrap:E,supportFlexGap:B}},[Q,X,E,B]);return s.createElement(m.Z.Provider,{value:$},s.createElement("div",(0,n.Z)({},C,{className:W,style:(0,n.Z)((0,n.Z)({},I),Z),ref:t}),w))});t.Z=g},55241:function(e,t,r){"use strict";var n=r(87462),o=r(67294),a=r(53124),c=r(94199),l=r(81643),i=r(33603),s=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&0>t.indexOf(n)&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var o=0,n=Object.getOwnPropertySymbols(e);o<n.length;o++)0>t.indexOf(n[o])&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]]);return r},u=function(e){var t=e.title,r=e.content,n=e.prefixCls;return t||r?o.createElement(o.Fragment,null,t&&o.createElement("div",{className:"".concat(n,"-title")},(0,l.Z)(t)),o.createElement("div",{className:"".concat(n,"-inner-content")},(0,l.Z)(r))):null},f=o.forwardRef(function(e,t){var r=e.prefixCls,l=e.title,f=e.content,p=e._overlay,d=e.placement,m=e.trigger,v=e.mouseEnterDelay,h=e.mouseLeaveDelay,g=e.overlayStyle,x=s(e,["prefixCls","title","content","_overlay","placement","trigger","mouseEnterDelay","mouseLeaveDelay","overlayStyle"]),y=o.useContext(a.E_).getPrefixCls,Z=y("popover",r),w=y();return o.createElement(c.Z,(0,n.Z)({placement:void 0===d?"top":d,trigger:void 0===m?"hover":m,mouseEnterDelay:void 0===v?.1:v,mouseLeaveDelay:void 0===h?.1:h,overlayStyle:void 0===g?{}:g},x,{prefixCls:Z,ref:t,overlay:p||o.createElement(u,{prefixCls:Z,title:l,content:f}),transitionName:(0,i.mL)(w,"zoom-big",x.transitionName)}))});t.Z=f},71230:function(e,t,r){"use strict";var n=r(92820);t.Z=n.Z},15508:function(e,t,r){"use strict";r.r(t),r.d(t,{FollowerCollection:function(){return y}});var n=r(85893),o=r(67294),a=r(26303),c=r(71230),l=r(15746),i=r(3698),s=r(24093),u=r(85818),f=r(94184),p=r.n(f),d=r(90589),m=r.n(d);let v=e=>{let{follower:t}=e;return(0,n.jsx)("div",{className:p()([m().follower,"followers-follower"]),children:(0,n.jsx)("a",{href:t.link,target:"_blank",rel:"noreferrer",children:(0,n.jsxs)(c.Z,{wrap:!1,children:[(0,n.jsx)(l.Z,{span:6,children:(0,n.jsx)(s.C,{src:t.image,alt:"Avatar",className:m().avatar,icon:(0,n.jsx)("img",{src:"/logo",alt:"Logo"})})}),(0,n.jsxs)(l.Z,{span:18,children:[(0,n.jsx)(c.Z,{className:m().name,children:(0,n.jsx)(u.Z.Text,{ellipsis:!0,children:t.name||t.username.split("@",2)[0]})}),(0,n.jsx)(c.Z,{className:m().account,children:(0,n.jsx)(u.Z.Text,{ellipsis:!0,children:t.username})})]})]})})})};var h=r(16501),g=r.n(h),x=r(78696);let y=e=>{let{name:t,onFollowButtonClick:r}=e,[s,u]=(0,o.useState)([]),[f,p]=(0,o.useState)(0),[d,m]=(0,o.useState)(1),[h,y]=(0,o.useState)(!0),Z=async()=>{try{let e=await fetch("".concat("/api/followers","?page=").concat(d,"&limit=").concat(24)),t=await e.json(),{results:r,total:n}=t;u(r),p(n),y(!1)}catch(e){console.error(e)}};(0,o.useEffect)(()=>{Z()},[d]);let w=(0,n.jsxs)("div",{className:g().noFollowers,id:"followers-collection",children:[(0,n.jsx)("h2",{children:"Be the first follower!"}),(0,n.jsxs)("p",{children:["Owncast"!==t?t:"This server"," is a part of the"," ",(0,n.jsx)("a",{href:"https://owncast.online/join-fediverse",children:"Fediverse"}),", an interconnected network of independent users and servers."]}),(0,n.jsxs)("p",{children:["By following ","Owncast"!==t?t:"this server"," you'll be able to get updates from the stream, share it with others, and show your appreciation when it goes live, all from your own Fediverse account."]}),(0,n.jsx)(x.e,{onClick:r})]}),b=(0,n.jsx)(a.Z,{active:!0,paragraph:{rows:3}});return h?b:(null==s?void 0:s.length)?(0,n.jsxs)("div",{className:g().followers,id:"followers-collection",children:[(0,n.jsx)(c.Z,{wrap:!0,gutter:[10,10],className:g().followerRow,children:s.map(e=>(0,n.jsx)(l.Z,{children:(0,n.jsx)(v,{follower:e},e.link)},e.link))}),(0,n.jsx)(i.Z,{className:g().pagination,current:d,pageSize:24,defaultPageSize:24,total:f,showSizeChanger:!1,onChange:e=>{m(e)},hideOnSinglePage:!0})]}):w}},16501:function(e){e.exports={followers:"FollowerCollection_followers__e_EUS",followerRow:"FollowerCollection_followerRow__T1mFd",noFollowers:"FollowerCollection_noFollowers__UaCVW",pagination:"FollowerCollection_pagination___wGRd"}},90589:function(e){e.exports={follower:"SingleFollower_follower__EyBDI",name:"SingleFollower_name__JlpJP",account:"SingleFollower_account__Z66vo",avatar:"SingleFollower_avatar__V9jHG"}}}]);