/**
 * Minified by jsDelivr using Terser v5.39.0.
 * Original file: /npm/hexo-admin@2.3.0/index.js
 *
 * Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files
 */
var serveStatic=require("serve-static"),bodyParser=require("body-parser"),path=require("path"),api=require("./api"),passwordProtected=hexo.config.admin&&hexo.config.admin.username;if(passwordProtected){if(hexo.config.admin.password_hash){if(hexo.config.admin.password_hash.length<=32)throw new Error("[Hexo Admin]: the provided password_hash looks like an md5 hash -- hexo-admin has switched to use bcrypt; see the Readme for more info.")}else console.error("[Hexo Admin]: config admin.password_hash is requred for authentication"),passwordProtected=!1;hexo.config.admin.secret||(console.error("[Hexo Admin]: config admin.secret is requred for authentication"),passwordProtected=!1)}hexo.extend.filter.register("server_middleware",(function(e){passwordProtected&&require("./auth")(e,hexo),e.use(hexo.config.root+"admin/",serveStatic(path.join(__dirname,"www"))),e.use(hexo.config.root+"admin/api/",bodyParser.json({limit:"50mb"})),api(e,hexo)}));
//# sourceMappingURL=/sm/6cc0bd49ef36bff67a6ee87cde95abd79215c5a454c973f757e67d4cc0b9f47a.map