PageSourceSearch

https://eye-alarm.netlify.app/static/js/main.118a98e4.chunk.js

js eye-alarm.netlify.app collected 2026-10-03 10:43:10 UTC 6,456 bytes, 2 lines download raw bytes

1(this.webpackJsonptoxic=this.webpackJsonptoxic||[]).push([[0],{271:function(e,t,n){},272:function(e,t,n){},278:function(e,t){},279:function(e,t){},287:function(e,t){},296:function(e,t,n){"use strict";n.r(t);var a=n(7),s=n.n(a),c=n(70),i=n.n(c),r=(n(271),n(11)),o=(n(272),n(8)),d=n.n(o),l=n(12),j=n(223),u=n.n(j),h=n(162),b=n(69),m=n(79),O=Object(m.b)({name:"noHead",initialState:!1,reducers:{setNegative:function(e){return!1,false},setPositive:function(e){return!0,true}}}),f=O.actions,x=f.setNegative,v=f.setPositive,g=O.reducer,p=Object(m.b)({name:"starter",initialState:!0,reducers:{makeStart:function(e){return!1,false}}}),N=p.actions.makeStart,w=p.reducer,y=Object(m.b)({name:"eyesClosed",initialState:!1,reducers:{makeClosed:function(e){return!0,true},makeOpen:function(e){return!1,false}}}),_=y.actions,k=_.makeClosed,H=_.makeOpen,C=y.reducer,S=function(e,t,n,a,s,c,i){return t=e[t],n=e[n],a=e[a],s=e[s],c=e[c],i=e[i],(A(n,i)+A(a,c))/(2*A(t,s))},A=function(e,t){var n=Math.pow(e[0]-t[0],2)+Math.pow(e[1]-t[1],2);return n=Math.sqrt(n)},P=n(19),E=function(){var e=0,t=0,n=Object(a.useRef)(null),s=(Object(a.useRef)(null),Object(b.b)()),c=function(){var e=Object(l.a)(d.a.mark((function e(){var t;return d.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,h.b(h.a.mediapipeFacemesh,1);case 2:t=e.sent,setInterval((function(){i(t)}),100);case 4:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),i=function(){var a=Object(l.a)(d.a.mark((function a(c){var i,r,o,l,j,u,h,b;return d.a.wrap((function(a){for(;;)switch(a.prev=a.next){case 0:if("undefined"===typeof n.current||null===n.current||4!==n.current.video.readyState){a.next=11;break}return i=n.current.video,r=n.current.video.videoWidth,o=n.current.video.videoHeight,n.current.video.width=r,n.current.video.height=o,a.next=8,c.estimateFaces({input:i});case 8:l=a.sent,s(N()),0==l.length?++e>50&&s(v()):(e=0,j=l[0],u=j.scaledMesh,h=S(u,33,159,158,133,153,145),b=S(u,362,385,386,263,374,380),(h+b)/2<.25?++t>25&&s(k()):t=0);case 11:case"end":return a.stop()}}),a)})));return function(e){return a.apply(this,arguments)}}();return Object(a.useEffect)((function(){c()}),[]),Object(P.jsx)("div",{children:Object(P.jsx)(u.a,{ref:n,audio:!1,style:{marginLeft:"auto",marginRight:"auto",left:0,right:0,textAlign:"centr",zindex:0,width:640,height:480}})})},M=n.p+"static/media/Ark.d8ab0367.mp3",R=n.p+"static/media/brain1.7bad25c0.png",F=n(313),I=n(312),B=n(244),Y=n.n(B),G=n(245),J=n.n(G),L=n(246),W=n.n(L),q=n(247),z=n.n(q);var D=function(){var e=Object(b.b)(),t=Object(b.c)((function(e){return e.noHead})),n=Object(b.c)((function(e){return e.starting})),s=Object(b.c)((function(e){return e.eyesClosed})),c=Object(a.useState)(new Audio(M)),i=Object(r.a)(c,2),o=i[0],d=i[1],l=Object(a.useState)(!1),j=Object(r.a)(l,2),u=j[0],h=j[1],m=(new Date).getFullYear(),O=function(){o.pause(),d(new Audio(M)),e(H()),e(x()),console.log(o)};return Object(P.jsxs)("div",{className:"App",children:[!u&&Object(P.jsxs)("div",{className:"notStarted",children:[Object(P.jsx)("div",{className:"heading_div",children:Object(P.jsxs)(I.a,{container:!0,spacing:2,children:[Object(P.jsxs)(I.a,{item:!0,xs:12,sm:6,className:"subheading_grid",children:[Object(P.jsx)("h1",{className:"heading",children:"Eye-Alarm"}),Object(P.jsx)("h4",{className:"subHeading",children:"Never fall asleep in front of your computer again."}),Object(P.jsxs)(F.a,{variant:"contained",onClick:function(){h(!0)},className:"startbtn",children:["Get Started ",Object(P.jsx)(Y.a,{className:"alarm"})]})]}),Object(P.jsx)(I.a,{item:!0,xs:12,sm:6,className:"img_grid",children:Object(P.jsx)("img",{src:R,className:"brain"})})]})}),Object(P.jsxs)("div",{className:"info_div",children:[Object(P.jsx)("h3",{className:"info_Heading",children:"What is Eye-Alarm?"}),Object(P.jsx)("p",{className:"info",children:"Eye-Alarm is a first of it's kind web application that uses Artificial Intelligence and Machine Learning to track your face and eyes, making sure you are present and alert, alarming you otherwise. So what are you waiting for, get started now. (Note: Please use Chrome)"})]})]}),u&&Object(P.jsxs)("div",{className:n?"started":t||s?"error":"normal",children:[n&&Object(P.jsxs)("div",{className:"starting_div",children:[Object(P.jsx)("h1",{className:"wait_heading",children:"Please wait, our AI is recognising your face."}),Object(P.jsx)("h4",{className:"wait_description",children:"This may take anywhere from 10 seconds to 45 seconds. Please be patient."})]}),!n&&!t&&!s&&Object(P.jsxs)("div",{className:"normal_div",children:[Object(P.jsx)("h1",{className:"good_title",children:"All good!"}),Object(P.jsx)(J.a,{className:"success_icon"})]}),!n&&t&&Object(P.jsxs)("div",{className:"noHead_div",children:[Object(P.jsx)("h1",{className:"noHead_heading",children:"Your Head is out of Frame!"}
1),Object(P.jsxs)(I.a,{container:!0,spacing:2,children:[Object(P.jsxs)(I.a,{item:!0,xs:6,children:[Object(P.jsx)("h4",{className:"noHead_description",children:"Please Click the Button below to reset"}),Object(P.jsx)("div",{className:"noHead_button",children:Object(P.jsx)(F.a,{variant:"contained",onClick:O,className:"finish_btn",children:"Reset"})})]}),Object(P.jsx)(I.a,{item:!0,xs:6,children:Object(P.jsx)(W.a,{className:"missing_icon"})})]})]}),!n&&(!t&&s||t&&!s)&&void o.play(),!t&&s&&Object(P.jsxs)("div",{className:"eyesClosed_div",children:[Object(P.jsx)("h1",{className:"noHead_heading",children:"Your Eyes were Shut!"}),Object(P.jsxs)(I.a,{container:!0,spacing:2,children:[Object(P.jsxs)(I.a,{item:!0,xs:6,children:[Object(P.jsx)("h4",{className:"noHead_description",children:"Please Click the Button below to reset"}),Object(P.jsx)("div",{className:"noHead_button",children:Object(P.jsx)(F.a,{variant:"contained",onClick:O,className:"finish_btn",children:"Reset"})})]}),Object(P.jsx)(I.a,{item:!0,xs:6,children:Object(P.jsx)(z.a,{className:"missing_icon"})})]})]}),Object(P.jsx)(E,{}),!n&&Object(P.jsx)(F.a,{variant:"contained",onClick:function(){O(),h(!1)},className:"finish_btn",children:"Go back Home"})]}),Object(P.jsx)("div",{className:"footer",children:Object(P.jsxs)("p",{children:["Copyright @ Anirudh Ramprasad ",m]})})]})},T=Object(m.a)({reducer:{noHead:g,starting:w,eyesClosed:C}});i.a.render(Object(P.jsx)(b.a,{store:T,children:Object(P.jsx)(s.a.StrictMode,{children:Object(P.jsx)(D,{})})}),document.getElementById("root"))}},[[296,1,2]]]);
2//# sourceMappingURL=main.118a98e4.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.