1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[20],{3555:(e,t,a)=>{Promise.resolve().then(a.t.bind(a,6874,23)),Promise.resolve().then(a.bind(a,8134))},8134:(e,t,a)=>{"use strict";a.d(t,{default:()=>r});var s=a(5155),l=a(2115);let r=()=>{let[e,t]=(0,l.useState)("focus"),[a,r]=(0,l.useState)(1500),[n,o]=(0,l.useState)(!1),[i,c]=(0,l.useState)(0),[d,u]=(0,l.useState)(25),[x,m]=(0,l.useState)(5),[b,g]=(0,l.useState)(!1),[h,f]=(0,l.useState)(!1),p=(0,l.useRef)(null);(0,l.useEffect)(()=>(n&&(p.current=setInterval(()=>{r(e=>e<=1?(y(),0):e-1)},1e3)),()=>{p.current&&clearInterval(p.current)}),[n]);let y=()=>{o(!1);try{let e=new(window.AudioContext||window.webkitAudioContext),t=e.createOscillator(),a=e.createGain();t.connect(a),a.connect(e.destination),t.frequency.value=600,t.type="sine",a.gain.setValueAtTime(.2,e.currentTime),a.gain.exponentialRampToValueAtTime(.01,e.currentTime+.5),t.start(e.currentTime),t.stop(e.currentTime+.5)}catch(e){}"focus"===e?(c(e=>e+1),t("break"),r(60*x)):(t("focus"),r(60*d))},v=e=>{o(!1),t(e),r("focus"===e?60*d:60*x)},j="focus"===e?60*d:60*x,N=(j-a)/j*100,k="focus"===e?"#06d6a0":"#118ab2";return(0,s.jsxs)("div",{className:"max-w-md mx-auto",children:[(0,s.jsxs)("div",{className:"flex gap-2 mb-6",children:[(0,s.jsx)("button",{onClick:()=>v("focus"),className:"flex-1 py-2 px-3 rounded-lg font-medium text-sm transition-all ".concat("focus"===e?"text-white":"bg-gray-100 text-gray-600 hover:bg-gray-200"),style:"focus"===e?{backgroundColor:"#06d6a0"}:{},children:"\uD83D\uDCDA Study Session"}),(0,s.jsx)("button",{onClick:()=>v("break"),className:"flex-1 py-2 px-3 rounded-lg font-medium text-sm transition-all ".concat("break"===e?"text-white":"bg-gray-100 text-gray-600 hover:bg-gray-200"),style:"break"===e?{backgroundColor:"#118ab2"}:{},children:"â Break Time"})]}),(0,s.jsxs)("div",{className:"text-center mb-6",children:[(0,s.jsx)("div",{className:"text-sm text-[#777777] mb-2 uppercase tracking-wide",children:"focus"===e?"\uD83D\uDCD6 Focus Mode":"â Break Mode"}),(0,s.jsx)("div",{className:"text-7xl md:text-8xl font-bold font-mono mb-2",style:{color:k},children:(e=>{let t=Math.floor(e/60);return"".concat(t.toString().padStart(2,"0"),":").concat((e%60).toString().padStart(2,"0"))})(a)}),(0,s.jsxs)("div",{className:"text-sm text-[#777777]",children:["Study sessions completed today: ",i]})]}),(0,s.jsx)("div",{className:"h-3 bg-gray-200 rounded-full mb-6 overflow-hidden",children:(0,s.jsx)("div",{className:"h-full rounded-full transition-all duration-300",style:{width:"".concat(N,"%"),backgroundColor:k}})}),(0,s.jsxs)("div",{className:"flex justify-center gap-3 mb-6",children:[(0,s.jsx)("button",{onClick:()=>o(!n),className:"px-6 py-3 rounded-lg font-bold text-white transition-all hover:shadow-lg",style:{backgroundColor:k},children:n?"⸠Pause":"â¶ Start"}),(0,s.jsx)("button",{onClick:()=>{o(!1),t("focus"),r(60*d)},className:"px-6 py-3 rounded-lg font-bold bg-gray-200 text-gray-700 hover:bg-gray-300 transition-all",children:"\uD83D\uDD04 Reset"}),(0,s.jsx)("button",{onClick:()=>{g(!b)},className:"px-4 py-3 rounded-lg font-bold transition-all ".concat(b?"bg-purple-500 text-white":"bg-gray-100 text-gray-600 hover:bg-gray-200"),title:b?"Stop lo-fi beats":"Play lo-fi beats",children:b?"\uD83D\uDD0A":"\uD83D\uDD08"})]}),(0,s.jsx)("div",{className:"flex justify-center gap-2 mb-6",children:[1,2,3,4,5].map(e=>(0,s.jsx)("div",{className:"w-3 h-3 rounded-full transition-all ".concat(e<=i?"bg-[#06d6a0]":"bg-gray-200")},e))}),b&&(0,s.jsx)("div",{className:"bg-purple-50 rounded-lg p-3 text-center text-sm text-purple-700 mb-4",children:"\uD83C\uDFB5 Lo-fi beats playing... Stay focused!"}),(0,s.jsx)("div",{className:"text-center",children:(0,s.jsx)("button",{onClick:()=>f(!h),className:"text-sm text-[#777777] hover:text-[#3a86ff] transition-colors",children:"âï¸ Customize durations"})}),h&&(0,s.jsxs)("div",{className:"bg-gray-50 rounded-lg p-4 border border-gray-200 mt-3",children:[(0,s.jsx)("h3",{className:"font-bold mb-3",children:"âï¸ Study Timer Settings"}),(0,s.jsxs)("div",{className:"grid grid-cols-2 gap-3",children:[(0,s.jsxs)("div",{children:[(0,s.jsx)("label",{className:"text-xs text-gray-600 block mb-1",children:"Study (min)"}),(0,s.jsx)("input",{type:"number",min:"5",max:"120",value:d,onChange:e=>u(parseInt(e.target.value)||25),className:"w-full px-3 py-2 border rounded-lg text-center",disabled:n})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)("label",{className:"text-xs text-gray-600 block mb-1",children:"Break (min)"}),(0,s.jsx)("input",{type:"number",min:"1",max:"30",value:x,onChange:e=>m(parseInt(e.target.value)||5),className:"w-full px-3 py-2 border rounded-lg text-center",disabled:n})]})]}),(0,s.jsx)("button",{onClick:()=>{n||(t("focus"),r(60*d)),f(!1)},className:"w-full mt-3 py-2 bg-[#06d6a0] text-white rounded-lg font-medium hover:bg-green-600 transition-all",children:"Apply & Restart"})]})]})}}},e=>{var t=t=>e(e.s=t);e.O(0,[874,441,684,358],()=>t(3555)),_N_E=e.O()}]);
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.