PageSourceSearch

https://www.elevolt.co.ke/_next/static/chunks/7656-b2cd94fa93c39153.js

js elevolt.co.ke collected 2026-10-04 21:46:27 UTC 11,070 bytes, 1 lines download raw bytes

1try{!function(){var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},s=(new e.Error).stack;s&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[s]="929e2733-0ded-45e9-9690-4d7a5df24082",e._sentryDebugIdIdentifier="sentry-dbid-929e2733-0ded-45e9-9690-4d7a5df24082")}()}catch(e){}"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7656],{1973:function(e,s,t){var a=t(52322),l=t(2369),n=t(92942),r=t(13980),i=t.n(r);t(2784);var o=t(42369);let d=e=>{let{items:s,message:t,description:r,icon:i,showIcon:o,action:d}=e;return(0,a.jsxs)("div",{className:"w-full h-full flex justify-center items-center flex-col p-8",children:[!!o&&(0,a.jsx)(n.FontAwesomeIcon,{className:"text-gray-400 mb-2 text-3xl",icon:i||l.wK3,size:"xl"}),!!s&&(0,a.jsxs)("p",{className:"text-gray-500 text-center font-medium",children:["We couldn't load any ",s,"."]}),!!t&&(0,a.jsx)("p",{className:"text-gray-500 text-center font-medium",children:t}),!!r&&(0,a.jsx)("p",{className:"text-gray-400 text-center text-sm mt-1",children:r}),!!d&&(0,a.jsx)("div",{className:"mt-4",children:d})]})};d.propTypes={showIcon:i().bool,items:i().string,message:i().string,description:i().string,icon:i().object,action:i().node};let c=e=>{let{className:s,isLoading:t,action:r,items:i,message:c,description:u,icon:m,showIcon:g,isError:x}=e;return(0,a.jsxs)("div",{className:"w-full bg-transparent text-center flex flex-col items-center ".concat(s),children:[!t&&!x&&(0,a.jsx)(d,{action:r,description:u,icon:m,items:i,message:c,showIcon:g}),!t&&!!x&&(0,a.jsxs)("div",{className:"w-full flex flex-col justify-center items-center text-red-500",children:[(0,a.jsx)(n.FontAwesomeIcon,{className:"mb-2",icon:l.eHv,size:"xl"}),(0,a.jsx)("p",{className:"text-center font-medium",children:c||"An error occurred loading ".concat(null!=i?i:"data","...")}),!!u&&(0,a.jsx)("p",{className:"text-red-400 text-center text-sm mt-1",children:u}),!!r&&(0,a.jsx)("div",{className:"mt-4",children:r})]}),!!t&&(0,a.jsx)("div",{className:"w-full flex justify-center items-center",children:(0,a.jsx)(o.Z,{size:"sm"})})]})};c.propTypes={items:i().string,message:i().string,description:i().string,icon:i().object,action:i().node,className:i().string,showIcon:i().bool,isLoading:i().bool,isError:i().bool};let u=e=>{let{items:s,message:t,description:l,icon:n,action:r,className:i,showIcon:o=!0,design:d,isLoading:u=!1,isError:m=!1}=e;return"wrapped"===d?(0,a.jsx)("div",{className:"w-full bg-blue-50 p-4 rounded border border-dashed",children:(0,a.jsx)(c,{action:r,className:i,description:l,icon:n,isError:m,isLoading:u,items:s,message:t,showIcon:o})}):(0,a.jsx)(c,{action:r,className:i,description:l,icon:n,isError:m,isLoading:u,items:s,message:t,showIcon:o})};u.propTypes={items:i().string,message:i().string,description:i().string,icon:i().object,action:i().node,className:i().string,showIcon:i().bool,design:i().oneOf(["wrapped","default"]),isLoading:i().bool,isError:i().bool},s.Z=u},68183:function(e,s,t){var a=t(52322),l=t(2369),n=t(92942),r=t(12524),i=t.n(r),o=t(13980),d=t.n(o),c=t(2784),u=t(95254),m=t(28516),g=t(47023),x=t(79663),p=t(65405),f=t(51634);let h=[{value:"cursive",label:"Script",fontFamily:'"Brush Script MT", cursive'},{value:"serif",label:"Formal",fontFamily:'"Times New Roman", serif'},{value:"handwriting",label:"Handwriting",fontFamily:'"Comic Sans MS", cursive'}],b=e=>{let s=h.find(s=>s.value===e);return(null==s?void 0:s.fontFamily)||h[0].fontFamily},y=c.memo(function(e){let{onSignatureChange:s,penColor:r="#000000"}=e,[i,o]=(0,c.useState)(null),d=(0,c.useRef)(null);(0,c.useEffect)(()=>{let e=!0;return t.e(2976).then(t.t.bind(t,12976,23)).then(s=>{e&&o(()=>s.default)}),()=>{e=!1}},[]);let u=(0,c.useCallback)(()=>{let e=d.current;e&&"function"==typeof e.toDataURL&&s(e.toDataURL("image/png"),"draw")},[s]),m=(0,c.useCallback)(()=>{let e=d.current;e&&"function"==typeof e.clear&&(e.clear(),s(null,"draw"))},[s]),x=(0,c.useCallback)(()=>{let e=d.current;if(e&&"function"==typeof e.toData){let t=e.toData();t&&t.length>0&&(t.pop(),e.fromData(t),s(0===t.length?null:e.toDataURL("image/png"),"draw"))}},[s]),p=(0,c.useMemo)(()=>({className:"w-full h-48",style:{width:"100%",height:"200px"}}),[]);return i?(0,a.jsxs)("div",{className:"w-full flex flex-col gap-2",children:[(0,a.jsxs)("div",{className:"border-2 border-dashed border-gray-300 rounded-lg bg-white relative",children:[(0,a.jsx)(i,{canvasProps:p,onEnd:u,penColor:r,ref:d}),(0,a.jsx)("div",{className:"absolute bottom-8 left-8 right-8 border-b border-gray-300"}),(0,a.jsx)("div",{className:"absolute bottom-4 left-8 text-xs text-gray-400",children:"Sign above the line"})]}),(0,a.jsxs)("div",{className:"mt-3 w-full flex flex-col gap-2",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)(g.Z,{beforeIcon:(0,a.jsx)(n.FontAwesomeIcon,{icon:l.X7o}),design:"plain",onClick:x,size:"sm",children:"Undo"}),(0,a.jsx)(g.Z,{beforeIcon:(0,a.jsx)(n.FontAwesomeIcon,{icon:l.xf2}),design:"plain",onClick:m,size:"sm",children:"Clear"})]}),(0,a.jsx)("p",{className:"text-xs text-gray-400",children:"Draw your signature using your mouse or touchscreen"})]})]}):(0,a.jsx)("div",{className:"border-2 border-dashed border-gray-300 rounded-lg bg-white relative",children:(0,a.jsx)("div",{className:"w-full h-48 flex items-center justify-center text-gray-400",children:"Loading signature pad..."})})});y.propTypes={onSignatureChange:d().func.isRequired,penColor:d().string};let j=c.memo(function(e){let{onSignatureChange:s}=e,[t,l]=(0,c.useState)(""),[n,r]=(0,c.useState)(h[0].value),o=(0,c.useRef)(null),d=(0,c.useMemo)(()=>b(n),[n]);(0,c.useEffect)(()=>
1{if(!t.trim()){s(null,"type");return}let e=o.current;if(!e)return;let a=e.getContext("2d");e.width=400,e.height=100,a.clearRect(0,0,e.width,e.height),a.fillStyle="#000000",a.font="48px ".concat(d),a.textBaseline="middle",a.fillText(t,20,50),s(e.toDataURL("image/png"),"type")},[t,d,s]);let m=(0,c.useCallback)(e=>{l(e.target.value)},[]),g=(0,c.useCallback)(e=>{r(e)},[]);return(0,a.jsxs)("div",{children:[(0,a.jsx)("div",{className:"my-4",children:(0,a.jsx)(u.o,{id:"typed-signature",label:"Type your full name",name:"typed-signature",onChange:m,placeholder:"Your full name",value:t})}),(0,a.jsxs)("fieldset",{className:"mb-4",children:[(0,a.jsx)("legend",{className:"block text-sm font-medium text-gray-700 mb-2",children:"Select font style"}),(0,a.jsx)("div",{className:"flex gap-2",role:"radiogroup",children:h.map(e=>(0,a.jsx)("button",{"aria-pressed":n===e.value,className:i()("px-4 py-2 border rounded-lg transition-colors",{"border-blue-500 bg-blue-50":n===e.value,"border-gray-200 hover:border-gray-300":n!==e.value}),onClick:()=>g(e.value),style:{fontFamily:e.fontFamily},type:"button",children:e.label},e.value))})]}),(0,a.jsxs)("div",{className:"border-2 border-dashed border-gray-300 rounded-lg bg-white p-4 relative",children:[(0,a.jsxs)("div",{className:"h-24 flex items-center text-4xl text-gray-900",style:{fontFamily:d},children:[!!t&&t,!t&&(0,a.jsx)("span",{className:"text-gray-300",children:"Your signature preview"})]}),(0,a.jsx)("div",{className:"border-b border-gray-300"})]}),(0,a.jsx)("canvas",{className:"hidden",ref:o})]})});j.propTypes={onSignatureChange:d().func.isRequired};let v=c.memo(function(e){let{onSignatureChange:s}=e,[t,r]=(0,c.useState)(null),[i,o]=(0,c.useState)(null);(0,c.useEffect)(()=>()=>{i&&URL.revokeObjectURL(i)},[i]);let d=(0,c.useCallback)(e=>{if(e&&e.length>0){let t=e[0];i&&URL.revokeObjectURL(i),r(t),o(URL.createObjectURL(t));let a=new FileReader;a.onload=e=>{s(e.target.result,"upload")},a.readAsDataURL(t)}},[s,i]),u=(0,c.useCallback)(()=>{i&&URL.revokeObjectURL(i),r(null),o(null),s(null,"upload")},[i,s]);return(0,a.jsxs)("div",{children:[!t&&(0,a.jsxs)("div",{className:"border-2 border-dashed border-gray-300 rounded-lg bg-white p-8 text-center my-4",children:[(0,a.jsx)(n.FontAwesomeIcon,{className:"text-4xl text-gray-300 mb-4",icon:l.cf$}),(0,a.jsx)("p",{className:"text-gray-600 mb-4",children:"Upload an image of your signature"}),(0,a.jsx)(m.Z,{accept:"image/*",label:"Choose Image",name:"signature-upload",onChange:d}),(0,a.jsx)("p",{className:"text-xs text-gray-400 mt-4",children:"Supported formats: PNG, JPG, GIF (max 2MB)"})]}),!!t&&(0,a.jsxs)("div",{children:[(0,a.jsx)("div",{className:"border-2 border-dashed border-gray-300 rounded-lg bg-white p-4 flex items-center justify-center my-4",children:(0,a.jsx)("img",{alt:"Uploaded signature",className:"max-h-40 object-contain",src:i})}),(0,a.jsx)("div",{className:"mt-3",children:(0,a.jsx)(g.Z,{design:"secondary",onClick:u,size:"sm",children:"Remove Image"})})]})]})});v.propTypes={onSignatureChange:d().func.isRequired};let w={draw:{id:"draw",label:"Draw",icon:l.IwR},type:{id:"type",label:"Type",icon:l.yGG},upload:{id:"upload",label:"Upload",icon:l.cf$}},N=["draw","type","upload"],C=["draw","type","upload"],I=e=>{let{onChange:s,penColor:t="#000000",defaultMode:l="draw",showModes:r=C,className:o}=e,d=(0,c.useMemo)(()=>r.filter(e=>N.includes(e)),[r]),u=(0,c.useMemo)(()=>d.includes(l)?l:d[0]||"draw",[l,d]),[m,g]=(0,c.useState)(u),[h,b]=(0,c.useState)(null),I=(0,c.useCallback)((e,t)=>{b(e),s&&s({dataUrl:e,mode:t,isEmpty:!e})},[s]),R=(0,c.useCallback)(e=>{let t=d[e];t&&(g(t),b(null),s&&s({dataUrl:null,mode:t,isEmpty:!0}))},[d,s]),k=(0,c.useMemo)(()=>d.map(e=>w[e]).filter(Boolean),[d]),S=d.indexOf(m);return 0===d.length?(0,a.jsx)("div",{className:i()("signature-pad",o),children:(0,a.jsx)("p",{className:"text-gray-500 text-sm",children:"No signature modes available. Please configure showModes prop."})}):(0,a.jsxs)("div",{className:i()("signature-pad",o),children:[(0,a.jsxs)(x.ZP,{activeIndex:S,onChange:R,syncWithUrl:!1,children:[k.map(e=>(0,a.jsx)(p.Z,{label:(0,a.jsxs)("span",{className:"flex items-center gap-2",children:[(0,a.jsx)(n.FontAwesomeIcon,{icon:e.icon}),e.label]})},e.id)),!!d.includes("draw")&&(0,a.jsx)(f.Z,{children:(0,a.jsx)(y,{onSignatureChange:I,penColor:t})}),!!d.includes("type")&&(0,a.jsx)(f.Z,{children:(0,a.jsx)(j,{onSignatureChange:I})}),!!d.includes("upload")&&(0,a.jsx)(f.Z,{children:(0,a.jsx)(v,{onSignatureChange:I})})]}),!!h&&(0,a.jsxs)("div",{className:"mt-4 p-3 bg-green-50 border border-green-200 rounded-lg flex items-center gap-2",children:[(0,a.jsx)("div",{"aria-hidden":"true",className:"w-2 h-2 bg-green-500 rounded-full"}),(0,a.jsx)("span",{className:"text-sm text-green-700",children:"Signature captured"})]})]})};I.propTypes={onChange:d().func.isRequired,penColor:d().string,defaultMode:d().oneOf(["draw","type","upload"]),showModes:d().arrayOf(d().oneOf(["draw","type","upload"])),className:d().string},s.Z=I},51634:function(e,s,t){var a=t(52322),l=t(13980),n=t.n(l);let r=(0,t(2784).memo)(function(e){let{children:s,padding:t=0,className:l=""}=e;return(0,a.jsx)("div",{className:"w-full ".concat(t?"p-".concat(t):""," ").concat(l).trim(),children:s})});
1r.displayName="TabPanel",r.propTypes={children:n().node,padding:n().oneOfType([n().number,n().string]),className:n().string},s.Z=r}}]);

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.