/*
THIS IS A GENERATED/BUNDLED FILE BY ESBUILD
if you want to view the source, please visit the github repository of this plugin
*/

(function initCjs() {
  // eslint-disable-next-line obsidianmd/no-global-this -- Actively use globalThis.
  const globalThisRecord = globalThis;
  globalThisRecord['__name'] ??= name;
  const originalRequire = require;
  if (originalRequire && !originalRequire.__isPatched) {
    // eslint-disable-next-line no-global-assign, no-implicit-globals -- We need to patch the `require()` function.
    require = Object.assign(
      (id) => requirePatched(id),
      originalRequire,
      {
        __isPatched: true
      }
    );
  }

  const newFuncs = {
    __extractDefault() {
      return extractDefault;
    },
    process() {
      const browserProcess = {
        browser: true,
        cwd() {
          return '/';
        },
        env: {},
        platform: 'android'
      };
      return browserProcess;
    }
  };

  for (const key of Object.keys(newFuncs)) {
    globalThisRecord[key] ??= newFuncs[key]?.();
  }

  function name(obj) {
    return obj;
  }

  function extractDefault(module) {
    return module && module.__esModule && 'default' in module ? module.default : module;
  }

  const OBSIDIAN_BUILT_IN_MODULE_NAMES = [
  'obsidian',
  '@codemirror/autocomplete',
  '@codemirror/collab',
  '@codemirror/commands',
  '@codemirror/language',
  '@codemirror/lint',
  '@codemirror/search',
  '@codemirror/state',
  '@codemirror/text',
  '@codemirror/view',
  '@lezer/common',
  '@lezer/lr',
  '@lezer/highlight'];


  const DEPRECATED_OBSIDIAN_BUILT_IN_MODULE_NAMES = [
  '@codemirror/closebrackets',
  '@codemirror/comment',
  '@codemirror/fold',
  '@codemirror/gutter',
  '@codemirror/highlight',
  '@codemirror/history',
  '@codemirror/matchbrackets',
  '@codemirror/panel',
  '@codemirror/rangeset',
  '@codemirror/rectangular-selection',
  '@codemirror/stream-parser',
  '@codemirror/tooltip'];


  function requirePatched(id) {
    if (OBSIDIAN_BUILT_IN_MODULE_NAMES.includes(id) || DEPRECATED_OBSIDIAN_BUILT_IN_MODULE_NAMES.includes(id)) {
      return originalRequire?.(id);
    }

    // eslint-disable-next-line @typescript-eslint/no-deprecated, obsidianmd/no-global-this  -- Need access to app. Actively use globalThis.
    if (globalThis.app.isMobile) {
      if (id === 'process' || id === 'node:process') {
        // eslint-disable-next-line no-console -- Valid usage.
        console.debug(`The most likely you can safely ignore this error. Module not found: ${id}. Fake process object is returned instead.`);
        // eslint-disable-next-line obsidianmd/no-global-this -- Actively use globalThis.
        return globalThis.process;
      }
    } else {
      const module = originalRequire?.(id);
      if (module) {
        return extractDefault(module);
      }
    }

    // eslint-disable-next-line no-console -- Valid usage.
    console.debug(`The most likely you can safely ignore this error. Module not found: ${id}. Empty object is returned instead.`);
    return {};
  }
})();

