{"version":3,"file":"component_controller-DScb59qA.js","sources":["../../../app/components/notification_box/component_controller.js","../../../node_modules/hotkeys-js/dist/hotkeys.esm.js","../../../app/frontend/javascript/utils/keyboard.js","../../../app/frontend/javascript/controllers/main/modal-window_controller.js","../../../node_modules/lodash.debounce/index.js","../../../app/components/loading_overlay/component_controller.js"],"sourcesContent":["import { Controller } from '@hotwired/stimulus';\n\nexport default class extends Controller {\n  static targets = ['notificationBox', 'flashMessage'];\n\n  connect() {\n    document.body.addEventListener(\n      'notification:show',\n      this.handleShowNotification.bind(this)\n    );\n    document.body.addEventListener(\n      'notification:clear',\n      this.clearNotification.bind(this)\n    );\n    this.closeTimeout = null;\n    this.notificationBoxTarget.addEventListener(\n      'click',\n      this.clearNotification.bind(this)\n    );\n  }\n\n  flashMessageTargetConnected(element) {\n    const message = element.textContent;\n    if (message.length > 0) {\n      const type = element.dataset.notificationType;\n      const timeoutInMs = element.dataset.timeoutInMs;\n      this.showNotification(message, { timeoutInMs, type });\n      element.remove();\n    }\n  }\n\n  handleShowNotification(event) {\n    const message = event.detail.message;\n    const timeoutInMs = event.detail.timeoutInMs;\n    const type = event.detail.type;\n\n    this.showNotification(message, { timeoutInMs, type });\n  }\n\n  show({ params: { message } }) {\n    this.showNotification(message);\n  }\n\n  showNotification(message, { timeoutInMs = 3000, type = 'default' } = {}) {\n    this.notificationBoxTarget.dataset.notificationType = type;\n\n    if (this.closeTimeout) this.clearNotification();\n    this.notificationBoxTarget.innerHTML = message;\n    this.notificationBoxTarget.hidden = false;\n    this.closeTimeout = setTimeout(\n      this.clearNotification.bind(this),\n      timeoutInMs\n    );\n  }\n\n  clearNotification() {\n    clearTimeout(this.closeTimeout);\n    this.notificationBoxTarget.hidden = true;\n  }\n}\n\nexport function showNotification(message, options = {}) {\n  options.message = message;\n  document.body.dispatchEvent(\n    new CustomEvent('notification:show', { bubbles: true, detail: options })\n  );\n}\n\nexport function clearNotification() {\n  document.body.dispatchEvent(\n    new CustomEvent('notification:clear', { bubbles: true })\n  );\n}\n","/**! \n * hotkeys-js v3.13.9 \n * A simple micro-library for defining and dispatching keyboard shortcuts. It has no dependencies. \n * \n * Copyright (c) 2024 kenny wong <wowohoo@qq.com> \n * https://github.com/jaywcjlove/hotkeys-js.git \n * \n * @website: https://jaywcjlove.github.io/hotkeys-js\n \n * Licensed under the MIT license \n */\n\nconst isff = typeof navigator !== 'undefined' ? navigator.userAgent.toLowerCase().indexOf('firefox') > 0 : false;\n\n// 绑定事件\nfunction addEvent(object, event, method, useCapture) {\n  if (object.addEventListener) {\n    object.addEventListener(event, method, useCapture);\n  } else if (object.attachEvent) {\n    object.attachEvent(\"on\".concat(event), method);\n  }\n}\nfunction removeEvent(object, event, method, useCapture) {\n  if (object.removeEventListener) {\n    object.removeEventListener(event, method, useCapture);\n  } else if (object.detachEvent) {\n    object.detachEvent(\"on\".concat(event), method);\n  }\n}\n\n// 修饰键转换成对应的键码\nfunction getMods(modifier, key) {\n  const mods = key.slice(0, key.length - 1);\n  for (let i = 0; i < mods.length; i++) mods[i] = modifier[mods[i].toLowerCase()];\n  return mods;\n}\n\n// 处理传的key字符串转换成数组\nfunction getKeys(key) {\n  if (typeof key !== 'string') key = '';\n  key = key.replace(/\\s/g, ''); // 匹配任何空白字符,包括空格、制表符、换页符等等\n  const keys = key.split(','); // 同时设置多个快捷键,以','分割\n  let index = keys.lastIndexOf('');\n\n  // 快捷键可能包含',',需特殊处理\n  for (; index >= 0;) {\n    keys[index - 1] += ',';\n    keys.splice(index, 1);\n    index = keys.lastIndexOf('');\n  }\n  return keys;\n}\n\n// 比较修饰键的数组\nfunction compareArray(a1, a2) {\n  const arr1 = a1.length >= a2.length ? a1 : a2;\n  const arr2 = a1.length >= a2.length ? a2 : a1;\n  let isIndex = true;\n  for (let i = 0; i < arr1.length; i++) {\n    if (arr2.indexOf(arr1[i]) === -1) isIndex = false;\n  }\n  return isIndex;\n}\n\n// Special Keys\nconst _keyMap = {\n  backspace: 8,\n  '⌫': 8,\n  tab: 9,\n  clear: 12,\n  enter: 13,\n  '↩': 13,\n  return: 13,\n  esc: 27,\n  escape: 27,\n  space: 32,\n  left: 37,\n  up: 38,\n  right: 39,\n  down: 40,\n  del: 46,\n  delete: 46,\n  ins: 45,\n  insert: 45,\n  home: 36,\n  end: 35,\n  pageup: 33,\n  pagedown: 34,\n  capslock: 20,\n  num_0: 96,\n  num_1: 97,\n  num_2: 98,\n  num_3: 99,\n  num_4: 100,\n  num_5: 101,\n  num_6: 102,\n  num_7: 103,\n  num_8: 104,\n  num_9: 105,\n  num_multiply: 106,\n  num_add: 107,\n  num_enter: 108,\n  num_subtract: 109,\n  num_decimal: 110,\n  num_divide: 111,\n  '⇪': 20,\n  ',': 188,\n  '.': 190,\n  '/': 191,\n  '`': 192,\n  '-': isff ? 173 : 189,\n  '=': isff ? 61 : 187,\n  ';': isff ? 59 : 186,\n  '\\'': 222,\n  '[': 219,\n  ']': 221,\n  '\\\\': 220\n};\n\n// Modifier Keys\nconst _modifier = {\n  // shiftKey\n  '⇧': 16,\n  shift: 16,\n  // altKey\n  '⌥': 18,\n  alt: 18,\n  option: 18,\n  // ctrlKey\n  '⌃': 17,\n  ctrl: 17,\n  control: 17,\n  // metaKey\n  '⌘': 91,\n  cmd: 91,\n  command: 91\n};\nconst modifierMap = {\n  16: 'shiftKey',\n  18: 'altKey',\n  17: 'ctrlKey',\n  91: 'metaKey',\n  shiftKey: 16,\n  ctrlKey: 17,\n  altKey: 18,\n  metaKey: 91\n};\nconst _mods = {\n  16: false,\n  18: false,\n  17: false,\n  91: false\n};\nconst _handlers = {};\n\n// F1~F12 special key\nfor (let k = 1; k < 20; k++) {\n  _keyMap[\"f\".concat(k)] = 111 + k;\n}\n\nlet _downKeys = []; // 记录摁下的绑定键\nlet winListendFocus = null; // window是否已经监听了focus事件\nlet _scope = 'all'; // 默认热键范围\nconst elementEventMap = new Map(); // 已绑定事件的节点记录\n\n// 返回键码\nconst code = x => _keyMap[x.toLowerCase()] || _modifier[x.toLowerCase()] || x.toUpperCase().charCodeAt(0);\nconst getKey = x => Object.keys(_keyMap).find(k => _keyMap[k] === x);\nconst getModifier = x => Object.keys(_modifier).find(k => _modifier[k] === x);\n\n// 设置获取当前范围(默认为'所有')\nfunction setScope(scope) {\n  _scope = scope || 'all';\n}\n// 获取当前范围\nfunction getScope() {\n  return _scope || 'all';\n}\n// 获取摁下绑定键的键值\nfunction getPressedKeyCodes() {\n  return _downKeys.slice(0);\n}\nfunction getPressedKeyString() {\n  return _downKeys.map(c => getKey(c) || getModifier(c) || String.fromCharCode(c));\n}\nfunction getAllKeyCodes() {\n  const result = [];\n  Object.keys(_handlers).forEach(k => {\n    _handlers[k].forEach(_ref => {\n      let {\n        key,\n        scope,\n        mods,\n        shortcut\n      } = _ref;\n      result.push({\n        scope,\n        shortcut,\n        mods,\n        keys: key.split('+').map(v => code(v))\n      });\n    });\n  });\n  return result;\n}\n\n// 表单控件控件判断 返回 Boolean\n// hotkey is effective only when filter return true\nfunction filter(event) {\n  const target = event.target || event.srcElement;\n  const {\n    tagName\n  } = target;\n  let flag = true;\n  const isInput = tagName === 'INPUT' && !['checkbox', 'radio', 'range', 'button', 'file', 'reset', 'submit', 'color'].includes(target.type);\n  // ignore: isContentEditable === 'true', <input> and <textarea> when readOnly state is false, <select>\n  if (target.isContentEditable || (isInput || tagName === 'TEXTAREA' || tagName === 'SELECT') && !target.readOnly) {\n    flag = false;\n  }\n  return flag;\n}\n\n// 判断摁下的键是否为某个键,返回true或者false\nfunction isPressed(keyCode) {\n  if (typeof keyCode === 'string') {\n    keyCode = code(keyCode); // 转换成键码\n  }\n  return _downKeys.indexOf(keyCode) !== -1;\n}\n\n// 循环删除handlers中的所有 scope(范围)\nfunction deleteScope(scope, newScope) {\n  let handlers;\n  let i;\n\n  // 没有指定scope,获取scope\n  if (!scope) scope = getScope();\n  for (const key in _handlers) {\n    if (Object.prototype.hasOwnProperty.call(_handlers, key)) {\n      handlers = _handlers[key];\n      for (i = 0; i < handlers.length;) {\n        if (handlers[i].scope === scope) {\n          const deleteItems = handlers.splice(i, 1);\n          deleteItems.forEach(_ref2 => {\n            let {\n              element\n            } = _ref2;\n            return removeKeyEvent(element);\n          });\n        } else {\n          i++;\n        }\n      }\n    }\n  }\n\n  // 如果scope被删除,将scope重置为all\n  if (getScope() === scope) setScope(newScope || 'all');\n}\n\n// 清除修饰键\nfunction clearModifier(event) {\n  let key = event.keyCode || event.which || event.charCode;\n  const i = _downKeys.indexOf(key);\n\n  // 从列表中清除按压过的键\n  if (i >= 0) {\n    _downKeys.splice(i, 1);\n  }\n  // 特殊处理 cmmand 键,在 cmmand 组合快捷键 keyup 只执行一次的问题\n  if (event.key && event.key.toLowerCase() === 'meta') {\n    _downKeys.splice(0, _downKeys.length);\n  }\n\n  // 修饰键 shiftKey altKey ctrlKey (command||metaKey) 清除\n  if (key === 93 || key === 224) key = 91;\n  if (key in _mods) {\n    _mods[key] = false;\n\n    // 将修饰键重置为false\n    for (const k in _modifier) if (_modifier[k] === key) hotkeys[k] = false;\n  }\n}\nfunction unbind(keysInfo) {\n  // unbind(), unbind all keys\n  if (typeof keysInfo === 'undefined') {\n    Object.keys(_handlers).forEach(key => {\n      Array.isArray(_handlers[key]) && _handlers[key].forEach(info => eachUnbind(info));\n      delete _handlers[key];\n    });\n    removeKeyEvent(null);\n  } else if (Array.isArray(keysInfo)) {\n    // support like : unbind([{key: 'ctrl+a', scope: 's1'}, {key: 'ctrl-a', scope: 's2', splitKey: '-'}])\n    keysInfo.forEach(info => {\n      if (info.key) eachUnbind(info);\n    });\n  } else if (typeof keysInfo === 'object') {\n    // support like unbind({key: 'ctrl+a, ctrl+b', scope:'abc'})\n    if (keysInfo.key) eachUnbind(keysInfo);\n  } else if (typeof keysInfo === 'string') {\n    for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n      args[_key - 1] = arguments[_key];\n    }\n    // support old method\n    // eslint-disable-line\n    let [scope, method] = args;\n    if (typeof scope === 'function') {\n      method = scope;\n      scope = '';\n    }\n    eachUnbind({\n      key: keysInfo,\n      scope,\n      method,\n      splitKey: '+'\n    });\n  }\n}\n\n// 解除绑定某个范围的快捷键\nconst eachUnbind = _ref3 => {\n  let {\n    key,\n    scope,\n    method,\n    splitKey = '+'\n  } = _ref3;\n  const multipleKeys = getKeys(key);\n  multipleKeys.forEach(originKey => {\n    const unbindKeys = originKey.split(splitKey);\n    const len = unbindKeys.length;\n    const lastKey = unbindKeys[len - 1];\n    const keyCode = lastKey === '*' ? '*' : code(lastKey);\n    if (!_handlers[keyCode]) return;\n    // 判断是否传入范围,没有就获取范围\n    if (!scope) scope = getScope();\n    const mods = len > 1 ? getMods(_modifier, unbindKeys) : [];\n    const unbindElements = [];\n    _handlers[keyCode] = _handlers[keyCode].filter(record => {\n      // 通过函数判断,是否解除绑定,函数相等直接返回\n      const isMatchingMethod = method ? record.method === method : true;\n      const isUnbind = isMatchingMethod && record.scope === scope && compareArray(record.mods, mods);\n      if (isUnbind) unbindElements.push(record.element);\n      return !isUnbind;\n    });\n    unbindElements.forEach(element => removeKeyEvent(element));\n  });\n};\n\n// 对监听对应快捷键的回调函数进行处理\nfunction eventHandler(event, handler, scope, element) {\n  if (handler.element !== element) {\n    return;\n  }\n  let modifiersMatch;\n\n  // 看它是否在当前范围\n  if (handler.scope === scope || handler.scope === 'all') {\n    // 检查是否匹配修饰符(如果有返回true)\n    modifiersMatch = handler.mods.length > 0;\n    for (const y in _mods) {\n      if (Object.prototype.hasOwnProperty.call(_mods, y)) {\n        if (!_mods[y] && handler.mods.indexOf(+y) > -1 || _mods[y] && handler.mods.indexOf(+y) === -1) {\n          modifiersMatch = false;\n        }\n      }\n    }\n\n    // 调用处理程序,如果是修饰键不做处理\n    if (handler.mods.length === 0 && !_mods[16] && !_mods[18] && !_mods[17] && !_mods[91] || modifiersMatch || handler.shortcut === '*') {\n      handler.keys = [];\n      handler.keys = handler.keys.concat(_downKeys);\n      if (handler.method(event, handler) === false) {\n        if (event.preventDefault) event.preventDefault();else event.returnValue = false;\n        if (event.stopPropagation) event.stopPropagation();\n        if (event.cancelBubble) event.cancelBubble = true;\n      }\n    }\n  }\n}\n\n// 处理keydown事件\nfunction dispatch(event, element) {\n  const asterisk = _handlers['*'];\n  let key = event.keyCode || event.which || event.charCode;\n\n  // 表单控件过滤 默认表单控件不触发快捷键\n  if (!hotkeys.filter.call(this, event)) return;\n\n  // Gecko(Firefox)的command键值224,在Webkit(Chrome)中保持一致\n  // Webkit左右 command 键值不一样\n  if (key === 93 || key === 224) key = 91;\n\n  /**\n   * Collect bound keys\n   * If an Input Method Editor is processing key input and the event is keydown, return 229.\n   * https://stackoverflow.com/questions/25043934/is-it-ok-to-ignore-keydown-events-with-keycode-229\n   * http://lists.w3.org/Archives/Public/www-dom/2010JulSep/att-0182/keyCode-spec.html\n   */\n  if (_downKeys.indexOf(key) === -1 && key !== 229) _downKeys.push(key);\n  /**\n   * Jest test cases are required.\n   * ===============================\n   */\n  ['metaKey', 'ctrlKey', 'altKey', 'shiftKey'].forEach(keyName => {\n    const keyNum = modifierMap[keyName];\n    if (event[keyName] && _downKeys.indexOf(keyNum) === -1) {\n      _downKeys.push(keyNum);\n    } else if (!event[keyName] && _downKeys.indexOf(keyNum) > -1) {\n      _downKeys.splice(_downKeys.indexOf(keyNum), 1);\n    } else if (keyName === 'metaKey' && event[keyName]) {\n      // 如果command被按下,那就清空所有除event按键外的非装饰键。\n      // 因为command被按下的情况下非装饰键的keyup永远都不会触发。这是已知的浏览器限制。\n      // If command key is pressed, clear all non-decorating keys except for key in event.\n      // This is because keyup for a non-decorating key will NEVER be triggered when command is pressed.\n      // This is a known browser limitation.\n      _downKeys = _downKeys.filter(k => k in modifierMap || k === key);\n    }\n  });\n  /**\n   * -------------------------------\n   */\n\n  if (key in _mods) {\n    _mods[key] = true;\n\n    // 将特殊字符的key注册到 hotkeys 上\n    for (const k in _modifier) {\n      if (_modifier[k] === key) hotkeys[k] = true;\n    }\n    if (!asterisk) return;\n  }\n\n  // 将 modifierMap 里面的修饰键绑定到 event 中\n  for (const e in _mods) {\n    if (Object.prototype.hasOwnProperty.call(_mods, e)) {\n      _mods[e] = event[modifierMap[e]];\n    }\n  }\n  /**\n   * https://github.com/jaywcjlove/hotkeys/pull/129\n   * This solves the issue in Firefox on Windows where hotkeys corresponding to special characters would not trigger.\n   * An example of this is ctrl+alt+m on a Swedish keyboard which is used to type μ.\n   * Browser support: https://caniuse.com/#feat=keyboardevent-getmodifierstate\n   */\n  if (event.getModifierState && !(event.altKey && !event.ctrlKey) && event.getModifierState('AltGraph')) {\n    if (_downKeys.indexOf(17) === -1) {\n      _downKeys.push(17);\n    }\n    if (_downKeys.indexOf(18) === -1) {\n      _downKeys.push(18);\n    }\n    _mods[17] = true;\n    _mods[18] = true;\n  }\n\n  // 获取范围 默认为 `all`\n  const scope = getScope();\n  // 对任何快捷键都需要做的处理\n  if (asterisk) {\n    for (let i = 0; i < asterisk.length; i++) {\n      if (asterisk[i].scope === scope && (event.type === 'keydown' && asterisk[i].keydown || event.type === 'keyup' && asterisk[i].keyup)) {\n        eventHandler(event, asterisk[i], scope, element);\n      }\n    }\n  }\n  // key 不在 _handlers 中返回\n  if (!(key in _handlers)) return;\n  const handlerKey = _handlers[key];\n  const keyLen = handlerKey.length;\n  for (let i = 0; i < keyLen; i++) {\n    if (event.type === 'keydown' && handlerKey[i].keydown || event.type === 'keyup' && handlerKey[i].keyup) {\n      if (handlerKey[i].key) {\n        const record = handlerKey[i];\n        const {\n          splitKey\n        } = record;\n        const keyShortcut = record.key.split(splitKey);\n        const _downKeysCurrent = []; // 记录当前按键键值\n        for (let a = 0; a < keyShortcut.length; a++) {\n          _downKeysCurrent.push(code(keyShortcut[a]));\n        }\n        if (_downKeysCurrent.sort().join('') === _downKeys.sort().join('')) {\n          // 找到处理内容\n          eventHandler(event, record, scope, element);\n        }\n      }\n    }\n  }\n}\nfunction hotkeys(key, option, method) {\n  _downKeys = [];\n  const keys = getKeys(key); // 需要处理的快捷键列表\n  let mods = [];\n  let scope = 'all'; // scope默认为all,所有范围都有效\n  let element = document; // 快捷键事件绑定节点\n  let i = 0;\n  let keyup = false;\n  let keydown = true;\n  let splitKey = '+';\n  let capture = false;\n  let single = false; // 单个callback\n\n  // 对为设定范围的判断\n  if (method === undefined && typeof option === 'function') {\n    method = option;\n  }\n  if (Object.prototype.toString.call(option) === '[object Object]') {\n    if (option.scope) scope = option.scope; // eslint-disable-line\n    if (option.element) element = option.element; // eslint-disable-line\n    if (option.keyup) keyup = option.keyup; // eslint-disable-line\n    if (option.keydown !== undefined) keydown = option.keydown; // eslint-disable-line\n    if (option.capture !== undefined) capture = option.capture; // eslint-disable-line\n    if (typeof option.splitKey === 'string') splitKey = option.splitKey; // eslint-disable-line\n    if (option.single === true) single = true; // eslint-disable-line\n  }\n  if (typeof option === 'string') scope = option;\n\n  // 如果只允许单个callback,先unbind\n  if (single) unbind(key, scope);\n\n  // 对于每个快捷键进行处理\n  for (; i < keys.length; i++) {\n    key = keys[i].split(splitKey); // 按键列表\n    mods = [];\n\n    // 如果是组合快捷键取得组合快捷键\n    if (key.length > 1) mods = getMods(_modifier, key);\n\n    // 将非修饰键转化为键码\n    key = key[key.length - 1];\n    key = key === '*' ? '*' : code(key); // *表示匹配所有快捷键\n\n    // 判断key是否在_handlers中,不在就赋一个空数组\n    if (!(key in _handlers)) _handlers[key] = [];\n    _handlers[key].push({\n      keyup,\n      keydown,\n      scope,\n      mods,\n      shortcut: keys[i],\n      method,\n      key: keys[i],\n      splitKey,\n      element\n    });\n  }\n  // 在全局document上设置快捷键\n  if (typeof element !== 'undefined' && window) {\n    if (!elementEventMap.has(element)) {\n      const keydownListener = function () {\n        let event = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : window.event;\n        return dispatch(event, element);\n      };\n      const keyupListenr = function () {\n        let event = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : window.event;\n        dispatch(event, element);\n        clearModifier(event);\n      };\n      elementEventMap.set(element, {\n        keydownListener,\n        keyupListenr,\n        capture\n      });\n      addEvent(element, 'keydown', keydownListener, capture);\n      addEvent(element, 'keyup', keyupListenr, capture);\n    }\n    if (!winListendFocus) {\n      const listener = () => {\n        _downKeys = [];\n      };\n      winListendFocus = {\n        listener,\n        capture\n      };\n      addEvent(window, 'focus', listener, capture);\n    }\n  }\n}\nfunction trigger(shortcut) {\n  let scope = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'all';\n  Object.keys(_handlers).forEach(key => {\n    const dataList = _handlers[key].filter(item => item.scope === scope && item.shortcut === shortcut);\n    dataList.forEach(data => {\n      if (data && data.method) {\n        data.method();\n      }\n    });\n  });\n}\n\n// 销毁事件,unbind之后判断element上是否还有键盘快捷键,如果没有移除监听\nfunction removeKeyEvent(element) {\n  const values = Object.values(_handlers).flat();\n  const findindex = values.findIndex(_ref4 => {\n    let {\n      element: el\n    } = _ref4;\n    return el === element;\n  });\n  if (findindex < 0) {\n    const {\n      keydownListener,\n      keyupListenr,\n      capture\n    } = elementEventMap.get(element) || {};\n    if (keydownListener && keyupListenr) {\n      removeEvent(element, 'keyup', keyupListenr, capture);\n      removeEvent(element, 'keydown', keydownListener, capture);\n      elementEventMap.delete(element);\n    }\n  }\n  if (values.length <= 0 || elementEventMap.size <= 0) {\n    // 移除所有的元素上的监听\n    const eventKeys = Object.keys(elementEventMap);\n    eventKeys.forEach(el => {\n      const {\n        keydownListener,\n        keyupListenr,\n        capture\n      } = elementEventMap.get(el) || {};\n      if (keydownListener && keyupListenr) {\n        removeEvent(el, 'keyup', keyupListenr, capture);\n        removeEvent(el, 'keydown', keydownListener, capture);\n        elementEventMap.delete(el);\n      }\n    });\n    // 清空 elementEventMap\n    elementEventMap.clear();\n    // 清空 _handlers\n    Object.keys(_handlers).forEach(key => delete _handlers[key]);\n    // 移除window上的focus监听\n    if (winListendFocus) {\n      const {\n        listener,\n        capture\n      } = winListendFocus;\n      removeEvent(window, 'focus', listener, capture);\n      winListendFocus = null;\n    }\n  }\n}\nconst _api = {\n  getPressedKeyString,\n  setScope,\n  getScope,\n  deleteScope,\n  getPressedKeyCodes,\n  getAllKeyCodes,\n  isPressed,\n  filter,\n  trigger,\n  unbind,\n  keyMap: _keyMap,\n  modifier: _modifier,\n  modifierMap\n};\nfor (const a in _api) {\n  if (Object.prototype.hasOwnProperty.call(_api, a)) {\n    hotkeys[a] = _api[a];\n  }\n}\nif (typeof window !== 'undefined') {\n  const _hotkeys = window.hotkeys;\n  hotkeys.noConflict = deep => {\n    if (deep && window.hotkeys === hotkeys) {\n      window.hotkeys = _hotkeys;\n    }\n    return hotkeys;\n  };\n  window.hotkeys = hotkeys;\n}\n\nexport { hotkeys as default };\n","import hotkeys from 'hotkeys-js';\n\n// https://github.com/jaywcjlove/hotkeys/\nexport default class Keyboard {\n  static map(keys, callback) {\n    hotkeys(keys, function (event, handler) {\n      callback(event, handler);\n    });\n  }\n}\n","import { Controller } from '@hotwired/stimulus';\nimport { get } from '@rails/request.js';\nimport { hide as hideElement, show as showElement } from '@frontend/utils/dom';\nimport Keyboard from '@frontend/utils/keyboard';\n\nexport default class extends Controller {\n  static targets = ['overlay', 'window', 'body'];\n\n  connect() {\n    document.addEventListener(\n      'modal-window:display',\n      this.handleDisplay.bind(this)\n    );\n    document.addEventListener(\n      'modal-window:load-and-display',\n      this.loadAndDisplayUrl.bind(this)\n    );\n    document.addEventListener('modal-window:hide', this.hide.bind(this));\n\n    Keyboard.map('escape', (event) => {\n      event.preventDefault();\n      event.stopPropagation();\n      event.stopImmediatePropagation();\n      this.hide();\n    });\n  }\n\n  display(html) {\n    this.bodyTarget.innerHTML = html;\n    if (html === null) {\n      hideElement(this.windowTarget);\n    } else {\n      showElement(this.windowTarget);\n    }\n    this.disableBackgroundScrolling();\n    this.previouslyActiveElement = document.activeElement;\n    this.bodyTarget.focus();\n    showElement(this.overlayTarget);\n  }\n\n  hide() {\n    if (this.previouslyActiveElement) {\n      this.previouslyActiveElement.focus();\n      this.previouslyActiveElement = null;\n    }\n    this.reEnableBackgroundScrolling();\n    hideElement(this.overlayTarget);\n  }\n\n  async loadAndDisplay(url) {\n    const response = await get(url);\n    if (response.ok) {\n      const html = await response.text;\n      this.display(html);\n    }\n  }\n\n  disableBackgroundScrolling() {\n    document.querySelector('html').classList.add('prevent-scroll');\n  }\n\n  reEnableBackgroundScrolling() {\n    document.querySelector('html').classList.remove('prevent-scroll');\n  }\n\n  loadAndDisplayUrl(event) {\n    const url = event.params?.url || event.detail?.url;\n    this.loadAndDisplay(url);\n  }\n\n  handleDisplay({ detail: { html } }) {\n    this.display(html);\n  }\n}\n\nexport function display(html) {\n  document.body.dispatchEvent(\n    new CustomEvent('modal-window:display', {\n      bubbles: true,\n      detail: { html },\n    })\n  );\n}\n\nexport function loadAndDisplay(url) {\n  document.body.dispatchEvent(\n    new CustomEvent('modal-window:load-and-display', {\n      bubbles: true,\n      detail: { url },\n    })\n  );\n}\n\nexport function hide() {\n  document.body.dispatchEvent(\n    new CustomEvent('modal-window:hide', { bubbles: true })\n  );\n}\n","/**\n * lodash (Custom Build) <https://lodash.com/>\n * Build: `lodash modularize exports=\"npm\" -o ./`\n * Copyright jQuery Foundation and other contributors <https://jquery.org/>\n * Released under MIT license <https://lodash.com/license>\n * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>\n * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors\n */\n\n/** Used as the `TypeError` message for \"Functions\" methods. */\nvar FUNC_ERROR_TEXT = 'Expected a function';\n\n/** Used as references for various `Number` constants. */\nvar NAN = 0 / 0;\n\n/** `Object#toString` result references. */\nvar symbolTag = '[object Symbol]';\n\n/** Used to match leading and trailing whitespace. */\nvar reTrim = /^\\s+|\\s+$/g;\n\n/** Used to detect bad signed hexadecimal string values. */\nvar reIsBadHex = /^[-+]0x[0-9a-f]+$/i;\n\n/** Used to detect binary string values. */\nvar reIsBinary = /^0b[01]+$/i;\n\n/** Used to detect octal string values. */\nvar reIsOctal = /^0o[0-7]+$/i;\n\n/** Built-in method references without a dependency on `root`. */\nvar freeParseInt = parseInt;\n\n/** Detect free variable `global` from Node.js. */\nvar freeGlobal = typeof global == 'object' && global && global.Object === Object && global;\n\n/** Detect free variable `self`. */\nvar freeSelf = typeof self == 'object' && self && self.Object === Object && self;\n\n/** Used as a reference to the global object. */\nvar root = freeGlobal || freeSelf || Function('return this')();\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar objectToString = objectProto.toString;\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeMax = Math.max,\n    nativeMin = Math.min;\n\n/**\n * Gets the timestamp of the number of milliseconds that have elapsed since\n * the Unix epoch (1 January 1970 00:00:00 UTC).\n *\n * @static\n * @memberOf _\n * @since 2.4.0\n * @category Date\n * @returns {number} Returns the timestamp.\n * @example\n *\n * _.defer(function(stamp) {\n *   console.log(_.now() - stamp);\n * }, _.now());\n * // => Logs the number of milliseconds it took for the deferred invocation.\n */\nvar now = function() {\n  return root.Date.now();\n};\n\n/**\n * Creates a debounced function that delays invoking `func` until after `wait`\n * milliseconds have elapsed since the last time the debounced function was\n * invoked. The debounced function comes with a `cancel` method to cancel\n * delayed `func` invocations and a `flush` method to immediately invoke them.\n * Provide `options` to indicate whether `func` should be invoked on the\n * leading and/or trailing edge of the `wait` timeout. The `func` is invoked\n * with the last arguments provided to the debounced function. Subsequent\n * calls to the debounced function return the result of the last `func`\n * invocation.\n *\n * **Note:** If `leading` and `trailing` options are `true`, `func` is\n * invoked on the trailing edge of the timeout only if the debounced function\n * is invoked more than once during the `wait` timeout.\n *\n * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred\n * until to the next tick, similar to `setTimeout` with a timeout of `0`.\n *\n * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/)\n * for details over the differences between `_.debounce` and `_.throttle`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Function\n * @param {Function} func The function to debounce.\n * @param {number} [wait=0] The number of milliseconds to delay.\n * @param {Object} [options={}] The options object.\n * @param {boolean} [options.leading=false]\n *  Specify invoking on the leading edge of the timeout.\n * @param {number} [options.maxWait]\n *  The maximum time `func` is allowed to be delayed before it's invoked.\n * @param {boolean} [options.trailing=true]\n *  Specify invoking on the trailing edge of the timeout.\n * @returns {Function} Returns the new debounced function.\n * @example\n *\n * // Avoid costly calculations while the window size is in flux.\n * jQuery(window).on('resize', _.debounce(calculateLayout, 150));\n *\n * // Invoke `sendMail` when clicked, debouncing subsequent calls.\n * jQuery(element).on('click', _.debounce(sendMail, 300, {\n *   'leading': true,\n *   'trailing': false\n * }));\n *\n * // Ensure `batchLog` is invoked once after 1 second of debounced calls.\n * var debounced = _.debounce(batchLog, 250, { 'maxWait': 1000 });\n * var source = new EventSource('/stream');\n * jQuery(source).on('message', debounced);\n *\n * // Cancel the trailing debounced invocation.\n * jQuery(window).on('popstate', debounced.cancel);\n */\nfunction debounce(func, wait, options) {\n  var lastArgs,\n      lastThis,\n      maxWait,\n      result,\n      timerId,\n      lastCallTime,\n      lastInvokeTime = 0,\n      leading = false,\n      maxing = false,\n      trailing = true;\n\n  if (typeof func != 'function') {\n    throw new TypeError(FUNC_ERROR_TEXT);\n  }\n  wait = toNumber(wait) || 0;\n  if (isObject(options)) {\n    leading = !!options.leading;\n    maxing = 'maxWait' in options;\n    maxWait = maxing ? nativeMax(toNumber(options.maxWait) || 0, wait) : maxWait;\n    trailing = 'trailing' in options ? !!options.trailing : trailing;\n  }\n\n  function invokeFunc(time) {\n    var args = lastArgs,\n        thisArg = lastThis;\n\n    lastArgs = lastThis = undefined;\n    lastInvokeTime = time;\n    result = func.apply(thisArg, args);\n    return result;\n  }\n\n  function leadingEdge(time) {\n    // Reset any `maxWait` timer.\n    lastInvokeTime = time;\n    // Start the timer for the trailing edge.\n    timerId = setTimeout(timerExpired, wait);\n    // Invoke the leading edge.\n    return leading ? invokeFunc(time) : result;\n  }\n\n  function remainingWait(time) {\n    var timeSinceLastCall = time - lastCallTime,\n        timeSinceLastInvoke = time - lastInvokeTime,\n        result = wait - timeSinceLastCall;\n\n    return maxing ? nativeMin(result, maxWait - timeSinceLastInvoke) : result;\n  }\n\n  function shouldInvoke(time) {\n    var timeSinceLastCall = time - lastCallTime,\n        timeSinceLastInvoke = time - lastInvokeTime;\n\n    // Either this is the first call, activity has stopped and we're at the\n    // trailing edge, the system time has gone backwards and we're treating\n    // it as the trailing edge, or we've hit the `maxWait` limit.\n    return (lastCallTime === undefined || (timeSinceLastCall >= wait) ||\n      (timeSinceLastCall < 0) || (maxing && timeSinceLastInvoke >= maxWait));\n  }\n\n  function timerExpired() {\n    var time = now();\n    if (shouldInvoke(time)) {\n      return trailingEdge(time);\n    }\n    // Restart the timer.\n    timerId = setTimeout(timerExpired, remainingWait(time));\n  }\n\n  function trailingEdge(time) {\n    timerId = undefined;\n\n    // Only invoke if we have `lastArgs` which means `func` has been\n    // debounced at least once.\n    if (trailing && lastArgs) {\n      return invokeFunc(time);\n    }\n    lastArgs = lastThis = undefined;\n    return result;\n  }\n\n  function cancel() {\n    if (timerId !== undefined) {\n      clearTimeout(timerId);\n    }\n    lastInvokeTime = 0;\n    lastArgs = lastCallTime = lastThis = timerId = undefined;\n  }\n\n  function flush() {\n    return timerId === undefined ? result : trailingEdge(now());\n  }\n\n  function debounced() {\n    var time = now(),\n        isInvoking = shouldInvoke(time);\n\n    lastArgs = arguments;\n    lastThis = this;\n    lastCallTime = time;\n\n    if (isInvoking) {\n      if (timerId === undefined) {\n        return leadingEdge(lastCallTime);\n      }\n      if (maxing) {\n        // Handle invocations in a tight loop.\n        timerId = setTimeout(timerExpired, wait);\n        return invokeFunc(lastCallTime);\n      }\n    }\n    if (timerId === undefined) {\n      timerId = setTimeout(timerExpired, wait);\n    }\n    return result;\n  }\n  debounced.cancel = cancel;\n  debounced.flush = flush;\n  return debounced;\n}\n\n/**\n * Checks if `value` is the\n * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)\n * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an object, else `false`.\n * @example\n *\n * _.isObject({});\n * // => true\n *\n * _.isObject([1, 2, 3]);\n * // => true\n *\n * _.isObject(_.noop);\n * // => true\n *\n * _.isObject(null);\n * // => false\n */\nfunction isObject(value) {\n  var type = typeof value;\n  return !!value && (type == 'object' || type == 'function');\n}\n\n/**\n * Checks if `value` is object-like. A value is object-like if it's not `null`\n * and has a `typeof` result of \"object\".\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is object-like, else `false`.\n * @example\n *\n * _.isObjectLike({});\n * // => true\n *\n * _.isObjectLike([1, 2, 3]);\n * // => true\n *\n * _.isObjectLike(_.noop);\n * // => false\n *\n * _.isObjectLike(null);\n * // => false\n */\nfunction isObjectLike(value) {\n  return !!value && typeof value == 'object';\n}\n\n/**\n * Checks if `value` is classified as a `Symbol` primitive or object.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a symbol, else `false`.\n * @example\n *\n * _.isSymbol(Symbol.iterator);\n * // => true\n *\n * _.isSymbol('abc');\n * // => false\n */\nfunction isSymbol(value) {\n  return typeof value == 'symbol' ||\n    (isObjectLike(value) && objectToString.call(value) == symbolTag);\n}\n\n/**\n * Converts `value` to a number.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to process.\n * @returns {number} Returns the number.\n * @example\n *\n * _.toNumber(3.2);\n * // => 3.2\n *\n * _.toNumber(Number.MIN_VALUE);\n * // => 5e-324\n *\n * _.toNumber(Infinity);\n * // => Infinity\n *\n * _.toNumber('3.2');\n * // => 3.2\n */\nfunction toNumber(value) {\n  if (typeof value == 'number') {\n    return value;\n  }\n  if (isSymbol(value)) {\n    return NAN;\n  }\n  if (isObject(value)) {\n    var other = typeof value.valueOf == 'function' ? value.valueOf() : value;\n    value = isObject(other) ? (other + '') : other;\n  }\n  if (typeof value != 'string') {\n    return value === 0 ? value : +value;\n  }\n  value = value.replace(reTrim, '');\n  var isBinary = reIsBinary.test(value);\n  return (isBinary || reIsOctal.test(value))\n    ? freeParseInt(value.slice(2), isBinary ? 2 : 8)\n    : (reIsBadHex.test(value) ? NAN : +value);\n}\n\nmodule.exports = debounce;\n","import { Controller } from '@hotwired/stimulus';\nimport { hide as hideElement, show as showElement } from '@frontend/utils/dom';\n\nexport default class extends Controller {\n  static targets = ['overlay'];\n\n  connect() {\n    document.addEventListener('loading-indicator:show', this.show.bind(this));\n    document.addEventListener('loading-indicator:hide', this.hide.bind(this));\n  }\n\n  show() {\n    showElement(this.overlayTarget);\n  }\n\n  hide() {\n    hideElement(this.overlayTarget);\n  }\n}\n\nexport function show() {\n  document.body.dispatchEvent(\n    new CustomEvent('loading-indicator:show', {\n      bubbles: true,\n    })\n  );\n}\n\nexport function hide() {\n  document.body.dispatchEvent(\n    new CustomEvent('loading-indicator:hide', {\n      bubbles: true,\n    })\n  );\n}\n"],"names":["component_controller$1","Controller","element","message","type","timeoutInMs","event","__publicField","showNotification","options","clearNotification","isff","addEvent","object","method","useCapture","removeEvent","getMods","modifier","key","mods","getKeys","keys","index","compareArray","a1","a2","arr1","arr2","isIndex","i","_keyMap","_modifier","modifierMap","_mods","_handlers","k","_downKeys","winListendFocus","_scope","elementEventMap","code","x","getKey","getModifier","setScope","scope","getScope","getPressedKeyCodes","getPressedKeyString","c","getAllKeyCodes","result","_ref","shortcut","v","filter","target","tagName","flag","isInput","isPressed","keyCode","deleteScope","newScope","handlers","_ref2","removeKeyEvent","clearModifier","hotkeys","unbind","keysInfo","info","eachUnbind","_len","args","_key","_ref3","splitKey","originKey","unbindKeys","len","lastKey","unbindElements","record","isUnbind","eventHandler","handler","modifiersMatch","y","dispatch","asterisk","keyName","keyNum","e","handlerKey","keyLen","keyShortcut","_downKeysCurrent","a","option","keyup","keydown","capture","single","keydownListener","keyupListenr","listener","trigger","item","data","values","_ref4","el","_api","_hotkeys","deep","Keyboard","callback","modalWindow_controller","html","hideElement","showElement","url","response","get","_a","_b","display","loadAndDisplay","hide","FUNC_ERROR_TEXT","NAN","symbolTag","reTrim","reIsBadHex","reIsBinary","reIsOctal","freeParseInt","freeGlobal","global","freeSelf","root","objectProto","objectToString","nativeMax","nativeMin","now","debounce","func","wait","lastArgs","lastThis","maxWait","timerId","lastCallTime","lastInvokeTime","leading","maxing","trailing","toNumber","isObject","invokeFunc","time","thisArg","leadingEdge","timerExpired","remainingWait","timeSinceLastCall","timeSinceLastInvoke","shouldInvoke","trailingEdge","cancel","flush","debounced","isInvoking","value","isObjectLike","isSymbol","other","isBinary","lodash_debounce","component_controller","show"],"mappings":"uWAEe,MAAKA,WAASC,EAAW,CAGtC,SAAU,CACR,SAAS,KAAK,iBACZ,oBACA,KAAK,uBAAuB,KAAK,IAAI,CACtC,EACD,SAAS,KAAK,iBACZ,qBACA,KAAK,kBAAkB,KAAK,IAAI,CACjC,EACD,KAAK,aAAe,KACpB,KAAK,sBAAsB,iBACzB,QACA,KAAK,kBAAkB,KAAK,IAAI,CACjC,CACL,CAEE,4BAA4BC,EAAS,CACnC,MAAMC,EAAUD,EAAQ,YACxB,GAAIC,EAAQ,OAAS,EAAG,CACtB,MAAMC,EAAOF,EAAQ,QAAQ,iBACvBG,EAAcH,EAAQ,QAAQ,YACpC,KAAK,iBAAiBC,EAAS,CAAE,YAAAE,EAAa,KAAAD,CAAI,CAAE,EACpDF,EAAQ,OAAQ,CACtB,CACA,CAEE,uBAAuBI,EAAO,CAC5B,MAAMH,EAAUG,EAAM,OAAO,QACvBD,EAAcC,EAAM,OAAO,YAC3BF,EAAOE,EAAM,OAAO,KAE1B,KAAK,iBA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