{"version":3,"file":"index.cjs","sources":["../src/constants/quotes.ts","../node_modules/style-inject/dist/style-inject.es.js","../src/components/TypeWriterQuoteLoader.tsx","../src/components/QuoteLoader.tsx"],"sourcesContent":["\nexport const quoteData = {\n  motivational: [\n    {\n      text: \"Success is not in what you have, but who you are.\",\n      author: \"Bo Bennett\"\n    },\n    {\n      text: \"The harder you work for something, the greater you’ll feel when you achieve it.\",\n      author: \"Unknown\"\n    },\n    {\n      text: \"Don't watch the clock; do what it does. Keep going.\",\n      author: \"Sam Levenson\"\n    },\n    {\n      text: \"Push yourself, because no one else is going to do it for you.\",\n      author: \"Unknown\"\n    },\n    {\n      text: \"Great things never come from comfort zones.\",\n      author: \"Roy T. Bennett\"\n    },\n    {\n      text: \"Dream it. Wish it. Do it.\",\n      author: \"Unknown\"\n    },\n    {\n      text: \"Sometimes we're tested not to show our weaknesses, but to discover our strengths.\",\n      author: \"Unknown\"\n    },\n    {\n      text: \"Believe you can and you're halfway there.\",\n      author: \"Theodore Roosevelt\"\n    },\n    {\n      text: \"Don’t stop when you’re tired. Stop when you’re done.\",\n      author: \"Marilyn Monroe\"\n    },\n    {\n      text: \"Your limitation—it’s only your imagination.\",\n      author: \"Unknown\"\n    }\n  ],\n  funny: [\n    {\n      text: \"I'm not lazy, I'm on energy-saving mode.\",\n      author: \"Unknown\"\n    },\n    {\n      text: \"Why don’t scientists trust atoms? Because they make up everything!\",\n      author: \"Unknown\"\n    },\n    {\n      text: \"I told my computer I needed a break, and it said 'No problem, I’ll go to sleep.'\",\n      author: \"Unknown\"\n    },\n    {\n      text: \"I’m not arguing, I’m just explaining why I’m right.\",\n      author: \"Unknown\"\n    },\n    {\n      text: \"Life is short. Smile while you still have teeth.\",\n      author: \"Unknown\"\n    },\n    {\n      text: \"I put my phone in airplane mode, but it’s not flying!\",\n      author: \"Unknown\"\n    },\n    {\n      text: \"If at first you don’t succeed, skydiving is not for you.\",\n      author: \"Steven Wright\"\n    },\n    {\n      text: \"I’m not great at the advice. Can I interest you in a sarcastic comment?\",\n      author: \"Chandler Bing\"\n    },\n    {\n      text: \"Behind every great man is a woman rolling her eyes.\",\n      author: \"Jim Carrey\"\n    },\n    {\n      text: \"The elevator to success is out of order. You’ll have to use the stairs.\",\n      author: \"Joe Girard\"\n    }\n  ],\n  wisdom: [\n    {\n      text: \"Knowing yourself is the beginning of all wisdom.\",\n      author: \"Aristotle\"\n    },\n    {\n      text: \"The only true wisdom is in knowing you know nothing.\",\n      author: \"Socrates\"\n    },\n    {\n      text: \"Turn your wounds into wisdom.\",\n      author: \"Oprah Winfrey\"\n    },\n    {\n      text: \"It is the mark of an educated mind to be able to entertain a thought without accepting it.\",\n      author: \"Aristotle\"\n    },\n    {\n      text: \"Wisdom is not a product of schooling but of the lifelong attempt to acquire it.\",\n      author: \"Albert Einstein\"\n    },\n    {\n      text: \"A wise man can learn more from a foolish question than a fool can learn from a wise answer.\",\n      author: \"Bruce Lee\"\n    },\n    {\n      text: \"Honesty is the first chapter in the book of wisdom.\",\n      author: \"Thomas Jefferson\"\n    },\n    {\n      text: \"Knowledge speaks, but wisdom listens.\",\n      author: \"Jimi Hendrix\"\n    },\n    {\n      text: \"Do not seek to follow in the footsteps of the wise. Seek what they sought.\",\n      author: \"Matsuo Basho\"\n    },\n    {\n      text: \"The invariable mark of wisdom is to see the miraculous in the common.\",\n      author: \"Ralph Waldo Emerson\"\n    }\n  ]\n};\n","function styleInject(css, ref) {\n  if ( ref === void 0 ) ref = {};\n  var insertAt = ref.insertAt;\n\n  if (!css || typeof document === 'undefined') { return; }\n\n  var head = document.head || document.getElementsByTagName('head')[0];\n  var style = document.createElement('style');\n  style.type = 'text/css';\n\n  if (insertAt === 'top') {\n    if (head.firstChild) {\n      head.insertBefore(style, head.firstChild);\n    } else {\n      head.appendChild(style);\n    }\n  } else {\n    head.appendChild(style);\n  }\n\n  if (style.styleSheet) {\n    style.styleSheet.cssText = css;\n  } else {\n    style.appendChild(document.createTextNode(css));\n  }\n}\n\nexport default styleInject;\n","import React, { useEffect, useState } from 'react';\n\ninterface Props {\n  quote: { text: string; author: string };\n}\n\nconst TYPING_SPEED_MS = 50;\n\nexport const TypeWriterQuoteLoader: React.FC<Props> = ({ quote }) => {\n  const [visibleChars, setVisibleChars] = useState(0);\n  const [visibleAuthorChars, setVisibleAuthorChars] = useState(0);\n  const [textTypingComplete, setTextTypingComplete] = useState(false);\n\n  useEffect(() => {\n    setVisibleChars(0);\n    setVisibleAuthorChars(0);\n    setTextTypingComplete(false);\n\n    const textInterval = setInterval(() => {\n      setVisibleChars((prev) => {\n        if (prev >= quote.text.length) {\n          clearInterval(textInterval);\n          setTextTypingComplete(true);\n          return prev;\n        }\n        return prev + 1;\n      });\n    }, TYPING_SPEED_MS);\n\n    return () => clearInterval(textInterval);\n  }, [quote]);\n\n  useEffect(() => {\n    if (textTypingComplete && quote?.author) {\n      const authorInterval = setInterval(() => {\n        setVisibleAuthorChars((prev) => {\n          if (prev >= quote?.author.length) {\n            clearInterval(authorInterval);\n            return prev;\n          }\n          return prev + 1;\n        });\n      }, TYPING_SPEED_MS);\n\n      return () => clearInterval(authorInterval);\n    }\n  }, [textTypingComplete, quote.author]);\n\n  return (\n    <>\n      ❝ {quote.text.slice(0, visibleChars)} ❞\n      {textTypingComplete && quote.author && (\n        <p className=\"quote-author\">\n          – {quote.author.slice(0, visibleAuthorChars)}\n        </p>\n      )}\n    </>\n  );\n};\n","import React, {useEffect, useState} from 'react';\nimport {quoteData} from '../constants/quotes';\nimport './QuoteLoader.css';\nimport type {QuoteLoaderProps} from \"../types.ts\";\nimport {TypeWriterQuoteLoader} from \"./TypeWriterQuoteLoader\";\n\nexport const QuoteLoader: React.FC<QuoteLoaderProps> = ({\n                                                          animation = 'fade',\n                                                          interval = 5000,\n                                                          category = 'motivational',\n                                                          customQuotes,\n                                                          avatarUrl,\n                                                          className,\n                                                          onQuotesChange,\n                                                        }) => {\n  const quotes = customQuotes || quoteData[category];\n  const [index, setIndex] = useState(0);\n\n  useEffect(() => {\n    const timer = setInterval(() => {\n      setIndex(prevIndex => {\n        const quoteIndex = (prevIndex + 1) % quotes.length;\n        onQuotesChange?.(quotes[quoteIndex]);\n        return quoteIndex;\n      });\n    }, interval);\n    return () => clearInterval(timer);\n  }, [interval, onQuotesChange, quotes.length]);\n\n  return (\n    <div className=\"loader-wrapper\">\n      <div className={`quote-loader ${animation} ${className || ''}`}>\n        {avatarUrl && (\n          <img src={avatarUrl} alt=\"avatar\" className=\"quote-avatar\"/>\n        )}\n        {animation === 'typewriter' ? (\n          <TypeWriterQuoteLoader quote={quotes[index]}/>\n        ) : (\n          <>\n            <p className=\"quote-text\">{quotes[index].text}</p>\n            {quotes[index]?.author && (\n              <p className=\"quote-author\">– {quotes[index]?.author}</p>\n            )}\n          </>\n        )}\n      </div>\n    </div>\n  );\n};\n"],"names":["quoteData","motivational","text","author","funny","wisdom","css","ref","insertAt","document","head","getElementsByTagName","style","createElement","type","firstChild","insertBefore","appendChild","styleSheet","cssText","createTextNode","TypeWriterQuoteLoader","quote","visibleChars","setVisibleChars","useState","visibleAuthorChars","setVisibleAuthorChars","textTypingComplete","setTextTypingComplete","useEffect","textInterval","setInterval","prev","length","clearInterval","authorInterval","_jsxs","_Fragment","children","slice","className","animation","interval","category","customQuotes","avatarUrl","onQuotesChange","quotes","index","setIndex","timer","prevIndex","quoteIndex","_jsx","src","alt"],"mappings":"mEACO,MAAMA,EAAY,CACvBC,aAAc,CACZ,CACEC,KAAM,oDACNC,OAAQ,cAEV,CACED,KAAM,kFACNC,OAAQ,WAEV,CACED,KAAM,sDACNC,OAAQ,gBAEV,CACED,KAAM,gEACNC,OAAQ,WAEV,CACED,KAAM,8CACNC,OAAQ,kBAEV,CACED,KAAM,4BACNC,OAAQ,WAEV,CACED,KAAM,oFACNC,OAAQ,WAEV,CACED,KAAM,4CACNC,OAAQ,sBAEV,CACED,KAAM,uDACNC,OAAQ,kBAEV,CACED,KAAM,8CACNC,OAAQ,YAGZC,MAAO,CACL,CACEF,KAAM,2C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