"use strict";
var __create = Object.create;
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __getProtoOf = Object.getPrototypeOf;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __export = (target, all) => {
  for (var name in all)
    __defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
  if (from && typeof from === "object" || typeof from === "function") {
    for (let key of __getOwnPropNames(from))
      if (!__hasOwnProp.call(to, key) && key !== except)
        __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
  }
  return to;
};
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
  // If the importer is in node compatibility mode or this is not an ESM
  // file that has been converted to a CommonJS file using a Babel-
  // compatible transform (i.e. "__esModule" has not been set), then set
  // "default" to the CommonJS "module.exports" for node compatibility.
  isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
  mod
));
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
var script_utils_exports = {};
__export(script_utils_exports, {
  build: () => build,
  bundlers: () => bundlers,
  "check-project-types": () => check_project_types,
  "cli-utils": () => cli_utils,
  "code-generator": () => code_generator,
  "commitlint-config": () => commitlint_config,
  exec: () => exec,
  formatters: () => formatters,
  fs: () => fs,
  json: () => json,
  linters: () => linters,
  "nano-staged-config": () => nano_staged_config,
  npm: () => npm,
  "npm-publish": () => npm_publish,
  "npm-run": () => npm_run,
  "obsidian-dev-utils-repo-paths": () => obsidian_dev_utils_repo_paths,
  root: () => root,
  "test-runners": () => test_runners,
  "validate-declarations": () => validate_declarations,
  version: () => version
});
module.exports = __toCommonJS(script_utils_exports);
var build = __toESM(__extractDefault(require('./build.cjs')), 1);
var bundlers = __toESM(__extractDefault(require('./bundlers/index.cjs')), 1);
var check_project_types = __toESM(__extractDefault(require('./check-project-types.cjs')), 1);
var cli_utils = __toESM(__extractDefault(require('./cli-utils.cjs')), 1);
var code_generator = __toESM(__extractDefault(require('./code-generator.cjs')), 1);
var commitlint_config = __toESM(__extractDefault(require('./commitlint-config.cjs')), 1);
var exec = __toESM(__extractDefault(require('./exec.cjs')), 1);
var formatters = __toESM(__extractDefault(require('./formatters/index.cjs')), 1);
var fs = __toESM(__extractDefault(require('./fs.cjs')), 1);
var json = __toESM(__extractDefault(require('./json.cjs')), 1);
var linters = __toESM(__extractDefault(require('./linters/index.cjs')), 1);
var nano_staged_config = __toESM(__extractDefault(require('./nano-staged-config.cjs')), 1);
var npm_publish = __toESM(__extractDefault(require('./npm-publish.cjs')), 1);
var npm_run = __toESM(__extractDefault(require('./npm-run.cjs')), 1);
var npm = __toESM(__extractDefault(require('./npm.cjs')), 1);
var obsidian_dev_utils_repo_paths = __toESM(__extractDefault(require('./obsidian-dev-utils-repo-paths.cjs')), 1);
var root = __toESM(__extractDefault(require('./root.cjs')), 1);
var test_runners = __toESM(__extractDefault(require('./test-runners/index.cjs')), 1);
var validate_declarations = __toESM(__extractDefault(require('./validate-declarations.cjs')), 1);
var version = __toESM(__extractDefault(require('./version.cjs')), 1);
// Annotate the CommonJS export names for ESM import in node:
0 && (module.exports = {
  build,
  bundlers,
  "check-project-types": null,
  "cli-utils": null,
  "code-generator": null,
  "commitlint-config": null,
  exec,
  formatters,
  fs,
  json,
  linters,
  "nano-staged-config": null,
  npm,
  "npm-publish": null,
  "npm-run": null,
  "obsidian-dev-utils-repo-paths": null,
  root,
  "test-runners": null,
  "validate-declarations": null,
  version
});
//# sourceMappingURL=data:application/json;base64,ewogICJ2ZXJzaW9uIjogMywKICAic291cmNlcyI6IFsiLi4vLi4vLi4vLi4vc3JjL3NjcmlwdC11dGlscy9pbmRleC50cyJdLAogICJzb3VyY2VzQ29udGVudCI6IFsiLyogVEhJUyBJUyBBIEdFTkVSQVRFRC9CVU5ETEVEIEZJTEUgQlkgQlVJTEQgU0NSSVBUICovXG5cbmV4cG9ydCAqIGFzICdidWlsZCcgZnJvbSAnLi9idWlsZC50cyc7XG5leHBvcnQgKiBhcyAnYnVuZGxlcnMnIGZyb20gJy4vYnVuZGxlcnMvaW5kZXgudHMnO1xuZXhwb3J0ICogYXMgJ2NoZWNrLXByb2plY3QtdHlwZXMnIGZyb20gJy4vY2hlY2stcHJvamVjdC10eXBlcy50cyc7XG5leHBvcnQgKiBhcyAnY2xpLXV0aWxzJyBmcm9tICcuL2NsaS11dGlscy50cyc7XG5leHBvcnQgKiBhcyAnY29kZS1nZW5lcmF0b3InIGZyb20gJy4vY29kZS1nZW5lcmF0b3IudHMnO1xuZXhwb3J0ICogYXMgJ2NvbW1pdGxpbnQtY29uZmlnJyBmcm9tICcuL2NvbW1pdGxpbnQtY29uZmlnLnRzJztcbmV4cG9ydCAqIGFzICdleGVjJyBmcm9tICcuL2V4ZWMudHMnO1xuZXhwb3J0ICogYXMgJ2Zvcm1hdHRlcnMnIGZyb20gJy4vZm9ybWF0dGVycy9pbmRleC50cyc7XG5leHBvcnQgKiBhcyAnZnMnIGZyb20gJy4vZnMudHMnO1xuZXhwb3J0ICogYXMgJ2pzb24nIGZyb20gJy4vanNvbi50cyc7XG5leHBvcnQgKiBhcyAnbGludGVycycgZnJvbSAnLi9saW50ZXJzL2luZGV4LnRzJztcbmV4cG9ydCAqIGFzICduYW5vLXN0YWdlZC1jb25maWcnIGZyb20gJy4vbmFuby1z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