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E/C,GAAI,GAAU,EAAG,CACf,EAAe,OAAO,EAAQ,GAC9B,QACF,CAIA,MACF,CAEA,GAAI,EAAM,IAAK,CAKb,GAHe,EAAM,IAAI,gBAGV,EAAS,IAAK,MAC/B,KAAO,CAKL,GAHe,EAAM,QAGN,EAAS,MAAO,MACjC,CACF,CAII,EAAe,QAEnB,EAAS,EAAM,CAChB,EAGH,QAAQ,aAAe,aACvB,MAAM,OAA2B,oBAAX,QAAwC,uBAAuB,KAAK,OAAO,UAAU,UACrG,UAAY,CAChB,IAAK,SACL,QAAS,UACT,KAAM,UACN,MAAO,YAIH,QAAU,CACd,MAAO,QACP,IAAK,OACL,QAAS,OACT,KAAM,UACN,IAAK,SACL,KAAM,YACN,IAAK,SACL,KAAM,YACN,IAAK,OAAS,OAAS,UACvB,OAAQ,MACR,OAAQ,QACR,MAAO,aACP,MAAO,IACP,SAAU,IACV,GAAI,UACJ,QAAS,QAEL,MAAQ,CACZ,UAAW,EACX,IAAK,EACL,MAAO,GACP,MAAO,GACP,QAAS,GACT,IAAK,GACL,MAAO,GACP,SAAU,GACV,OAAQ,GACR,IAAK,GACL,OAAQ,GACR,SAAU,GACV,IAAK,GACL,KAAM,GACN,UAAW,GACX,QAAS,GACT,WAAY,GACZ,UAAW,GACX,OAAQ,GACR,OAAQ,GACR,KAAM,GACN,QAAS,IACT,WAAY,IACZ,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,KAAM,IACN,IAAK,IACL,IAAK,OACY,MAAM,IAAI,QAAO,CAAC,EAAK,EAAG,KAEzC,EAAI,IAAI,EAAQ,KAAO,IAAM,CAAK,GACjC,CAAC","file":"/npm/@react-hook/hotkey@3.1.0/dist/main/index.js","sourceRoot":"","sourcesContent":["/**\n * Minified by jsDelivr using Terser v5.39.0.\n * Original file: /npm/@react-hook/hotkey@3.1.0/dist/main/index.js\n *\n * Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files\n */\n","\"use strict\";\n\nexports.__esModule = true;\nexports.useHotkey = useHotkey;\nexports.useHotkeys = useHotkeys;\nexports.createHotkey = void 0;\n\nvar _event = /*#__PURE__*/_interopRequireDefault( /*#__PURE__*/require(\"@react-hook/event\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction useHotkey(target, hotkey, callback) {\n  return useHotkeys(target, [[hotkey, callback]]);\n}\n\nfunction useHotkeys(target, hotkeys) {\n  (0, _event.default)(target, 'keydown', event => {\n    for (const [hotkey, callback] of hotkeys) {\n      createHotkey(hotkey, callback)(event);\n    }\n  });\n}\n\nconst createHotkey = (hotkeys, callback) => {\n  hotkeys = Array.isArray(hotkeys) ? hotkeys : [hotkeys];\n  const keys = [];\n  let hasModifier = false;\n\n  for (let i = 0; i < hotkeys.length; i++) {\n    let key = String(hotkeys[i]).toLowerCase(); // @ts-ignore\n\n    key = ALIASES[key] || key; // @ts-ignore\n\n    const modifier = MODIFIERS[key];\n    hasModifier = hasModifier || !!modifier;\n    keys.push({\n      // Store the key for browsers that support event.key\n      key,\n      // Store the keyCode for browsers that don't support event.key\n      // @ts-ignore\n      which: CODES[key] || key.toUpperCase().charCodeAt(0),\n      // Is this key is a modifier? If so, include it's real name\n      // as defined in the event here\n      modifier: modifier\n    });\n  }\n\n  return event => {\n    // Event was stopped earlier in the chain\n\n    /* istanbul ignore next */\n    if (event.defaultPrevented) return; // Creates a list of modifiers defined in this event\n\n    const eventModifiers = [];\n\n    for (const modifier in MODIFIERS) {\n      // @ts-ignore\n      const mod = MODIFIERS[modifier]; // @ts-ignore\n\n      if (event[mod]) {\n        // If the event had a modifier and there wasn't one specified, just bail\n        if (!hasModifier) return;\n        eventModifiers.push(mod);\n      }\n    }\n\n    for (let i = 0; i < keys.length; i++) {\n      const expected = keys[i];\n\n      if (expected.modifier) {\n        // We expected this modifier and got it, continue\n        const modIdx = eventModifiers.indexOf(expected.modifier);\n\n        if (modIdx > -1) {\n          eventModifiers.splice(modIdx, 1);\n          continue;\n        } // We expected this modifier, but not this one so the key press isn't\n        // valid. Thus, we bail.\n\n\n        return;\n      }\n\n      if (event.key) {\n        // This browser has event.key\n        const actual = event.key.toLowerCase(); // The key didn't match the expected key and this isn't a modifier,\n        // so bail\n\n        if (actual !== expected.key) return;\n      } else {\n        // This browser is still using event.which\n        const actual = event.which; // The key didn't match the expected key and this isn't a modifier,\n        // so bail\n\n        if (actual !== expected.which) return;\n      }\n    } // There were modifiers in this keyboard event that weren't specified in\n    // the hotkey\n\n\n    if (eventModifiers.length) return; // Hey we did it, let the callback invoke\n\n    callback(event);\n  };\n};\n\nexports.createHotkey = createHotkey;\nconst IS_MAC = typeof window !== 'undefined' && /*#__PURE__*/ /Mac|iPod|iPhone|iPad/.test(window.navigator.platform);\nconst MODIFIERS = {\n  alt: 'altKey',\n  control: 'ctrlKey',\n  meta: 'metaKey',\n  shift: 'shiftKey'\n};\n\n/* istanbul ignore next */\nconst ALIASES = {\n  break: 'pause',\n  cmd: 'meta',\n  command: 'meta',\n  ctrl: 'control',\n  del: 'delete',\n  down: 'arrowdown',\n  esc: 'escape',\n  left: 'arrowleft',\n  mod: IS_MAC ? 'meta' : 'control',\n  option: 'alt',\n  return: 'enter',\n  right: 'arrowright',\n  space: ' ',\n  spacebar: ' ',\n  up: 'arrowup',\n  windows: 'meta'\n};\nconst CODES = {\n  backspace: 8,\n  tab: 9,\n  enter: 13,\n  shift: 16,\n  control: 17,\n  alt: 18,\n  pause: 19,\n  capslock: 20,\n  escape: 27,\n  ' ': 32,\n  pageup: 33,\n  pagedown: 34,\n  end: 35,\n  home: 36,\n  arrowleft: 37,\n  arrowup: 38,\n  arrowright: 39,\n  arrowdown: 40,\n  insert: 45,\n  delete: 46,\n  meta: 91,\n  numlock: 144,\n  scrolllock: 145,\n  ';': 186,\n  '=': 187,\n  ',': 188,\n  '-': 189,\n  '.': 190,\n  '/': 191,\n  '`': 192,\n  '[': 219,\n  '\\\\': 220,\n  ']': 221,\n  \"'\": 222,\n  ... /*#__PURE__*/Array(20).reduce((acc, _, index) => {\n    /* istanbul ignore next */\n    acc[`f${index + 1}`] = 112 + index;\n  }, {})\n};"]}