{"version":3,"sources":["jsdelivr-header.js","/npm/codemirror@5.65.3/addon/lint/javascript-lint.js"],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA,CCDA,SAAU,GACc,iBAAX,SAAwC,iBAAV,OACvC,EAAI,QAAQ,yBACY,mBAAV,QAAwB,OAAO,IAC7C,OAAO,CAAC,wBAAyB,GAEjC,EAAI,WACP,CAPD,EAOG,SAAS,GACV,aAkBA,EAAW,eAAe,OAAQ,cAflC,SAAmB,EAAM,GACvB,IAAK,OAAO,OAIV,OAHI,OAAO,SACT,OAAO,QAAQ,MAAM,+EAEhB,GAEJ,EAAQ,SACX,EAAQ,OAAS,GACnB,OAAO,EAAM,EAAS,EAAQ,SAC9B,IAAI,EAAS,OAAO,OAAO,OAAQ,EAAS,GAE5C,OADI,GAMN,SAAqB,EAAQ,GAC3B,IAAM,IAAI,EAAI,EAAG,EAAI,EAAO,OAAQ,IAAK,CACvC,IAAI,EAAQ,EAAO,GACnB,GAAI,EAAO,CACT,GAAI,EAAM,MAAQ,EAAG,CACf,OAAO,SACT,OAAO,QAAQ,KAAK,6CAA+C,EAAM,KAAO,IAAK,GAEvF,QACF,CAEA,IAAI,EAAQ,EAAM,UAAY,EAAG,EAAM,EAAQ,EAC/C,GAAI,EAAM,SAAU,CAClB,IAAI,EAAQ,EAAM,SAAS,UAAU,GAAO,OAAO,OAC/C,GAAS,IACX,GAAO,EAEX,CAGA,IAAI,EAAO,CACT,QAAS,EAAM,OACf,SAAU,EAAM,MAAQ,EAAM,KAAK,WAAW,KAAO,UAAuB,QAC5E,KAAM,EAAW,IAAI,EAAM,KAAO,EAAG,GACrC,GAAI,EAAW,IAAI,EAAM,KAAO,EAAG,IAGrC,EAAO,KAAK,EACd,CACF,CACF,CApCc,CAAY,EAAQ,GACzB,CACT,GAmCF","file":"/npm/codemirror@5.65.3/addon/lint/javascript-lint.js","sourceRoot":"","sourcesContent":["/**\n * Minified by jsDelivr using Terser v5.39.0.\n * Original file: /npm/codemirror@5.65.3/addon/lint/javascript-lint.js\n *\n * Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files\n */\n","// CodeMirror, copyright (c) by Marijn Haverbeke and others\n// Distributed under an MIT license: https://codemirror.net/LICENSE\n\n// Depends on jshint.js from https://github.com/jshint/jshint\n\n(function(mod) {\n  if (typeof exports == \"object\" && typeof module == \"object\") // CommonJS\n    mod(require(\"../../lib/codemirror\"));\n  else if (typeof define == \"function\" && define.amd) // AMD\n    define([\"../../lib/codemirror\"], mod);\n  else // Plain browser env\n    mod(CodeMirror);\n})(function(CodeMirror) {\n  \"use strict\";\n  // declare global: JSHINT\n\n  function validator(text, options) {\n    if (!window.JSHINT) {\n      if (window.console) {\n        window.console.error(\"Error: window.JSHINT not defined, CodeMirror JavaScript linting cannot run.\");\n      }\n      return [];\n    }\n    if (!options.indent) // JSHint error.character actually is a column index, this fixes underlining on lines using tabs for indentation\n      options.indent = 1; // JSHint default value is 4\n    JSHINT(text, options, options.globals);\n    var errors = JSHINT.data().errors, result = [];\n    if (errors) parseErrors(errors, result);\n    return result;\n  }\n\n  CodeMirror.registerHelper(\"lint\", \"javascript\", validator);\n\n  function parseErrors(errors, output) {\n    for ( var i = 0; i < errors.length; i++) {\n      var error = errors[i];\n      if (error) {\n        if (error.line <= 0) {\n          if (window.console) {\n            window.console.warn(\"Cannot display JSHint error (invalid line \" + error.line + \")\", error);\n          }\n          continue;\n        }\n\n        var start = error.character - 1, end = start + 1;\n        if (error.evidence) {\n          var index = error.evidence.substring(start).search(/.\\b/);\n          if (index > -1) {\n            end += index;\n          }\n        }\n\n        // Convert to format expected by validation service\n        var hint = {\n          message: error.reason,\n          severity: error.code ? (error.code.startsWith('W') ? \"warning\" : \"error\") : \"error\",\n          from: CodeMirror.Pos(error.line - 1, start),\n          to: CodeMirror.Pos(error.line - 1, end)\n        };\n\n        output.push(hint);\n      }\n    }\n  }\n});\n"]}