/* * docsify-autoHeaders.js v4.1.0 * (https://markbattistella.github.io/docsify-autoHeaders/) * Copyright (c) 2021 Mark Battistella (@markbattistella) * Licensed under MIT */ "use strict";function _typeof(e){return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var autoHeaderOptions={separator:"",custom:"",levels:"",scope:"",debug:!1};function getAutoHeadersOptions(e){if(!e.separator||!e.levels||!e.scope)return console.error("ERROR: config settings not set");var t="other"==e.separator?e.custom||"_":"";switch(e.separator){case"decimal":t=".";break;case"dash":t="-";break;case"bracket":t=")";break;case"other":break;default:return}return[t,e.levels||6,e.scope||"main",!0===e.debug]}function autoHeaders(e,t){var u,r,f,o,p,d,y;void 0!==getAutoHeadersOptions(autoHeaderOptions)&&(u=null,r=getAutoHeadersOptions(autoHeaderOptions),f=r[0],o=r[1],p=r[2],d=r[3],y=function(e){var t="";if("string"==typeof o)t="H1-".concat(e);else if("object"===_typeof(o)&&null!==o){if(e.start>e.finish)return console.log("ERROR: heading start level cannot be greater than finish level");if(e.start<1||6