1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[490,292],{6292:function(e,r,t){t.r(r),t.d(r,{SubscribeForm:function(){return SubscribeForm}});var s=t(216),l=t(890),i=t(9405),a=t(8641),n=t(8448);let SubscribeForm=()=>{let[e,r]=(0,i.useState)(),[t,o]=(0,i.useState)(!1),u=(0,i.useRef)(null),{publication:d}=(0,n.b)(),subscribe=async()=>{var e,t,s,i;let n=null===(e=u.current)||void 0===e?void 0:e.value;if(n){o(!0);try{let e=await (0,l.ZP)("https://gql.hashnode.com",a.HZ,{input:{publicationId:d.id,email:n}});o(!1),r(e.subscribeToNewsletter.status)}catch(r){let e=null===(i=r.response)||void 0===i?void 0:null===(s=i.errors)||void 0===s?void 0:null===(t=s[0])||void 0===t?void 0:t.message;e&&window.alert(e),o(!1)}}};return(0,s.jsxs)(s.Fragment,{children:[!e&&(0,s.jsxs)("div",{className:"relative w-full rounded-full bg-white p-2 dark:bg-neutral-950",children:[(0,s.jsx)("input",{ref:u,type:"email",placeholder:"[email protected]",className:"focus:outline-primary-600 dark:focus:outline-primary-500 left-3 top-3 w-full rounded-full p-3 text-base text-black outline-none dark:bg-neutral-950 dark:text-neutral-50"}),(0,s.jsx)("button",{disabled:t,onClick:subscribe,className:"bg-primary-600 dark:bg-primary-600 absolute right-3 top-3 rounded-full px-3 py-2 text-white disabled:cursor-not-allowed disabled:opacity-80",children:"Subscribe"})]}),"PENDING"===e&&(0,s.jsxs)("div",{className:"relative w-full p-2 text-center",children:[(0,s.jsx)("p",{className:"font-bold text-green-600 dark:text-green-500",children:"Almost there!"}),(0,s.jsxs)("p",{className:"font-medium text-slate-600 dark:text-neutral-300",children:["Check your inbox for a confirmation email and click"," ",(0,s.jsx)("strong",{children:'"Confirm and Subscribe"'})," to complete your subscription. Thanks for joining us!"]})]})]})}},2490:function(e,r,t){t.r(r),t.d(r,{Subscribe:function(){return Subscribe}});var s=t(216),l=t(9126),i=t(2052),a=t(7199),n=t(6292);let Subscribe=()=>(0,s.jsx)("div",{className:"fixed z-50 bottom-10 right-10",children:(0,s.jsxs)(l.fC,{children:[(0,s.jsx)(l.xz,{asChild:!0,children:(0,s.jsx)(i.z,{label:"Subscribe",type:"outline",icon:(0,s.jsx)(a.CG,{className:"w-5 h-5 fill-current"}),className:"!bg-white dark:!bg-neutral-950"})}),(0,s.jsx)(l.h_,{children:(0,s.jsxs)(l.VY,{className:"w-[350px] rounded-xl border bg-white p-5 shadow-xl dark:border-neutral-800 dark:bg-neutral-900 md:w-[500px]",align:"end",sideOffset:5,children:[(0,s.jsx)("h3",{className:"mb-2 text-base font-semibold text-center text-primary-600",children:"Subscribe to our newsletter for updates and changelog."}),(0,s.jsx)(n.SubscribeForm,{})]})})]})})}}]);
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.