All Downloads are FREE. Search and download functionalities are using the official Maven repository.

web-interface.assets.1255d548-1247.27b1f8022611d1b94b4c.js.map Maven / Gradle / Ivy

There is a newer version: 6.1.4
Show newest version
{"version":3,"file":"1255d548-1247.27b1f8022611d1b94b4c.js","mappings":"gVAuBA,QAAe,KC6Kf,KAvKwB,WAAO,CAAS,EAAS,CAAC,CAAE,SAAAA,EAAU,QAAAC,EAAS,SAAAC,CAAS,OAAM;AAAA;AAAA,MAEhFD,EAAU,WAAWA,CAAO,gBAAkB,EAAE;AAAA;AAAA;AAAA,wBAG9BD,EAAS,OAAO,MAAM,UAAU;AAAA,aAC3CA,EAAS,MAAM,iBAAiBA,EAAS,OAAO,MAAM,WAAY,KAAK,CAAC;AAAA,wBAC7DA,EAAS,OAAO,QAAQ,MAAM,OAAO;AAAA,qBACxC,IAAmB;AAAA;AAAA;AAAA,8BAGVA,EAAS,OAAO,MAAM,UAAU;AAAA;AAAA;AAAA;AAAA,oBAI1CA,EAAS,OAAO,MAAM,UAAU;AAAA,eACrCA,EAAS,MAAM,iBAAiBA,EAAS,OAAO,MAAM,WAAY,KAAK,CAAC;AAAA;AAAA;AAAA;AAAA;AAAA,oBAKnEA,EAAS,OAAO,MAAM,UAAU;AAAA;AAAA;AAAA;AAAA,eAIrCA,EAAS,OAAO,KAAK,EAAE,CAAC;AAAA,iBACtBE,EAAW,OAAS,OAAO;AAAA;AAAA;AAAA;AAAA,oBAIxBF,EAAS,OAAO,QAAQ,SAAS,OAAO;AAAA;AAAA;AAAA;AAAA,oBAIxCA,EAAS,OAAO,QAAQ,OAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,oBAS/BA,EAAS,OAAO,MAAM,UAAU;AAAA;AAAA;AAAA;AAAA,0BAI1BA,EAAS,OAAO,MAAM,UAAU;AAAA;AAAA;AAAA;AAAA,0BAIhCA,EAAS,OAAO,KAAK,EAAE,CAAC;AAAA;AAAA;AAAA;AAAA,eAInCA,EAAS,OAAO,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ACL,CACE,MAAO,0BACP,MAAO,2CACT,EAAG,CACD,MAAO,oBACP,MAAO,cACP,KAAM,OACR,EAAG,CACD,MAAO,UACP,MAAO,+CACT,EAAG,CACD,MAAO,2BACP,MAAO,+CACT,EAAG,CACD,MAAO,2BAEP,MAAO,eACT,EAAG,CACD,MAAO,8BACP,MAAO,IACT,EAAG,CACD,MAAO,2BACP,MAAO,QACP,KAAM,uBACR,EAAG,CACD,MAAO,QACP,MAAO,IACP,KAAM,OACR,EAAG,CACD,aAAc,eAChB,CACF,EACA,sBAAuB,CACrB,CACE,MAAO,oCACP,MAAO,2CACT,EAAG,CACD,MAAO,2BACP,MAAO,IACP,KAAM,OACR,EAAG,CACD,MAAO,2BACP,MAAO,GACT,EAAG,CACD,MAAO,QACP,MAAO,IACP,KAAM,OACR,EAAG,CACD,aAAc,+BAChB,CACF,CACF,CACF,EAEAkB,EAAI,SAASE,EAAsBD,CAAkB,EAGrDH,EAAQ,qBAAuBI,CACjC,CAAC,EAGD,IAAI,OAAO,kBAAmB,CAAC,UAAW,UAAW,SAAU,cAAe,gBAAiB,iCAAiC,EAAG,CAACH,EAASD,IAAY,CACvJ,MAAME,EAAMD,EAAQ,YAAY,EAC1BI,EAAWJ,EAAQ,QAAQ,EAAE,KAC7B,CAAE,qBAAAG,CAAqB,EAAIH,EAAQ,0BAA0B,EAG7DK,EAAO,UAAY,CACvB,KAAK,eAAiBF,EACtB,KAAK,WAAa,KAAK,iBACzB,EAEAF,EAAI,SAASI,EAAMD,CAAQ,GAG1B,UAAY,CACX,KAAK,IAAM,iBACb,GAAG,KAAKC,EAAK,SAAS,EAGtBN,EAAQ,KAAOM,CACjB,CAAC,EAGA,UAAY,CAEX,IAAI,QAAQ,CAAC,iBAAiB,EAAIC,GAAM,CAC2BC,IAC/DA,EAAO,QAAUD,EAErB,CAAC,CACH,EAAE,C","sources":["webpack://graylog-web-interface/./src/views/components/searchbar/queryinput/ace.ts","webpack://graylog-web-interface/./src/views/components/searchbar/queryinput/StyledAceEditor.tsx","webpack://graylog-web-interface/./src/views/components/searchbar/queryinput/BasicQueryInput.tsx","webpack://graylog-web-interface/./src/views/components/searchbar/queryinput/ace-queryinput.js","webpack://graylog-web-interface/./src/views/components/searchbar/queryinput/custom-lucene-mode.js"],"sourcesContent":["/*\n * Copyright (C) 2020 Graylog, Inc.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the Server Side Public License, version 1,\n * as published by MongoDB, Inc.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * Server Side Public License for more details.\n *\n * You should have received a copy of the Server Side Public License\n * along with this program. If not, see\n * .\n */\nimport AceEditor from 'react-ace';\n\nimport './ace-queryinput';\nimport 'ace-builds/src-noconflict/ext-language_tools';\nimport './custom-lucene-mode';\nimport 'ace-builds/webpack-resolver';\n\nexport default AceEditor;\n","/*\n * Copyright (C) 2020 Graylog, Inc.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the Server Side Public License, version 1,\n * as published by MongoDB, Inc.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * Server Side Public License for more details.\n *\n * You should have received a copy of the Server Side Public License\n * along with this program. If not, see\n * .\n */\nimport styled, { css } from 'styled-components';\nimport type { DefaultTheme } from 'styled-components';\n\nimport { INPUT_BORDER_RADIUS } from 'theme/constants';\n\nimport AceEditor from './ace';\n\ntype Props = {\n  $height: number,\n  $scTheme: DefaultTheme,\n  disabled: boolean,\n};\n\nconst StyledAceEditor = styled(AceEditor)(({ $scTheme, $height, disabled }) => css`\n  &.ace-queryinput {\n    ${$height ? `height: ${$height}px !important` : ''}\n    min-height: 34px;\n    width: 100% !important;\n    background-color: ${$scTheme.colors.input.background};\n    color: ${$scTheme.utils.contrastingColor($scTheme.colors.input.background, 'AAA')};\n    border: 1px solid ${$scTheme.colors.variant.light.default};\n    border-radius: ${INPUT_BORDER_RADIUS};\n\n    &.ace_multiselect .ace_selection.ace_start {\n      box-shadow: 0 0 3px 0 ${$scTheme.colors.input.background};\n    }\n\n    .ace_gutter {\n      background: ${$scTheme.colors.input.background};\n      color: ${$scTheme.utils.contrastingColor($scTheme.colors.input.background, 'AAA')};\n    }\n\n    .ace_print-margin {\n      width: 1px;\n      background: ${$scTheme.colors.input.background};\n    }\n\n    .ace_cursor {\n      color: ${$scTheme.colors.gray[50]};\n      display: ${disabled ? 'none' : 'block'} !important;\n    }\n\n    .ace_marker-layer .ace_selection {\n      background: ${$scTheme.colors.variant.lightest.default};\n    }\n\n    .ace_marker-layer .ace_step {\n      background: ${$scTheme.colors.variant.warning};\n    }\n\n    .ace_marker-layer .ace_bracket {\n      margin: -1px 0 0 -1px;\n      border: none;\n    }\n\n    .ace_marker-layer .ace_active-line {\n      background: ${$scTheme.colors.input.background};\n    }\n\n    .ace_gutter-active-line {\n      background-color: ${$scTheme.colors.input.background};\n    }\n\n    .ace_marker-layer .ace_selected-word {\n      border: 1px solid ${$scTheme.colors.gray[80]};\n    }\n\n    .ace_invisible {\n      color: ${$scTheme.colors.input.background};\n    }\n\n    .ace_keyword,\n    .ace_meta,\n    .ace_storage,\n    .ace_storage.ace_type,\n    .ace_support.ace_type {\n      color: ${$scTheme.colors.variant.info};\n    }\n\n    .ace_keyword.ace_operator {\n      color: ${$scTheme.colors.global.textDefault};\n    }\n\n    .ace_constant.ace_character,\n    .ace_constant.ace_language,\n    .ace_constant.ace_numeric,\n    .ace_keyword.ace_other.ace_unit,\n    .ace_support.ace_constant,\n    .ace_variable.ace_parameter {\n      color: ${$scTheme.colors.variant.dark.danger};\n    }\n\n    .ace_constant.ace_other {\n      color: ${$scTheme.colors.variant.default};\n    }\n\n    .ace_invalid {\n      color: ${$scTheme.utils.readableColor($scTheme.colors.brand.primary)};\n      background-color: ${$scTheme.colors.brand.primary};\n    }\n\n    .ace_invalid.ace_deprecated {\n      color: ${$scTheme.utils.readableColor($scTheme.colors.brand.primary)};\n      background-color: ${$scTheme.colors.variant.dark.primary};\n    }\n\n    .ace_fold {\n      background-color: ${$scTheme.colors.variant.info};\n      border-color: ${$scTheme.utils.contrastingColor($scTheme.colors.input.background, 'AAA')};\n    }\n\n    .ace_entity.ace_name.ace_function,\n    .ace_support.ace_function,\n    .ace_variable,\n    .ace_term {\n      color: ${$scTheme.colors.variant.darker.info};\n    }\n\n    .ace_support.ace_class,\n    .ace_support.ace_type {\n      color: ${$scTheme.colors.variant.dark.warning};\n    }\n\n    .ace_heading,\n    .ace_markup.ace_heading,\n    .ace_string {\n      color: ${$scTheme.colors.variant.dark.success};\n    }\n\n    .ace_entity.ace_name.ace_tag,\n    .ace_entity.ace_other.ace_attribute-name,\n    .ace_meta.ace_tag,\n    .ace_string.ace_regexp,\n    .ace_variable {\n      color: ${$scTheme.colors.brand.primary};\n    }\n\n    .ace_comment {\n      color: ${$scTheme.colors.gray[60]};\n    }\n\n    .ace_indent-guide {\n      background: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAE0lEQVQImWP4////f4bdu3f/BwAlfgctduB85QAAAABJRU5ErkJggg==') right repeat-y;\n    }\n\n    .ace_placeholder {\n      left: 0;\n      right: 0;\n      padding: 0;\n      margin-top: 6px;\n      margin-left: 4px;\n      margin-right: 4px;\n      transform: none;\n      opacity: 1;\n      z-index: auto !important;\n      font-family: ${$scTheme.fonts.family.monospace} !important;\n      font-size: ${$scTheme.fonts.size.body};\n      color: ${$scTheme.colors.input.placeholder};\n      text-overflow: ellipsis;\n      max-width: 100%;\n      overflow: hidden;\n    }\n\n    .ace_marker {\n      border-bottom: 2px dashed;\n      position: absolute;\n      border-radius: 0;\n      margin-top: 1px;\n    }\n\n    .ace_marker.ace_validation_error {\n      border-color: ${$scTheme.colors.variant.danger};\n    }\n\n    .ace_marker.ace_validation_warning {\n      border-color: ${$scTheme.colors.variant.dark.warning};\n    }\n  }\n`);\n\nexport default StyledAceEditor;\n","/*\n * Copyright (C) 2020 Graylog, Inc.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the Server Side Public License, version 1,\n * as published by MongoDB, Inc.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * Server Side Public License for more details.\n *\n * You should have received a copy of the Server Side Public License\n * along with this program. If not, see\n * .\n */\nimport * as React from 'react';\nimport { forwardRef, useMemo, useCallback } from 'react';\nimport PropTypes from 'prop-types';\nimport { useTheme } from 'styled-components';\nimport type { IMarker } from 'react-ace';\n\nimport type { QueryValidationState } from 'views/components/searchbar/queryvalidation/types';\n\nimport StyledAceEditor from './StyledAceEditor';\nimport type { Editor } from './ace-types';\n\nconst ACE_THEME = 'ace-queryinput';\n\nexport type BaseProps = {\n  className?: string\n  error?: QueryValidationState,\n  height?: number,\n  maxLines?: number,\n  onLoad?: (editor: Editor) => void,\n  placeholder?: string,\n  value: string,\n  warning?: QueryValidationState,\n  wrapEnabled?: boolean,\n  inputId?: string,\n};\n\ntype EnabledInputProps = BaseProps & {\n  disabled: false,\n  enableAutocompletion?: boolean,\n  onBlur?: (query: string) => void,\n  onChange: (query: string) => Promise,\n  onExecute: (editor: Editor) => void,\n};\ntype DisabledInputProps = BaseProps & { disabled: true };\ntype Props = EnabledInputProps | DisabledInputProps\n\nconst isEnabledInput = (props: Props): props is EnabledInputProps => !props.disabled;\nconst isDisabledInput = (props: Props): props is DisabledInputProps => props.disabled;\n\nconst getMarkers = (errors: QueryValidationState | undefined, warnings: QueryValidationState | undefined) => {\n  const markerClassName = 'ace_marker';\n  const createMarkers = (explanations: QueryValidationState['explanations'] = [], className: string = ''): IMarker[] => explanations.map(({\n    beginLine,\n    beginColumn,\n    endLine,\n    endColumn,\n  }) => ({\n    startRow: beginLine,\n    startCol: beginColumn,\n    endRow: endLine,\n    endCol: endColumn,\n    type: 'text',\n    className,\n  }));\n\n  return [\n    ...createMarkers(errors?.explanations, `${markerClassName} ace_validation_error`),\n    ...createMarkers(warnings?.explanations, `${markerClassName} ace_validation_warning`),\n  ];\n};\n\n// Basic query input component which is being implemented by the `QueryInput` component.\n// This is just a very basic query input which can be implemented for example to display a read only query.\nconst BasicQueryInput = forwardRef((props, ref) => {\n  const {\n    className,\n    disabled,\n    error,\n    height,\n    maxLines,\n    placeholder,\n    value,\n    warning,\n    wrapEnabled,\n    onLoad,\n    inputId,\n  } = props;\n  const theme = useTheme();\n  const markers = useMemo(() => getMarkers(error, warning), [error, warning]);\n  const _onLoad = useCallback((editor) => {\n    if (editor) {\n      editor.renderer.setScrollMargin(7, 6);\n      editor.renderer.setPadding(12);\n\n      if (inputId) {\n        editor.textInput.getElement().setAttribute('id', inputId);\n      }\n\n      onLoad?.(editor);\n    }\n  }, [inputId, onLoad]);\n  const editorProps = useMemo(() => ({ $blockScrolling: Infinity, selectionStyle: 'line' }), []);\n  const setOptions = useMemo(() => ({ indentedSoftWrap: false }), []);\n\n  const commonProps = {\n    $height: height,\n    $scTheme: theme,\n    theme: ACE_THEME,\n    className: `${className} ${ACE_THEME}`,\n    disabled,\n    editorProps,\n    fontSize: theme.fonts.size.small,\n    highlightActiveLine: false,\n    markers,\n    maxLines,\n    minLines: 1,\n    mode: 'lucene',\n    name: 'QueryEditor',\n    placeholder,\n    readOnly: disabled,\n    ref,\n    setOptions,\n    showGutter: false,\n    showPrintMargin: false,\n    value,\n    wrapEnabled,\n    onLoad: _onLoad,\n  };\n\n  if (isDisabledInput(props)) {\n    return ;\n  }\n\n  if (isEnabledInput(props)) {\n    const {\n      onBlur,\n      onChange,\n      enableAutocompletion,\n    } = props;\n\n    return (\n      \n    );\n  }\n\n  return null;\n});\n\nBasicQueryInput.propTypes = {\n  className: PropTypes.string,\n  // @ts-ignore\n  disabled: PropTypes.bool,\n  enableAutocompletion: PropTypes.bool,\n  error: PropTypes.any,\n  height: PropTypes.number,\n  inputId: PropTypes.string,\n  maxLines: PropTypes.number,\n  onBlur: PropTypes.func,\n  onChange: PropTypes.func,\n  onLoad: PropTypes.func,\n  placeholder: PropTypes.string,\n  value: PropTypes.string,\n  warning: PropTypes.any,\n  wrapEnabled: PropTypes.bool,\n};\n\nBasicQueryInput.defaultProps = {\n  className: '',\n  disabled: false,\n  enableAutocompletion: false,\n  error: undefined,\n  height: undefined,\n  inputId: undefined,\n  maxLines: 4,\n  onBlur: undefined,\n  onChange: undefined,\n  onLoad: undefined,\n  placeholder: '',\n  value: '',\n  warning: undefined,\n  wrapEnabled: true,\n};\n\nexport default React.memo(BasicQueryInput);\n","/*\n * Copyright (C) 2020 Graylog, Inc.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the Server Side Public License, version 1,\n * as published by MongoDB, Inc.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * Server Side Public License for more details.\n *\n * You should have received a copy of the Server Side Public License\n * along with this program. If not, see\n * .\n */\n// eslint-disable-next-line no-undef\nace.define('ace/theme/ace-queryinput', ['require', 'exports', 'module', 'ace/lib/dom'], (acequire, exports) => {\n  /* eslint-disable no-param-reassign */\n  exports.isDark = false;\n\n  exports.cssClass = 'ace-queryinput';\n  /* eslint-enable no-param-reassign */\n\n  const dom = acequire('../lib/dom');\n\n  dom.importCssString(exports.cssText, exports.cssClass);\n});\n","/*\n * Copyright (C) 2020 Graylog, Inc.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the Server Side Public License, version 1,\n * as published by MongoDB, Inc.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * Server Side Public License for more details.\n *\n * You should have received a copy of the Server Side Public License\n * along with this program. If not, see\n * .\n */\n// eslint-disable-next-line no-undef\nace.define('ace/mode/lucene_highlight_rules', ['require', 'exports', 'module', 'ace/lib/oop', 'ace/mode/text_highlight_rules'], (require, exports) => {\n  const oop = require('../lib/oop');\n  const { TextHighlightRules } = require('./text_highlight_rules');\n\n  // eslint-disable-next-line func-names\n  const LuceneHighlightRules = function () {\n    this.$rules = {\n      start: [\n        {\n          token: 'constant.language.escape',\n          regex: /\\\\[-+&|!(){}[\\]^\"~*?:\\\\]/,\n        }, {\n          token: 'constant.character.negation',\n          regex: '\\\\-',\n        }, {\n          token: 'constant.character.interro',\n          regex: '\\\\?',\n        }, {\n          token: 'constant.character.required',\n          regex: '\\\\+',\n        }, {\n          token: 'constant.character.asterisk',\n          regex: '\\\\*',\n        }, {\n          token: 'constant.character.proximity',\n          regex: '~(?:0\\\\.[0-9]+|[0-9]+)?',\n        }, {\n          token: 'keyword.operator',\n          regex: '(AND|OR|NOT|TO)\\\\b',\n        }, {\n          token: (value) => [{\n            type: 'paren.lparen',\n            value: value,\n          }],\n          regex: '[\\\\(\\\\{\\\\[]',\n        }, {\n          token: (value) => [{\n            type: 'paren.rparen',\n            value: value,\n          }],\n          regex: '[\\\\)\\\\}\\\\]]',\n        }, {\n          token: 'keyword.operator',\n          regex: /[><=^]/,\n        }, {\n          token: 'constant.numeric',\n          regex: /\\d[\\d.-]*/,\n        }, {\n          token: 'string',\n          regex: /\"(?:\\\\\"|[^\"])*\"/,\n        }, {\n          token: 'keyword',\n          regex: /(?:\\\\.|[^\\s\\-+&|!(){}[\\]^\"~*?:\\\\])+:/,\n          next: 'maybeRegex',\n        }, {\n          token: 'term',\n          regex: /[\\w\\\\/]+/,\n        }, {\n          token: 'text',\n          regex: /\\s+/,\n        },\n      ],\n      maybeRegex: [{\n        token: 'text',\n        regex: /\\s+/,\n      }, {\n        token: 'string.regexp.start',\n        regex: '/',\n        next: 'regex',\n      }, {\n        regex: '',\n        next: 'start',\n      }],\n      regex: [\n        {\n          token: 'regexp.keyword.operator',\n          regex: '\\\\\\\\(?:u[\\\\da-fA-F]{4}|x[\\\\da-fA-F]{2}|.)',\n        }, {\n          token: 'string.regexp.end',\n          regex: '/[sxngimy]*',\n          next: 'start',\n        }, {\n          token: 'invalid',\n          regex: /\\{\\d+\\b,?\\d*\\}[+*]|[+*$^?][+*]|[$^][?]|\\?{3,}/,\n        }, {\n          token: 'constant.language.escape',\n          regex: /\\(\\?[:=!]|\\)|\\{\\d+\\b,?\\d*\\}|[+*]\\?|[()$^+*?.]/,\n        }, {\n          token: 'constant.language.escape',\n          // eslint-disable-next-line no-useless-escape\n          regex: '<\\d+-\\d+>|[~&@]',\n        }, {\n          token: 'constant.language.delimiter',\n          regex: /\\|/,\n        }, {\n          token: 'constant.language.escape',\n          regex: /\\[\\^?/,\n          next: 'regex_character_class',\n        }, {\n          token: 'empty',\n          regex: '$',\n          next: 'start',\n        }, {\n          defaultToken: 'string.regexp',\n        },\n      ],\n      regex_character_class: [\n        {\n          token: 'regexp.charclass.keyword.operator',\n          regex: '\\\\\\\\(?:u[\\\\da-fA-F]{4}|x[\\\\da-fA-F]{2}|.)',\n        }, {\n          token: 'constant.language.escape',\n          regex: ']',\n          next: 'regex',\n        }, {\n          token: 'constant.language.escape',\n          regex: '-',\n        }, {\n          token: 'empty',\n          regex: '$',\n          next: 'start',\n        }, {\n          defaultToken: 'string.regexp.charachterclass',\n        },\n      ],\n    };\n  };\n\n  oop.inherits(LuceneHighlightRules, TextHighlightRules);\n\n  // eslint-disable-next-line no-param-reassign\n  exports.LuceneHighlightRules = LuceneHighlightRules;\n});\n\n// eslint-disable-next-line no-undef\nace.define('ace/mode/lucene', ['require', 'exports', 'module', 'ace/lib/oop', 'ace/mode/text', 'ace/mode/lucene_highlight_rules'], (require, exports) => {\n  const oop = require('../lib/oop');\n  const TextMode = require('./text').Mode;\n  const { LuceneHighlightRules } = require('./lucene_highlight_rules');\n\n  // eslint-disable-next-line func-names\n  const Mode = function () {\n    this.HighlightRules = LuceneHighlightRules;\n    this.$behaviour = this.$defaultBehaviour;\n  };\n\n  oop.inherits(Mode, TextMode);\n\n  // eslint-disable-next-line func-names\n  (function () {\n    this.$id = 'ace/mode/lucene';\n  }).call(Mode.prototype);\n\n  // eslint-disable-next-line no-param-reassign\n  exports.Mode = Mode;\n});\n\n// eslint-disable-next-line func-names\n(function () {\n  // eslint-disable-next-line no-undef\n  ace.require(['ace/mode/lucene'], (m) => {\n    if (typeof module === 'object' && typeof exports === 'object' && module) {\n      module.exports = m;\n    }\n  });\n}());\n"],"names":["$scTheme","$height","disabled","ACE_THEME","isEnabledInput","props","isDisabledInput","getMarkers","errors","warnings","markerClassName","createMarkers","explanations","className","beginLine","beginColumn","endLine","endColumn","BasicQueryInput","ref","error","height","maxLines","placeholder","value","warning","wrapEnabled","onLoad","inputId","theme","markers","_onLoad","editor","editorProps","setOptions","commonProps","onBlur","onChange","enableAutocompletion","acequire","exports","require","oop","TextHighlightRules","LuceneHighlightRules","TextMode","Mode","m","module"],"sourceRoot":""}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy