1/*! For license information please see 814.a6bc607d.chunk.js.LICENSE.txt */ 2"use strict";(self.webpackChunkweb=self.webpackChunkweb||[]).push([[814],{9028:function(e,t,n){n.d(t,{Z:function(){return s}});var a=n(27378),l=n(21784),r=n(98889),c=n(64790);function s(e){var t=e.className,n=void 0===t?"":t,s=e.wrappedInLink,u=void 0!==s&&s;return a.createElement("ul",{className:"flex items-center "+n},a.createElement("li",null,u?a.createElement(r.Link,{to:r.routes.home()},a.createElement("div",{className:"ml-2 overflow-hidden rounded-full"},a.createElement(c.Z,{className:"w-10",name:"favicon"}))):a.createElement("div",null,a.createElement("div",{className:"ml-2 overflow-hidden rounded-full"},a.createElement(c.Z,{className:"w-10",name:"favicon"})))),a.createElement("li",null,a.createElement(l.ZP,{title:"Very alpha, there's lots of work todo"},a.createElement("div",{className:"flex ml-4"},a.createElement("h2",{className:"py-1 text-2xl text-indigo-300 md:text-5xl font-ropa-sans md:tracking-wider",style:{letterSpacing:"0.3em"}},"CadHub"),a.createElement("div",{className:"hidden text-sm font-bold text-pink-400 font-ropa-sans md:block",style:{paddingBottom:"2rem",marginLeft:"-1.8rem"}},"pre-alpha")))))}},53676:function(e,t,n){n.d(t,{Qq:function(){return v},ZP:function(){return g}});var a,l,r=n(17462),c=n(31786),s=n(27378),u=n(18182),m=n(30283),o=(n(24441),n(81996)),i=n.n(o),d=n(81006),E=n(98889),f=(0,u.ZP)(a||(a=(0,r.Z)(["\n mutation DeleteSubjectAccessRequestMutation($id: String!) {\n deleteSubjectAccessRequest(id: $id) {\n id\n }\n }\n"]))),h=function(e){var t=e;return e&&e.length>150&&(t=t.substring(0,150)+"..."),t},p=function(e){return s.createElement("time",{dateTime:e,title:e},new Date(e).toUTCString())},b=function(e){var t=e.subjectAccessRequests,n=(0,c.useMutation)(f,{onCompleted:function(){d.toast.success("SubjectAccessRequest deleted.")},refetchQueries:[{query:v}],awaitRefetchQueries:!0}),a=(0,m.Z)(n,1)[0];return s.createElement("div",{className:"rw-segment rw-table-wrapper-responsive"},s.createElement("table",{className:"rw-table"},s.createElement("thead",null,s.createElement("tr",null,s.createElement("th",
2null,"Id"),s.createElement("th",null,"Comment"),s.createElement("th",null,"Payload"),s.createElement("th",null,"User id"),s.createElement("th",null,"Created at"),s.createElement("th",null,"Updated at"),s.createElement("th",null,"Â "))),s.createElement("tbody",null,i()(t).call(t,(function(e){return s.createElement("tr",{key:e.id},s.createElement("td",null,h(e.id)),s.createElement("td",null,h(e.comment)),s.createElement("td",null,h(e.payload)),s.createElement("td",null,h(e.userId)),s.createElement("td",null,p(e.createdAt)),s.createElement("td",null,p(e.updatedAt)),s.createElement("td",null,s.createElement("nav",{className:"rw-table-actions"},s.createElement(E.Link,{to:E.routes.subjectAccessRequest({id:e.id}),title:"Show subjectAccessRequest "+e.id+" detail",className:"rw-button rw-button-small"},"Show"),s.createElement(E.Link,{to:E.routes.editSubjectAccessRequest({id:e.id}),title:"Edit subjectAccessRequest "+e.id,className:"rw-button rw-button-small rw-button-blue"},"Edit"),s.createElement("a",{href:"#",title:"Delete subjectAccessRequest "+e.id,className:"rw-button rw-button-small rw-button-red",onClick:function(){return t=e.id,void(confirm("Are you sure you want to delete subjectAccessRequest "+t+"?")&&a({variables:{id:t}}));var t}},"Delete"))))})))))},v=(0,u.ZP)(l||(l=(0,r.Z)(["\n query SUBJECT_ACCESS_REQUESTS {\n subjectAccessRequests {\n id\n comment\n payload\n userId\n createdAt\n updatedAt\n }\n }\n"]))),g=(0,c.createCell)({QUERY:v,Loading:function(){return s.createElement("div",null,"Loading...")},Empty:function(){return s.createElement("div",{className:"rw-text-center"},"No subjectAccessRequests yet.")},Success:function(e){var t=e.subjectAccessRequests;return s.createElement(b,{subjectAccessRequests:t})}})},82912:function(e,t,n){n.d(t,{Z:function(){return S}});var a=n(30283),l=n(62286),r=n.n(l),c=n(28355),s=n.n(c),u=n(27378),m=n(98889),o=n(51896),i=n(81006),d=n(13747),E=n(91729),f=n(16064),h=function(){return u.createElement("div",{className:"bg-indigo-900 text-indigo-200 font-roboto text-sm"},u.createElement("div",{className:"flex h-16 md:justify-end items-center mx-2 md:mx-16 flex-wrap"},u.createElement(f.Z,{className:"mr-8",to:"https://github.com/Irev-Dev/cadhub"},"Github"),u.createElement(f.Z,{className:"mr-8",to:"https://learn.cadhub.xyz/"},"Docs"),u.createElement(f.Z,{className:"mr-8",to:"https://github.com/Irev-Dev/cadhub/discussions/212"},"Road Map"),u.createElement(f.Z,{className:"mr-8",to:"https://learn.cadhub.xyz/blog"},"Blog"),u.createElement(m.Link,{className:"mr-8",to:m.routes.codeOfConduct()},"Code of Conduct"),u.createElement(m.Link,{to:m.routes.privacyPolicy()},"Privacy Policy")))},p=n(51065),b=n(50156),v=n(19440),g=n(21742),N=n(88956),w=n(99680),y=n(19914),x=n(9028),A="",S=function(e){var t,n=e.children,l=e.shouldRemoveFooterInIde,c=(0,o.useAuth)(),f=c.logOut,S=c.isAuthenticated,Z=c.currentUser,j=c.client,R=(0,w.Z)(),q=R.user,C=R.loading,k=(0,u.useState)(!1),P=(0,a.Z)(k,2),I=P[0],L=P[1],U=(0,m.useLocation)(),Q=U.pathname,T=U.params;return(0,u.useEffect)((function(){var e,t=r()(e="".concat(Q||"")).call(e,T||"");A!==t&&(v.ZP.pageview(t),A=t)}),[Q,T]),g.isBrowser&&(t=window.location.hash),(0,u.useEffect)((function(){var e=s()(t).call(t,1).split("="),n=(0,a.Z)(e,2),l=n[0],r=n[1];"confirmation_token"===l?j.confirm(r,!0).then((function(){i.toast.success("Email confirmed")})).catch((function(){i.toast.error("Problem confirming email")})):"recovery_token"===l&&j.recover(r,!0).then((function(){(0,m.navigate)(m.routes.updatePassword())})).catch((function(){i.toast.error("Problem recovering account")}))}),[t,j]),u.createElement("div",{className:"flex flex-col h-full overflow-x-hidden overflow-y-scroll ch-scrollbar",style:{perspective:"1px",perspectiveOrigin:"top center"}},u.createElement("header",{id:"cadhub-main-header"},u.createElement("nav",{className:"flex justify-between h-16 sm:px-4 bg-ch-gray-900"},u.createElement(x.Z,null),u.createElement("ul",{className:"flex items-center"},u.createElement("li",{className:(0,E.L)("mr-1 sm:mr-4 md:mr-8 h-8 w-8 md:h-10 md:w-10 flex items-center justify-center")},u.createElement(b.ZP,null)),S?u.createElement("li",{className:"w-10 h-10"},u.createElement(d.J,{className:"relative w-full h-full outline-none"},u.createElement(d.J.Button,{disabled:!S||!Z,className:"w-full h-full border-2 rounded-full outline-none border-ch-gray-400"},!C&&u.createElement(N.o,{width:80,className:"object-cover rounded-full",imageId:null==q?void 0:q.image})),Z&&u.createElement(d.J.Panel,{className:"absolute right-0 z-10 w-48 px-3 py-2 mt-4 overflow-hidden rounded shadow-md bg-ch-gray-700 text-ch-gray-300"},u.createElement(m.Link,{to:m.routes.user({userName:null==q?void 0:q.userName})},u.createElement("p",{className:"my-2 text-sm leading-4 text-ch-blue-400 font-fira-code"},"Hello ",null==q?void 0:q.name)),u.createElement(m.Link,{className:"block my-2 hover:text-ch-pink-300",to:m.routes.user({userName:null==q?void 0:q.userName})}
2,u.createElement("div",null,"View Your Profile")),u.createElement("a",{href:"#",onClick:f,className:"my-2 text-ch-gray-400 hover:text-ch-pink-300"},"Logout"),u.createElement("hr",{className:"my-4"}),u.createElement("p",{className:"text-sm leading-4 text-ch-blue-400 font-fira-code"},"Recent Projects"),u.createElement(y.ZP,{userName:null==q?void 0:q.userName})))):u.createElement("li",null,u.createElement("a",{href:"#",className:"px-2 py-2 mr-1 border-2 rounded-full text-ch-gray-300 sm:mr-2 sm:px-4 border-ch-gray-400 hover:bg-ch-gray-600",onClick:function(){v.ZP.event({category:"login",action:"navbar login"}),L(!0)}},"Sign In/Up"))))),u.createElement(i.Toaster,{timeout:1500}),u.createElement(p.Z,{open:I,onClose:function(){return L(!1)}}),u.createElement("main",{className:"flex-grow bg-ch-gray-800 preserve-3d-for-children"},n),!l&&u.createElement(h,null))}},51648:function(e,t,n){n.r(t),n.d(t,{QUERY:function(){return v}});var a,l,r=n(30283),c=n(17462),s=n(24441),u=n.n(s),m=n(18182),o=n(27378),i=n(53676),d=n(31786),E=n(74857),f=n(82912),h=n(36055),p=n(78846),b=n(73487),v=(0,m.ZP)(a||(a=(0,c.Z)(["\n query SUBJECT_ACCESS_REQUEST($userName: String!) {\n userName(userName: $userName) {\n id\n userName\n email\n name\n createdAt\n updatedAt\n image\n bio\n Projects {\n id\n title\n description\n code\n mainImage\n createdAt\n updatedAt\n deleted\n }\n Reaction {\n id\n emote\n project {\n id\n title\n }\n createdAt\n updatedAt\n }\n Comment {\n id\n text\n project {\n id\n title\n }\n createdAt\n updatedAt\n }\n SubjectAccessRequest {\n id\n comment\n createdAt\n updatedAt\n }\n }\n }\n"]))),g=(0,m.ZP)(l||(l=(0,c.Z)(["\n mutation CreateSubjectAccessRequestMutation(\n $input: CreateSubjectAccessRequestInput!\n ) {\n createSubjectAccessRequest(input: $input) {\n id\n comment\n payload\n userId\n createdAt\n updatedAt\n }\n }\n"])));t.default=function(){var e=(0,o.useState)({}),t=(0,r.Z)(e,2),n=t[0],a=t[1],l=(0,d.useQuery)(v,{skip:!n.userName,variables:{userName:n.userName}}).data,c=u()(null==l?void 0:l.userName),s=(0,d.useMutation)(g,{onCompleted:function(){b.toast.success("SubjectAccessRequest created.")}}),m=(0,r.Z)(s,1)[0];return(0,o.useEffect)((function(){var e;c&&m({variables:{input:{comment:null==n?void 0:n.comment,payload:c,userId:null==l||null===(e=l.userName)||void 0===e?void 0:e.id}}})}),[c]),o.createElement(f.Z,null,o.createElement(h.Z,{title:"Subject Access Request",description:"Code of Conduct",lang:"en-US"}),o.createElement("section",{className:"max-w-6xl mx-auto mt-20"},o.createElement(i.ZP,null),"Here to fulfill a user's right to portability, before running this please check that the query in",'"pages/SubjectAccessRequestPage/SubjectAccessRequestPage.js"'," is up-to-date.",o.createElement(E.Form,{onSubmit:function(e){a(e)}},o.createElement("div",{className:"grid items-center gap-2",style:{gridTemplateColumns:"auto 1fr"}},o.createElement("span",{className:"capitalize text-gray-500 text-sm align-middle my-3"},"userName:"),o.createElement(p.Z,{className:"text-xl",name:"userName",validation:{required:!0}}),o.createElement("div",null),o.createElement("div",{className:"mt-10"},"Please add how they made the request, who is fulling it (who you are) and any other details"),o.createElement("span",{className:"capitalize text-gray-500 text-sm align-middle my-3"},"comment:"),o.createElement(p.Z,{className:"text-xl",name:"comment",validation:{required:!0}})),o.createElement(E.Submit,{className:"bg-indigo-200 text-indigo-800 p-2 px-4 shadow hover:shadow-lg mt-4 rounded"},"Submit")),o.createElement("pre",{className:"whitespace-pre-wrap"},c)))}}}]); 3//# sourceMappingURL=814.a6bc607d.chunk.js.map
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.