{"version":3,"file":"static/chunks/301.cce9b4247bffbd3d.js","mappings":"iHAoCkC,IAjChB,SAAAA,IAAAC,EAAAA,EAAAA,YACR,WAAU,IACdC,EAAS,CACT,UACA,UACA,YACA,YACA,YACA,aACA,YACA,cAIIC,EAAc,EAClBC,EAAQ,SAAcC,GACtBA,EAAAC,MAEEJ,EAAgBC,GAKhBD,EAAAK,UADFJ,GAAY,KAEVA,EAAA,EACDH,KANCG,EAAO,GAUJ,OAAPK,SAAOC,iBAAA,QAAAL,GAAA,WAA4D,OAAAI,SAAAE,oBAAA,QAAAN,MAClE,CAAsBJ,M,6HC7BrBW,E,MAAiBC,IACrB,W,OAAM,sDAA6BC,MAAK,SAACC,G,OAAQA,EAAIH,oBAAe,C,sDAClEI,KAAK,IAGHC,EAA2C,SAACC,GAChD,IAAwBC,GAAAA,EAAAA,EAAAA,WAAS,GAA1BC,EAAiBD,EAAe,GAA1BE,EAAWF,EAAe,GACjCG,GAAeC,EAAAA,EAAAA,cAAY,W,OAAMF,GAAQ,KAAO,CAACA,IAGvD,OAFAG,EAAAA,EAAAA,GAAmBF,GAEfF,GAEA,SAACK,MAAG,CAACC,eAAgB,W,OAAML,GAAQ,I,UACjC,SAACT,GAAc,UAAKM,MAInB,MAGT,GAAeS,EAAAA,EAAAA,MAAKV","sources":["webpack://_N_E/./packages/uikit/src/hooks/useKonamiCheatCode.ts","webpack://_N_E/./src/components/EasterEgg/EasterEgg.tsx"],"sourcesContent":["import { useEffect } from \"react\";\nvar useKonamiCheatCode = function(matchedCodeHandler) {\n useEffect(function() {\n var pattern = [\n \"ArrowUp\",\n \"ArrowUp\",\n \"ArrowDown\",\n \"ArrowDown\",\n \"ArrowLeft\",\n \"ArrowRight\",\n \"ArrowLeft\",\n \"ArrowRight\", \n ];\n var currentIndex = 0;\n var onKeyUpHandler = function(event) {\n var key = event.key;\n // is key in correct order otherwise reset\n if (key !== pattern[currentIndex]) {\n currentIndex = 0;\n return;\n }\n currentIndex += 1;\n if (pattern.length === currentIndex) {\n currentIndex = 0;\n matchedCodeHandler();\n }\n };\n document.addEventListener(\"keyup\", onKeyUpHandler);\n return function() {\n return document.removeEventListener(\"keyup\", onKeyUpHandler);\n };\n }, [\n matchedCodeHandler\n ]);\n};\nexport default useKonamiCheatCode;\n","import { useState, useCallback, memo } from 'react'\nimport { FallingBunniesProps, useKonamiCheatCode } from '@pancakeswap/uikit'\nimport dynamic from 'next/dynamic'\n\nconst FallingBunnies = dynamic(\n () => import('@pancakeswap/uikit').then((mod) => mod.FallingBunnies),\n { ssr: false },\n)\n\nconst EasterEgg: React.FC = (props) => {\n const [show, setShow] = useState(false)\n const startFalling = useCallback(() => setShow(true), [setShow])\n useKonamiCheatCode(startFalling)\n\n if (show) {\n return (\n
setShow(false)}>\n \n
\n )\n }\n return null\n}\n\nexport default memo(EasterEgg)\n"],"names":["matchedCodeHandler","useEffect","pattern","currentIndex","onKeyUpHandler","event","key","length","document","addEventListener","removeEventListener","FallingBunnies","dynamic","then","mod","ssr","EasterEgg","props","useState","show","setShow","startFalling","useCallback","useKonamiCheatCode","div","onAnimationEnd","memo"],"sourceRoot":""}