Files
owncast/static/web/_next/static/chunks/pages/admin/config-federation-2d03b3b8677dde04.js
2023-02-06 04:02:18 +00:00

1 line
21 KiB
JavaScript
Vendored

(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2532],{24308:function(e,t,n){"use strict";n.d(t,{c4:function(){return o}});var r=n(4942),a=n(87462),o=["xxl","xl","lg","md","sm","xs"],s={xs:"(max-width: 575px)",sm:"(min-width: 576px)",md:"(min-width: 768px)",lg:"(min-width: 992px)",xl:"(min-width: 1200px)",xxl:"(min-width: 1600px)"},i=new Map,l=-1,c={};t.ZP={matchHandlers:{},dispatch:function(e){return c=e,i.forEach(function(e){return e(c)}),i.size>=1},subscribe:function(e){return i.size||this.register(),l+=1,i.set(l,e),e(c),l},unsubscribe:function(e){i.delete(e),i.size||this.unregister()},unregister:function(){var e=this;Object.keys(s).forEach(function(t){var n=s[t],r=e.matchHandlers[n];null==r||r.mql.removeListener(null==r?void 0:r.listener)}),i.clear()},register:function(){var e=this;Object.keys(s).forEach(function(t){var n=s[t],o=function(n){var o=n.matches;e.dispatch((0,a.Z)((0,a.Z)({},c),(0,r.Z)({},t,o)))},i=window.matchMedia(n);i.addListener(o),e.matchHandlers[n]={mql:i,listener:o},o(i)})}}},15746:function(e,t,n){"use strict";var r=n(21584);t.Z=r.Z},99134:function(e,t,n){"use strict";var r=(0,n(67294).createContext)({});t.Z=r},21584:function(e,t,n){"use strict";var r=n(4942),a=n(87462),o=n(71002),s=n(94184),i=n.n(s),l=n(67294),c=n(53124),u=n(99134),d=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&0>t.indexOf(r)&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var a=0,r=Object.getOwnPropertySymbols(e);a<r.length;a++)0>t.indexOf(r[a])&&Object.prototype.propertyIsEnumerable.call(e,r[a])&&(n[r[a]]=e[r[a]]);return n},f=["xs","sm","md","lg","xl","xxl"],h=l.forwardRef(function(e,t){var n,s=l.useContext(c.E_),h=s.getPrefixCls,p=s.direction,m=l.useContext(u.Z),v=m.gutter,g=m.wrap,b=m.supportFlexGap,x=e.prefixCls,y=e.span,Z=e.order,w=e.offset,j=e.push,C=e.pull,k=e.className,O=e.children,E=e.flex,N=e.style,P=d(e,["prefixCls","span","order","offset","push","pull","className","children","flex","style"]),S=h("col",x),T={};f.forEach(function(t){var n,s={},i=e[t];"number"==typeof i?s.span=i:"object"===(0,o.Z)(i)&&(s=i||{}),delete P[t],T=(0,a.Z)((0,a.Z)({},T),(n={},(0,r.Z)(n,"".concat(S,"-").concat(t,"-").concat(s.span),void 0!==s.span),(0,r.Z)(n,"".concat(S,"-").concat(t,"-order-").concat(s.order),s.order||0===s.order),(0,r.Z)(n,"".concat(S,"-").concat(t,"-offset-").concat(s.offset),s.offset||0===s.offset),(0,r.Z)(n,"".concat(S,"-").concat(t,"-push-").concat(s.push),s.push||0===s.push),(0,r.Z)(n,"".concat(S,"-").concat(t,"-pull-").concat(s.pull),s.pull||0===s.pull),(0,r.Z)(n,"".concat(S,"-rtl"),"rtl"===p),n))});var _=i()(S,(n={},(0,r.Z)(n,"".concat(S,"-").concat(y),void 0!==y),(0,r.Z)(n,"".concat(S,"-order-").concat(Z),Z),(0,r.Z)(n,"".concat(S,"-offset-").concat(w),w),(0,r.Z)(n,"".concat(S,"-push-").concat(j),j),(0,r.Z)(n,"".concat(S,"-pull-").concat(C),C),n),k,T),R={};if(v&&v[0]>0){var I=v[0]/2;R.paddingLeft=I,R.paddingRight=I}if(v&&v[1]>0&&!b){var L=v[1]/2;R.paddingTop=L,R.paddingBottom=L}return E&&(R.flex="number"==typeof E?"".concat(E," ").concat(E," auto"):/^\d+(\.\d+)?(px|em|rem|%)$/.test(E)?"0 0 ".concat(E):E,!1!==g||R.minWidth||(R.minWidth=0)),l.createElement("div",(0,a.Z)({},P,{style:(0,a.Z)((0,a.Z)({},R),N),className:_,ref:t}),O)});t.Z=h},92820:function(e,t,n){"use strict";var r=n(87462),a=n(4942),o=n(71002),s=n(97685),i=n(94184),l=n.n(i),c=n(67294),u=n(53124),d=n(98082),f=n(24308),h=n(93355),p=n(99134),m=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&0>t.indexOf(r)&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var a=0,r=Object.getOwnPropertySymbols(e);a<r.length;a++)0>t.indexOf(r[a])&&Object.prototype.propertyIsEnumerable.call(e,r[a])&&(n[r[a]]=e[r[a]]);return n};function v(e,t){var n=c.useState("string"==typeof e?e:""),r=(0,s.Z)(n,2),a=r[0],i=r[1],l=function(){if("string"==typeof e&&i(e),"object"===(0,o.Z)(e))for(var n=0;n<f.c4.length;n++){var r=f.c4[n];if(t[r]){var a=e[r];if(void 0!==a){i(a);return}}}};return c.useEffect(function(){l()},[JSON.stringify(e),t]),a}(0,h.b)("top","middle","bottom","stretch"),(0,h.b)("start","end","center","space-around","space-between","space-evenly");var g=c.forwardRef(function(e,t){var n,i,h=e.prefixCls,g=e.justify,b=e.align,x=e.className,y=e.style,Z=e.children,w=e.gutter,j=void 0===w?0:w,C=e.wrap,k=m(e,["prefixCls","justify","align","className","style","children","gutter","wrap"]),O=c.useContext(u.E_),E=O.getPrefixCls,N=O.direction,P=c.useState({xs:!0,sm:!0,md:!0,lg:!0,xl:!0,xxl:!0}),S=(0,s.Z)(P,2),T=S[0],_=S[1],R=c.useState({xs:!1,sm:!1,md:!1,lg:!1,xl:!1,xxl:!1}),I=(0,s.Z)(R,2),L=I[0],F=I[1],U=v(b,L),D=v(g,L),M=(0,d.Z)(),A=c.useRef(j);c.useEffect(function(){var e=f.ZP.subscribe(function(e){F(e);var t=A.current||0;(!Array.isArray(t)&&"object"===(0,o.Z)(t)||Array.isArray(t)&&("object"===(0,o.Z)(t[0])||"object"===(0,o.Z)(t[1])))&&_(e)});return function(){return f.ZP.unsubscribe(e)}},[]);var W=E("row",h),q=(n=[void 0,void 0],(Array.isArray(j)?j:[j,void 0]).forEach(function(e,t){if("object"===(0,o.Z)(e))for(var r=0;r<f.c4.length;r++){var a=f.c4[r];if(T[a]&&void 0!==e[a]){n[t]=e[a];break}}else n[t]=e}),n),z=l()(W,(i={},(0,a.Z)(i,"".concat(W,"-no-wrap"),!1===C),(0,a.Z)(i,"".concat(W,"-").concat(D),D),(0,a.Z)(i,"".concat(W,"-").concat(U),U),(0,a.Z)(i,"".concat(W,"-rtl"),"rtl"===N),i),x),H={},Y=null!=q[0]&&q[0]>0?-(q[0]/2):void 0,V=null!=q[1]&&q[1]>0?-(q[1]/2):void 0;if(Y&&(H.marginLeft=Y,H.marginRight=Y),M){var $=(0,s.Z)(q,2);H.rowGap=$[1]}else V&&(H.marginTop=V,H.marginBottom=V);var K=(0,s.Z)(q,2),B=K[0],G=K[1],J=c.useMemo(function(){return{gutter:[B,G],wrap:C,supportFlexGap:M}},[B,G,C,M]);return c.createElement(p.Z.Provider,{value:J},c.createElement("div",(0,r.Z)({},k,{className:z,style:(0,r.Z)((0,r.Z)({},H),y),ref:t}),Z))});t.Z=g},97183:function(e,t,n){"use strict";var r=n(2897),a=n(7293),o=r.ZP;o.Header=r.h4,o.Footer=r.$_,o.Content=r.VY,o.Sider=a.Z,t.Z=o},71230:function(e,t,n){"use strict";var r=n(92820);t.Z=r.Z},94594:function(e,t,n){"use strict";n.d(t,{Z:function(){return y}});var r=n(87462),a=n(4942),o=n(50888),s=n(94184),i=n.n(s),l=n(97685),c=n(45987),u=n(67294),d=n(21770),f=n(15105),h=u.forwardRef(function(e,t){var n,r=e.prefixCls,o=void 0===r?"rc-switch":r,s=e.className,h=e.checked,p=e.defaultChecked,m=e.disabled,v=e.loadingIcon,g=e.checkedChildren,b=e.unCheckedChildren,x=e.onClick,y=e.onChange,Z=e.onKeyDown,w=(0,c.Z)(e,["prefixCls","className","checked","defaultChecked","disabled","loadingIcon","checkedChildren","unCheckedChildren","onClick","onChange","onKeyDown"]),j=(0,d.Z)(!1,{value:h,defaultValue:p}),C=(0,l.Z)(j,2),k=C[0],O=C[1];function E(e,t){var n=k;return m||(O(n=e),null==y||y(n,t)),n}var N=i()(o,s,(n={},(0,a.Z)(n,"".concat(o,"-checked"),k),(0,a.Z)(n,"".concat(o,"-disabled"),m),n));return u.createElement("button",Object.assign({},w,{type:"button",role:"switch","aria-checked":k,disabled:m,className:N,ref:t,onKeyDown:function(e){e.which===f.Z.LEFT?E(!1,e):e.which===f.Z.RIGHT&&E(!0,e),null==Z||Z(e)},onClick:function(e){var t=E(!k,e);null==x||x(t,e)}}),v,u.createElement("span",{className:"".concat(o,"-inner")},k?g:b))});h.displayName="Switch";var p=n(53124),m=n(98866),v=n(97647),g=n(68349),b=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&0>t.indexOf(r)&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var a=0,r=Object.getOwnPropertySymbols(e);a<r.length;a++)0>t.indexOf(r[a])&&Object.prototype.propertyIsEnumerable.call(e,r[a])&&(n[r[a]]=e[r[a]]);return n},x=u.forwardRef(function(e,t){var n,s=e.prefixCls,l=e.size,c=e.disabled,d=e.loading,f=e.className,x=b(e,["prefixCls","size","disabled","loading","className"]),y=u.useContext(p.E_),Z=y.getPrefixCls,w=y.direction,j=u.useContext(v.Z),C=u.useContext(m.Z),k=Z("switch",s),O=u.createElement("div",{className:"".concat(k,"-handle")},d&&u.createElement(o.Z,{className:"".concat(k,"-loading-icon")})),E=i()((n={},(0,a.Z)(n,"".concat(k,"-small"),"small"===(l||j)),(0,a.Z)(n,"".concat(k,"-loading"),d),(0,a.Z)(n,"".concat(k,"-rtl"),"rtl"===w),n),void 0===f?"":f);return u.createElement(g.Z,{insertExtraNode:!0},u.createElement(h,(0,r.Z)({},x,{prefixCls:k,className:E,disabled:(null!=c?c:C)||d,ref:t,loadingIcon:O})))});x.__ANT_SWITCH=!0;var y=x},20550:function(e,t,n){"use strict";n.d(t,{Z:function(){return x}});var r=n(4942),a=n(87462),o=n(97685),s=n(97937),i=n(94184),l=n.n(i),c=n(98423),u=n(67294),d=n(53124),f=n(98787),h=n(68349),p=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&0>t.indexOf(r)&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var a=0,r=Object.getOwnPropertySymbols(e);a<r.length;a++)0>t.indexOf(r[a])&&Object.prototype.propertyIsEnumerable.call(e,r[a])&&(n[r[a]]=e[r[a]]);return n},m=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&0>t.indexOf(r)&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var a=0,r=Object.getOwnPropertySymbols(e);a<r.length;a++)0>t.indexOf(r[a])&&Object.prototype.propertyIsEnumerable.call(e,r[a])&&(n[r[a]]=e[r[a]]);return n},v=RegExp("^(".concat(f.Y.join("|"),")(-inverse)?$")),g=RegExp("^(".concat(f.E.join("|"),")$")),b=u.forwardRef(function(e,t){var n,i=e.prefixCls,f=e.className,p=e.style,b=e.children,x=e.icon,y=e.color,Z=e.onClose,w=e.closeIcon,j=e.closable,C=m(e,["prefixCls","className","style","children","icon","color","onClose","closeIcon","closable"]),k=u.useContext(d.E_),O=k.getPrefixCls,E=k.direction,N=u.useState(!0),P=(0,o.Z)(N,2),S=P[0],T=P[1];u.useEffect(function(){"visible"in C&&T(C.visible)},[C.visible]);var _=function(){return!!y&&(v.test(y)||g.test(y))},R=(0,a.Z)({backgroundColor:y&&!_()?y:void 0},p),I=_(),L=O("tag",i),F=l()(L,(n={},(0,r.Z)(n,"".concat(L,"-").concat(y),I),(0,r.Z)(n,"".concat(L,"-has-color"),y&&!I),(0,r.Z)(n,"".concat(L,"-hidden"),!S),(0,r.Z)(n,"".concat(L,"-rtl"),"rtl"===E),n),f),U=function(e){e.stopPropagation(),null==Z||Z(e),!e.defaultPrevented&&("visible"in C||T(!1))},D="onClick"in C||b&&"a"===b.type,M=(0,c.Z)(C,["visible"]),A=x||null,W=A?u.createElement(u.Fragment,null,A,u.createElement("span",null,b)):b,q=u.createElement("span",(0,a.Z)({},M,{ref:t,className:F,style:R}),W,void 0!==j&&j?w?u.createElement("span",{className:"".concat(L,"-close-icon"),onClick:U},w):u.createElement(s.Z,{className:"".concat(L,"-close-icon"),onClick:U}):null);return D?u.createElement(h.Z,null,q):q});b.CheckableTag=function(e){var t,n=e.prefixCls,o=e.className,s=e.checked,i=e.onChange,c=e.onClick,f=p(e,["prefixCls","className","checked","onChange","onClick"]),h=(0,u.useContext(d.E_).getPrefixCls)("tag",n),m=l()(h,(t={},(0,r.Z)(t,"".concat(h,"-checkable"),!0),(0,r.Z)(t,"".concat(h,"-checkable-checked"),s),t),o);return u.createElement("span",(0,a.Z)({},f,{className:m,onClick:function(e){null==i||i(!s),null==c||c(e)}}))};var x=b},93645:function(e,t,n){"use strict";n.d(t,{u:function(){return a}});var r={ceil:Math.ceil,round:Math.round,floor:Math.floor,trunc:function(e){return e<0?Math.ceil(e):Math.floor(e)}};function a(e){return e?r[e]:r.trunc}},59910:function(e,t,n){"use strict";n.d(t,{Z:function(){return o}});var r=n(19013),a=n(13882);function o(e,t){return(0,a.Z)(2,arguments),(0,r.Z)(e).getTime()-(0,r.Z)(t).getTime()}},11699:function(e,t,n){"use strict";n.d(t,{Z:function(){return s}});var r=n(59910),a=n(13882),o=n(93645);function s(e,t,n){(0,a.Z)(2,arguments);var s=(0,r.Z)(e,t)/1e3;return(0,o.u)(null==n?void 0:n.roundingMethod)(s)}},18957:function(e,t,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/admin/config-federation",function(){return n(37990)}])},48186:function(e,t,n){"use strict";n.d(t,{Q:function(){return u},Y:function(){return d}});var r=n(85893),a=n(67294),o=n(85818),s=n(20550),i=n(79139),l=n(73615);let{Title:c}=o.Z,u="#5a67d8",d=e=>{let{title:t,description:n,placeholder:o,maxLength:d,values:f,handleDeleteIndex:h,handleCreateString:p,submitStatus:m,continuousStatusMessage:v}=e,[g,b]=(0,a.useState)(""),x=e=>{let{value:t}=e;b(t)},y=()=>{let e=g.trim();p(e),b("")};return(0,r.jsxs)("div",{className:"edit-string-array-container",children:[(0,r.jsx)(c,{level:3,className:"section-title",children:t}),(0,r.jsx)("p",{className:"description",children:n}),(0,r.jsx)("div",{className:"edit-current-strings",children:null==f?void 0:f.map((e,t)=>{let n=()=>{h(t)};return(0,r.jsx)(s.Z,{closable:!0,onClose:n,color:u,children:e},"tag-".concat(e,"-").concat(t))})}),v&&(0,r.jsx)("div",{className:"continuous-status-section",children:(0,r.jsx)(l.E,{status:v})}),(0,r.jsx)("div",{className:"add-new-string-section",children:(0,r.jsx)(i.nv,{fieldName:"string-input",value:g,onChange:x,onPressEnter:y,maxLength:d,placeholder:o,status:m})})]})};d.defaultProps={maxLength:50,description:null,submitStatus:null,continuousStatusMessage:null}},6979:function(e,t,n){"use strict";n.d(t,{Z:function(){return u}});var r=n(85893),a=n(67294),o=n(94594),s=n(41983),i=n(73615),l=n(90745),c=n(99519);let u=e=>{let{apiPath:t,checked:n,reversed:u=!1,configPath:d="",disabled:f=!1,fieldName:h,label:p,tip:m,useSubmit:v,onChange:g}=e,[b,x]=(0,a.useState)(null),y=null,Z=(0,a.useContext)(c.aC),{setFieldInConfigState:w}=Z||{},j=()=>{x(null),clearTimeout(y),y=null},C=async e=>{if(v){x((0,s.kg)(s.Jk));let n=u?!e:e;await (0,l.Si)({apiPath:t,data:{value:n},onSuccess:()=>{w({fieldName:h,value:n,path:d}),x((0,s.kg)(s.zv))},onError:e=>{x((0,s.kg)(s.Un,"There was an error: ".concat(e)))}}),y=setTimeout(j,l.sI)}g&&g(e)},k=null!==b&&b.type===s.Jk;return(0,r.jsxs)("div",{className:"formfield-container toggleswitch-container",children:[p&&(0,r.jsx)("div",{className:"label-side",children:(0,r.jsx)("span",{className:"formfield-label",children:p})}),(0,r.jsxs)("div",{className:"input-side",children:[(0,r.jsxs)("div",{className:"input-group",children:[(0,r.jsx)(o.Z,{className:"switch field-".concat(h),loading:k,onChange:C,defaultChecked:n,checked:n,checkedChildren:"ON",unCheckedChildren:"OFF",disabled:f}),(0,r.jsx)(i.E,{status:b})]}),(0,r.jsx)("p",{className:"field-tip",children:m})]})]})};u.defaultProps={apiPath:"",checked:!1,reversed:!1,configPath:"",disabled:!1,label:"",tip:"",useSubmit:!1,onChange:null}},37990:function(e,t,n){"use strict";n.r(t);var r=n(85893),a=n(85402),o=n(71577),s=n(85818),i=n(14670),l=n(71230),c=n(15746),u=n(67294),d=n(45697),f=n.n(d),h=n(79139),p=n(46551),m=n(6979),v=n(48186),g=n(90745),b=n(99519),x=n(41983),y=n(6960);let Z=e=>{let{cancelPressed:t,okPressed:n}=e;return(0,r.jsxs)(a.Z,{width:"70%",title:"Enable Social Features",visible:!0,onCancel:t,footer:(0,r.jsxs)("div",{children:[(0,r.jsx)(o.Z,{onClick:t,children:"Do not enable"}),(0,r.jsx)(o.Z,{type:"primary",onClick:n,children:"Enable Social Features"})]}),children:[(0,r.jsx)(s.Z.Title,{level:3,children:"How do Owncast's social features work?"}),(0,r.jsxs)(s.Z.Paragraph,{children:["Owncast's social features are accomplished by having your server join The"," ",(0,r.jsx)("a",{href:"https://en.wikipedia.org/wiki/Fediverse",rel:"noopener noreferrer",target:"_blank",children:"Fediverse"}),", a decentralized, open, collection of independent servers, like yours."]}),"Please"," ",(0,r.jsx)("a",{href:"https://owncast.online/docs/social",rel:"noopener noreferrer",target:"_blank",children:"read more"})," ","about these features, the details behind them, and how they work.",(0,r.jsx)(s.Z.Paragraph,{}),(0,r.jsx)(s.Z.Title,{level:3,children:"What do you need to know?"}),(0,r.jsxs)("ul",{children:[(0,r.jsx)("li",{children:"These features are brand new. Given the variability of interfacing with the rest of the world, bugs are possible. Please report anything that you think isn't working quite right."}),(0,r.jsx)("li",{children:"You must always host your Owncast server with SSL using a https url."}),(0,r.jsx)("li",{children:"You should not change your server name URL or social username once people begin following you, as your server will be seen as a completely different user on the Fediverse, and the old user will disappear."}),(0,r.jsxs)("li",{children:["Turning on ",(0,r.jsx)("i",{children:"Private mode"})," will allow you to manually approve each follower and limit the visibility of your posts to followers only."]})]}),(0,r.jsx)(s.Z.Title,{level:3,children:"Learn more about The Fediverse"}),(0,r.jsxs)(s.Z.Paragraph,{children:["If these concepts are new you should discover more about what this functionality has to offer. Visit"," ",(0,r.jsx)("a",{href:"https://owncast.online/docs/social",rel:"noopener noreferrer",target:"_blank",children:"our documentation"})," ","to be pointed at some resources that will help get you started on The Fediverse."]})]})};Z.propTypes={cancelPressed:f().func.isRequired,okPressed:f().func.isRequired};let w=()=>{let{Title:e}=s.Z,[t,n]=(0,u.useState)(null),[a,o]=(0,u.useState)(!1),d=(0,u.useContext)(b.aC),{serverConfig:f,setFieldInConfigState:y}=d||{},[w,j]=(0,u.useState)(null),{federation:C,yp:k,instanceDetails:O}=f,{enabled:E,isPrivate:N,username:P,goLiveMessage:S,showEngagement:T,blockedDomains:_}=C,{instanceUrl:R}=k,{nsfw:I}=O,L=e=>{let{fieldName:r,value:a}=e;n({...t,[r]:a})},F=e=>{e?o(!0):n({...t,enabled:!1})},U=()=>{let e=""!==t.instanceUrl,r=t.instanceUrl.startsWith("https://");e&&r||((0,g.Si)({apiPath:g.Kl.apiPath,data:{value:!1}}),n({...t,enabled:!1}))};function D(){j(null)}function M(){try{(0,g.Si)({apiPath:g.pE,data:{value:t.blockedDomains},onSuccess:()=>{y({fieldName:"forbiddenUsernames",value:t.forbiddenUsernames}),j(x.zv),setTimeout(D,g.sI)},onError:e=>{j((0,x.kg)(x.Un,e)),setTimeout(D,g.sI)}})}catch(e){console.error(e),j(x.Un)}}if((0,u.useEffect)(()=>{n({enabled:E,isPrivate:N,username:P,goLiveMessage:S,showEngagement:T,blockedDomains:_,nsfw:I,instanceUrl:k.instanceUrl})},[f,k]),!t)return null;let A=""!==R,W=R.startsWith("https://"),q=!W&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(i.Z,{message:"You must set your server URL before you can enable this feature.",type:"warning",showIcon:!0}),(0,r.jsx)("br",{}),(0,r.jsx)(p.$7,{fieldName:"instanceUrl",...g.yi,value:t.instanceUrl,initialValue:k.instanceUrl,type:h.xA,onChange:L,onSubmit:U,required:!0})]}),z=(0,r.jsx)(i.Z,{message:"Only Owncast instances available on the default SSL port 443 support this feature.",type:"warning",showIcon:!0}),H=R&&""!==new URL(R).port&&"443"!==new URL(R).port;return(0,r.jsxs)("div",{children:[(0,r.jsx)(e,{children:"Configure Social Features"}),(0,r.jsx)("p",{children:"Owncast provides the ability for people to follow and engage with your instance. It's a great way to promote alerting, sharing and engagement of your stream."}),(0,r.jsx)("p",{children:"Once enabled you'll alert your followers when you go live as well as gain the ability to compose custom posts to share any information you like."}),(0,r.jsx)("p",{children:(0,r.jsx)("a",{href:"https://owncast.online/docs/social",rel:"noopener noreferrer",target:"_blank",children:"Read more about the specifics of these social features."})}),(0,r.jsxs)(l.Z,{children:[(0,r.jsxs)(c.Z,{span:15,className:"form-module",style:{marginRight:"15px"},children:[q,H&&z,(0,r.jsx)(m.Z,{fieldName:"enabled",onChange:F,...g.Kl,checked:t.enabled,disabled:H||!A||!W}),(0,r.jsx)(m.Z,{fieldName:"isPrivate",...g.LC,checked:t.isPrivate,disabled:!E}),(0,r.jsx)(m.Z,{fieldName:"nsfw",useSubmit:!0,...g.B_,checked:t.nsfw,disabled:H||!A}),(0,r.jsx)(p.$7,{required:!0,fieldName:"username",type:h.Kx,...g.Xc,value:t.username,initialValue:P,onChange:L,disabled:!E}),(0,r.jsx)(p.$7,{fieldName:"goLiveMessage",...g.BF,type:h.Sk,value:t.goLiveMessage,initialValue:S,onChange:L,disabled:!E}),(0,r.jsx)(m.Z,{fieldName:"showEngagement",...g.FE,checked:t.showEngagement,disabled:!E})]}),(0,r.jsx)(c.Z,{span:8,className:"form-module",children:(0,r.jsx)(v.Y,{title:g.dR.label,placeholder:g.dR.placeholder,description:g.dR.tip,values:t.blockedDomains,handleDeleteIndex:function(e){t.blockedDomains.splice(e,1),M()},handleCreateString:function(e){let n;try{let t=new URL(e);n=t.host}catch(t){n=e}t.blockedDomains.push(n),L({fieldName:"blockedDomains",value:t.blockedDomains}),M()},submitStatus:(0,x.kg)(w)})})]}),a&&(0,r.jsx)(Z,{cancelPressed:function(){o(!1),n({...t,enabled:!1})},okPressed:function(){o(!1),n({...t,enabled:!0})}})]})};w.getLayout=function(e){return(0,r.jsx)(y.l,{page:e})},t.default=w},9008:function(e,t,n){e.exports=n(83121)},11163:function(e,t,n){e.exports=n(80880)},92703:function(e,t,n){"use strict";var r=n(50414);function a(){}function o(){}o.resetWarningCache=a,e.exports=function(){function e(e,t,n,a,o,s){if(s!==r){var i=Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw i.name="Invariant Violation",i}}function t(){return e}e.isRequired=e;var n={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:o,resetWarningCache:a};return n.PropTypes=n,n}},45697:function(e,t,n){e.exports=n(92703)()},50414:function(e){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"}},function(e){e.O(0,[173,164,2744,9680,4931,5402,2231,5818,492,7524,9915,180,6960,9774,2888,179],function(){return e(e.s=18957)}),_N_E=e.O()}]);