1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[956],{6618:function(t,e,r){"use strict";r.d(e,{l:function(){return m}});var n=r(63),o=r(4915),i=r(5284),s=r(227),a=r(9676),c=r(4461),u=r(3808),l=r(7294),p=r(6729);function d(){return(d=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t}).apply(this,arguments)}var m=(0,n.G)(((t,e)=>{var r,n=(0,o.m)("FormLabel",t),a=(0,i.Lr)(t),{children:u,requiredIndicator:m=l.createElement(f,null)}=a,h=function(t,e){if(null==t)return{};var r,n,o={},i=Object.keys(t);for(n=0;n<i.length;n++)r=i[n],e.indexOf(r)>=0||(o[r]=t[r]);return o}(a,["className","children","requiredIndicator"]),g=(0,p.NJ)(),y=null!=(r=null==g?void 0:g.getLabelProps(h,e))?r:d({ref:e},h);return l.createElement(s.m$.label,d({},y,{className:(0,c.cx)("chakra-form__label",a.className),__css:d({display:"block",textAlign:"start"},n)}),u,null!=g&&g.isRequired?m:null)}));u.Ts&&(m.displayName="FormLabel");var f=(0,n.G)(((t,e)=>{var r=(0,p.NJ)(),n=(0,a.yK)();if(null==r||!r.isRequired)return null;var o=(0,c.cx)("chakra-form__required-indicator",t.className);return l.createElement(s.m$.span,d({},null==r?void 0:r.getRequiredIndicatorProps(t,e),{__css:n.requiredIndicator,className:o}))}));u.Ts&&(f.displayName="RequiredIndicator")},17:function(t,e,r){"use strict";r.d(e,{g:function(){return m}});var n=r(2202),o=r(63),i=r(4915),s=r(5284),a=r(227),c=r(5505),u=r(4461),l=r(3808),p=r(7294);function d(){return(d=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t}).apply(this,arguments)}var m=(0,o.G)(((t,e)=>{var r=(0,i.m)("Textarea",t),o=(0,s.Lr)(t),{className:l,rows:m}=o,f=function(t,e){if(null==t)return{};var r,n,o={},i=Object.keys(t);for(n=0;n<i.length;n++)r=i[n],e.indexOf(r)>=0||(o[r]=t[r]);return o}(o,["className","rows"]),h=(0,n.Y)(f),g=m?(0,c.CE)(r,["h","minH","height","minHeight"]):r;return p.createElement(a.m$.textarea,d({ref:e,rows:m},h,{className:(0,u.cx)("chakra-textarea",l),__css:g}))}));l.Ts&&(m.displayName="Textarea")},4559:function(t,e,r){"use strict";r.d(e,{F:function(){return i}});var n=r(5893),o=(r(7294),r(9008));function i(t){return(0,n.jsx)(n.Fragment,{children:(0,n.jsxs)(o.default,{children:[(0,n.jsx)("meta",{name:"title",content:"Cusdis - Lightweight, privacy-first, open-source comment system"}),(0,n.jsx)("meta",{name:"description",content:"Cusdis is an open-source, lightweight (~5kb gzipped), privacy-first alternative to Disqus. It's super easy to use and integrate with your existed website"}),(0,n.jsx)("meta",{property:"og:type",content:"website"}),(0,n.jsx)("meta",{property:"og:url",content:"https://cusdis.com/"}),(0,n.jsx)("meta",{property:"og:title",content:"Cusdis - Lightweight, privacy-first, open-source comment system"}),(0,n.jsx)("meta",{property:"og:description",content:"Cusdis is an open-source, lightweight (~5kb gzipped), privacy-first alternative to Disqus. It's super easy to use and integrate with your existed website"}),(0,n.jsx)("meta",{property:"og:image",content:"https://cusdis.com/images/og.png"}),(0,n.jsx)("meta",{property:"twitter:card",content:"summary_large_image"}),(0,n.jsx)("meta",{property:"twitter:url",content:"https://cusdis.com/"}),(0,n.jsx)("meta",{property:"twitter:title",content:"Cusdis - Lightweight, privacy-first, open-source comment system"}),(0,n.jsx)("meta",{property:"twitter:description",content:"Cusdis is an open-source, lightweight (~5kb gzipped), privacy-first alternative to Disqus. It's super easy to use and integrate with your existed website"}),(0,n.jsx)("meta",{property:"twitter:image",content:"https://cusdis.com/images/og.png"}),(0,n.jsx)("title",{children:t.title})]})})}},7816:function(t,e,r){"use strict";r.r(e),r.d(e,{__N_SSP:function(){return A},default:function(){return z}});var n=r(5893),o=r(5205),i=r(809),s=r.n(i),a=r(266),c=r(2572),u=r(3850),l=r(6034),p=r(4115),d=r(63),m=r(4915),f=r(5284),h=r(227),g=r(4461),y=r(3808),v=r(7294);function x(){return(x=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];
1for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t}).apply(this,arguments)}function b(t,e){if(null==t)return{};var r,n,o={},i=Object.keys(t);for(n=0;n<i.length;n++)r=i[n],e.indexOf(r)>=0||(o[r]=t[r]);return o}var j=(0,d.G)(((t,e)=>{var r=(0,m.m)("Divider",t),{borderLeftWidth:n,borderBottomWidth:o,borderTopWidth:i,borderRightWidth:s,borderWidth:a,borderStyle:c,borderColor:u}=r,l=b(r,["borderLeftWidth","borderBottomWidth","borderTopWidth","borderRightWidth","borderWidth","borderStyle","borderColor"]),p=(0,f.Lr)(t),{className:d,orientation:y="horizontal",__css:j}=p,w=b(p,["className","orientation","__css"]),_={vertical:{borderLeftWidth:n||s||a||"1px",height:"100%"},horizontal:{borderBottomWidth:o||i||a||"1px",width:"100%"}};return v.createElement(h.m$.hr,x({ref:e,"aria-orientation":y},w,{__css:x({},l,{border:"0",borderColor:u,borderStyle:c},_[y],j),className:(0,g.cx)("chakra-divider",d)}))}));y.Ts&&(j.displayName="Divider");var w=r(980),_=r(336),k=r(9444),N=r(8017),C=r(6729),O=r(6618),S=r(17),L=r(1163),E=r(8767),q=r(4559),I=r(8886),W=function(){var t=(0,a.Z)(s().mark((function t(e){var r,n;return s().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=e.token,t.next=3,I.x.post("/open/approve?token=".concat(r));case 3:return n=t.sent,t.abrupt("return",n.data);case 5:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),T=function(){var t=(0,a.Z)(s().mark((function t(e){var r,n,o;return s().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=e.replyContent,n=e.token,t.next=3,I.x.post("/open/approve?token=".concat(n),{replyContent:r});case 3:return o=t.sent,t.abrupt("return",o.data);case 5:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}();var A=!0,z=function(t){var e=(0,L.useRouter)(),r=(0,w.useToast)(),i=v.useState(""),s=(0,o.Z)(i,2),a=s[0],d=s[1],m=(0,E.useMutation)(T,{onSuccess:function(){r({title:"Success",status:"success",position:"top"}),d("")},onError:function(){r({title:"Something went wrong",status:"error",position:"top"})}}),f=(0,E.useMutation)(W,{onSuccess:function(){r({title:"Success",status:"success",position:"top"}),location.reload()},onError:function(){r({title:"Something went wrong",status:"error",position:"top"})}});return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(q.F,{title:"New comment - Cusdis"}),(0,n.jsxs)(u.W,{mt:12,my:12,children:[(0,n.jsx)(_.X,{mb:12,children:"Cusdis"}),(0,n.jsxs)(l.gC,{alignItems:"start",spacing:4,children:[(0,n.jsxs)(p.x,{children:["New comment on project ",(0,n.jsx)("strong",{children:t.comment.page.project.title}),", page ",(0,n.jsx)(k.r,{fontWeight:"bold",isExternal:!0,href:t.comment.page.url,children:t.comment.page.title||t.comment.page.slug})]}),(0,n.jsxs)(p.x,{children:[(0,n.jsx)("strong",{children:t.comment.by_nickname})," (",t.comment.by_email||"Email not provided",")"]}),(0,n.jsx)(p.x,{whiteSpace:"pre-wrap",as:"pre",bgColor:"gray.100",p:2,w:"full",children:t.comment.content}),(0,n.jsx)(N.xu,{children:t.comment.approved?(0,n.jsx)(c.z,{disabled:!0,children:"Approved"}):(0,n.jsx)(c.z,{onClick:function(t){f.mutate({token:e.query.token})},isLoading:f.isLoading,colorScheme:"telegram",children:"Approve"})})]}),(0,n.jsx)(j,{my:8}),(0,n.jsxs)(l.gC,{mt:4,alignItems:"start",children:[(0,n.jsxs)(C.NI,{children:[(0,n.jsx)(O.l,{children:"Append reply as moderator"}),(0,n.jsx)(S.g,{value:a,onChange:function(t){return d(t.target.value)}})]}),(0,n.jsx)(p.x,{fontSize:"sm",color:"gray.500",children:"* Appending reply to a comment will automatically approve the comment"})]}),(0,n.jsx)(c.z,{onClick:function(t){m.mutate({token:e.query.token,replyContent:a})},isLoading:m.isLoading,mt:4,children:"Append"})]})]})}},8886:function(t,e,r){"use strict";r.d(e,{x:function(){return o},q:function(){return i}});var n=r(9669),o=r.n(n)().create({baseURL:"/api",headers:{"x-timezone-offset":-(new Date).getTimezoneOffset()}}),i="1.2.1"},7354:function(t,e,r){(window.__NEXT_P=window.__NEXT_P||[]).push(["/open/approve",function(){return r(7816)}])},1163:function(t,e,r){t.exports=r(4651)},5205:function(t,e,r){"use strict";function n(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function o(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){if("undefined"!==typeof Symbol&&Symbol.iterator in Object(t)){var r=[],n=!0,o=!1,i=void 0;try{for(var s,a=t[Symbol.iterator]();!(n=(s=a.next()).done)&&(r.push(s.value),!e||r.length!==e);n=!0);}catch(c){o=!0,i=c}finally{try{n||null==a.return||a.return()}finally{if(o)throw i}}return r}}(t,e)||function(t,e){if(t){if("string"===typeof t)return n(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?n(t,e):void 0}}
1(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}r.d(e,{Z:function(){return o}})}},function(t){t.O(0,[774,115,515,500,888,179],(function(){return e=7354,t(t.s=e);var e}));var e=t.O();_N_E=e}]);
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.