{"version":3,"sources":["jsdelivr-header.js","/npm/codemirror@5.65.21/addon/fold/indent-fold.js"],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA,CCHA,SAAU,GACc,iBAAX,SAAwC,iBAAV,OACvC,EAAI,QAAQ,yBACY,mBAAV,QAAwB,OAAO,IAC7C,OAAO,CAAC,wBAAyB,GAEjC,EAAI,WACP,CAPD,EAOG,SAAS,GACZ,aAEA,SAAS,EAAW,EAAI,GACtB,IAAI,EAAO,EAAG,QAAQ,GAClB,EAAU,EAAK,OAAO,MAC1B,OAAgB,GAAZ,GAAiB,cAAc,KAAK,EAAG,eAAe,EAAW,IAAI,EAAQ,EAAU,MACjF,EACH,EAAW,YAAY,EAAM,KAAM,EAAG,UAAU,WACzD,CAEA,EAAW,eAAe,OAAQ,UAAU,SAAS,EAAI,GACvD,IAAI,EAAW,EAAW,EAAI,EAAM,MACpC,KAAI,EAAW,GAAf,CAKA,IAJA,IAAI,EAAiB,KAIZ,EAAI,EAAM,KAAO,EAAG,EAAM,EAAG,WAAY,GAAK,IAAO,EAAG,CAC/D,IAAI,EAAS,EAAW,EAAI,GAC5B,IAAe,GAAX,OACG,MAAI,EAAS,GAOlB,MALA,EAAiB,CAMnB,CACF,CACA,OAAI,EAAuB,CACzB,KAAM,EAAW,IAAI,EAAM,KAAM,EAAG,QAAQ,EAAM,MAAM,QACxD,GAAI,EAAW,IAAI,EAAgB,EAAG,QAAQ,GAAgB,cAFhE,CAlBkB,CAsBpB,GAEA","file":"/npm/codemirror@5.65.21/addon/fold/indent-fold.js","sourceRoot":"","sourcesContent":["/**\n * Minified by jsDelivr using Terser v5.39.0.\n * Original file: /npm/codemirror@5.65.21/addon/fold/indent-fold.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/5/LICENSE\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\nfunction lineIndent(cm, lineNo) {\n  var text = cm.getLine(lineNo)\n  var spaceTo = text.search(/\\S/)\n  if (spaceTo == -1 || /\\bcomment\\b/.test(cm.getTokenTypeAt(CodeMirror.Pos(lineNo, spaceTo + 1))))\n    return -1\n  return CodeMirror.countColumn(text, null, cm.getOption(\"tabSize\"))\n}\n\nCodeMirror.registerHelper(\"fold\", \"indent\", function(cm, start) {\n  var myIndent = lineIndent(cm, start.line)\n  if (myIndent < 0) return\n  var lastLineInFold = null\n\n  // Go through lines until we find a line that definitely doesn't belong in\n  // the block we're folding, or to the end.\n  for (var i = start.line + 1, end = cm.lastLine(); i <= end; ++i) {\n    var indent = lineIndent(cm, i)\n    if (indent == -1) {\n    } else if (indent > myIndent) {\n      // Lines with a greater indent are considered part of the block.\n      lastLineInFold = i;\n    } else {\n      // If this line has non-space, non-comment content, and is\n      // indented less or equal to the start line, it is the start of\n      // another block.\n      break;\n    }\n  }\n  if (lastLineInFold) return {\n    from: CodeMirror.Pos(start.line, cm.getLine(start.line).length),\n    to: CodeMirror.Pos(lastLineInFold, cm.getLine(lastLineInFold).length)\n  };\n});\n\n});\n"]}