1"use strict";(self.webpackChunkmedicos_pdf=self.webpackChunkmedicos_pdf||[]).push([[6639],{54073:function(e,r,t){t(72791);var a=t(80184);r.Z=function(e){return(0,a.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",className:e.className,fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})}},88437:function(e,r,t){t(72791);var a=t(80184);r.Z=function(e){return(0,a.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",className:e.className,fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M10 14l2-2m0 0l2-2m-2 2l-2-2m2 2l2 2m7-2a9 9 0 11-18 0 9 9 0 0118 0z"})})}},6639:function(e,r,t){t.r(r),t.d(r,{default:function(){return m}});var a=t(15861),n=t(70885),s=t(64687),l=t.n(s),i=t(72791),u=t(30577),o=t(65414),c=t(88437),d=(t(54073),t(80184)),m=function(e){var r=e.exit,s=function(){return Promise.all([t.e(9565).then(t.bind(t,19565))]).then((function(e){return{firestore:(0,n.Z)(e,1)[0]}}))},m=(0,i.useContext)(o.V).user,h=(0,i.useState)(""),v=(0,n.Z)(h,2),p=v[0],x=v[1],f=(0,i.useState)(""),k=(0,n.Z)(f,2),j=k[0],w=k[1],g=(0,i.useState)(""),b=(0,n.Z)(g,2),N=b[0],q=b[1],Z=(0,i.useState)(""),y=(0,n.Z)(Z,2),C=y[0],B=y[1],A=(0,i.useState)(""),S=(0,n.Z)(A,2),P=S[0],L=S[1],W=(0,i.useState)(!0),_=(0,n.Z)(W,2),z=(_[0],_[1]);function E(){return(E=(0,a.Z)(l().mark((function e(){var t,a,n,i,o,c;return l().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!m||""===C||""===j||""===p){e.next=28;break}if(t=/^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9-]+(?:\.[a-zA-Z0-9-]+)*$/,!p.match(t)){e.next=25;break}return e.prev=3,e.next=6,s();case 6:a=e.sent,n=a.firestore,i=n.db,o=n.addDoc,c=n.collection,o(c(i,"resource_requests"),{username:j,title:C,email:p,writer:P,remarks:N,submit_date:new Date}),q(""),B(""),w(""),x(""),u.Am.success("Request successfully submitted",{theme:"dark",hideProgressBar:!0}),z(r),e.next=23;break;case 20:e.prev=20,e.t0=e.catch(3),u.Am.error("Error while requesting ",{theme:"dark",hideProgressBar:!0});case 23:e.next=26;break;case 25:u.Am.error("invalid email ",{theme:"dark",hideProgressBar:!0});case 26:e.next=29;break;case 28:u.Am.error("Please Enter some text",{theme:"dark",hideProgressBar:!0});case 29:case"end":return e.stop()}}),e,null,[[3,20]])})))).apply(this,arguments)}return(0,d.jsx)(d.Fragment,{children:(0,d.jsx)("div",{className:"requestmodal-wrapper",children:(0,d.jsxs)("div",{className:"requestmodal-wrapper-container",children:[(0,d.jsx)("div",{className:"close",onClick:r,children:(0,d.jsx)(c.Z,{className:"close-icon"})}),(0,d.jsx)("h5",{className:"heading",children:"Request for Book"}),(0,d.jsxs)("div",{className:"requestmodal-wrapper-container-username",children:[(0,d.jsx)("label",{children:"Your Name"}),(0,d.jsx)("input",{onChange:function(e){var r;return w(null===e||void 0===e||null===(r=e.target)||void 0===r?void 0:r.value)},value:j,type:"text",placeholder:"Write your name",required:"true"})]}),(0,d.jsxs)("div",{className:"requestmodal-wrapper-container-username",children:[(0,d.jsx)("label",{children:"Email"}),(0,d.jsx)("input",{onChange:function(e){var r;return x(null===e||void 0===e||null===(r=e.target)||void 0===r?void 0:r.value)},value:p,type:"email",placeholder:"Write your email",required:!0,name:"inputemail"})]}),(0,d.jsxs)("div",{className:"requestmodal-wrapper-container-username",children:[(0,d.jsx)("label",{children:"Book Name"}),(0,d.jsx)("input",{onChange:function(e){var r;return B(null===e||void 0===e||null===(r=e.target)||void 0===r?void 0:r.value)},value:C,type:"text",placeholder:"",required:!0})]}),(0,d.jsxs)("div",{className:"requestmodal-wrapper-container-username",children:[(0,d.jsx)("label",{children:"Aurthor Name"}),(0,d.jsx)("input",{onChange:function(e){var r;return L(null===e||void 0===e||null===(r=e.target)||void 0===r?void 0:r.value)},value:P,type:"text",placeholder:"",required:!0})]}),(0,d.jsxs)("div",{className:"requestmodal-wrapper-container-remarks",children:[(0,d.jsx)("label",{children:"Remarks"}),(0,d.jsx)("textarea",{onChange:function(e){var r;return q(null===e||void 0===e||null===(r=e.target)||void 0===r?void 0:r.value)},value:N,type:"text",placeholder:"Write your remarks",required:"true"})]}),(0,d.jsx)("div",{className:"request",children:(0,d.jsx)("button",{className:"requestButton",type:"submit",onClick:function(){return E.apply(this,arguments)},children:"Submit"})})]})})})}}}]); 2//# sourceMappingURL=6639.76f3ff0e.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.