/*
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 obsidian_exports = {};
__export(obsidian_exports, {
  "active-file-provider": () => active_file_provider,
  app: () => app,
  "async-with-notice": () => async_with_notice,
  "attachment-path": () => attachment_path,
  backlink: () => backlink,
  callout: () => callout,
  "code-block-markdown-information": () => code_block_markdown_information,
  "command-handlers": () => command_handlers,
  "command-registrar": () => command_registrar,
  components: () => components,
  constructors: () => constructors,
  "data-handler": () => data_handler,
  dataview: () => dataview,
  "dataview-link": () => dataview_link,
  editor: () => editor,
  "file-change": () => file_change,
  "file-manager": () => file_manager,
  "file-system": () => file_system,
  frontmatter: () => frontmatter,
  "frontmatter-link-cache-with-offsets": () => frontmatter_link_cache_with_offsets,
  i18n: () => i18n,
  "is-in-obsidian": () => is_in_obsidian,
  link: () => link,
  logger: () => logger,
  loop: () => loop,
  markdown: () => markdown,
  "markdown-code-block-processor": () => markdown_code_block_processor,
  "markdown-code-block-processor-registrar": () => markdown_code_block_processor_registrar,
  "markdown-view": () => markdown_view,
  "menu-event-registrar": () => menu_event_registrar,
  "metadata-cache": () => metadata_cache,
  modals: () => modals,
  "obsidian-protocol-handler-registrar": () => obsidian_protocol_handler_registrar,
  "obsidian-settings": () => obsidian_settings,
  "path-settings": () => path_settings,
  pdf: () => pdf,
  plugin: () => plugin,
  queue: () => queue,
  react: () => react,
  reference: () => reference,
  "resource-url": () => resource_url,
  "setting-components": () => setting_components,
  "setting-ex": () => setting_ex,
  "setting-group-ex": () => setting_group_ex,
  validation: () => validation,
  vault: () => vault,
  "vault-delete": () => vault_delete,
  workspace: () => workspace
});
module.exports = __toCommonJS(obsidian_exports);
var active_file_provider = __toESM(__extractDefault(require('./active-file-provider.cjs')), 1);
var app = __toESM(__extractDefault(require('./app.cjs')), 1);
var async_with_notice = __toESM(__extractDefault(require('./async-with-notice.cjs')), 1);
var attachment_path = __toESM(__extractDefault(require('./attachment-path.cjs')), 1);
var backlink = __toESM(__extractDefault(require('./backlink.cjs')), 1);
var callout = __toESM(__extractDefault(require('./callout.cjs')), 1);
var code_block_markdown_information = __toESM(__extractDefault(require('./code-block-markdown-information.cjs')), 1);
var command_handlers = __toESM(__extractDefault(require('./command-handlers/index.cjs')), 1);
var command_registrar = __toESM(__extractDefault(require('./command-registrar.cjs')), 1);
var components = __toESM(__extractDefault(require('./components/index.cjs')), 1);
var constructors = __toESM(__extractDefault(require('./constructors/index.cjs')), 1);
var data_handler = __toESM(__extractDefault(require('./data-handler.cjs')), 1);
var dataview_link = __toESM(__extractDefault(require('./dataview-link.cjs')), 1);
var dataview = __toESM(__extractDefault(require('./dataview.cjs')), 1);
var editor = __toESM(__extractDefault(require('./editor.cjs')), 1);
var file_change = __toESM(__extractDefault(require('./file-change.cjs')), 1);
var file_manager = __toESM(__extractDefault(require('./file-manager.cjs')), 1);
var file_system = __toESM(__extractDefault(require('./file-system.cjs')), 1);
var frontmatter_link_cache_with_offsets = __toESM(__extractDefault(require('./frontmatter-link-cache-with-offsets.cjs')), 1);
var frontmatter = __toESM(__extractDefault(require('./frontmatter.cjs')), 1);
var i18n = __toESM(__extractDefault(require('./i18n/index.cjs')), 1);
var is_in_obsidian = __toESM(__extractDefault(require('./is-in-obsidian.cjs')), 1);
var link = __toESM(__extractDefault(require('./link.cjs')), 1);
var logger = __toESM(__extractDefault(require('./logger.cjs')), 1);
var loop = __toESM(__extractDefault(require('./loop.cjs')), 1);
var markdown_code_block_processor_registrar = __toESM(__extractDefault(require('./markdown-code-block-processor-registrar.cjs')), 1);
var markdown_code_block_processor = __toESM(__extractDefault(require('./markdown-code-block-processor.cjs')), 1);
var markdown_view = __toESM(__extractDefault(require('./markdown-view.cjs')), 1);
var markdown = __toESM(__extractDefault(require('./markdown.cjs')), 1);
var menu_event_registrar = __toESM(__extractDefault(require('./menu-event-registrar.cjs')), 1);
var metadata_cache = __toESM(__extractDefault(require('./metadata-cache.cjs')), 1);
var modals = __toESM(__extractDefault(require('./modals/index.cjs')), 1);
var obsidian_protocol_handler_registrar = __toESM(__extractDefault(require('./obsidian-protocol-handler-registrar.cjs')), 1);
var obsidian_settings = __toESM(__extractDefault(require('./obsidian-settings.cjs')), 1);
var path_settings = __toESM(__extractDefault(require('./path-settings.cjs')), 1);
var pdf = __toESM(__extractDefault(require('./pdf.cjs')), 1);
var plugin = __toESM(__extractDefault(require('./plugin/index.cjs')), 1);
var queue = __toESM(__extractDefault(require('./queue.cjs')), 1);
var react = __toESM(__extractDefault(require('./react/index.cjs')), 1);
var reference = __toESM(__extractDefault(require('./reference.cjs')), 1);
var resource_url = __toESM(__extractDefault(require('./resource-url.cjs')), 1);
var setting_components = __toESM(__extractDefault(require('./setting-components/index.cjs')), 1);
var setting_ex = __toESM(__extractDefault(require('./setting-ex.cjs')), 1);
var setting_group_ex = __toESM(__extractDefault(require('./setting-group-ex.cjs')), 1);
var validation = __toESM(__extractDefault(require('./validation.cjs')), 1);
var vault_delete = __toESM(__extractDefault(require('./vault-delete.cjs')), 1);
var vault = __toESM(__extractDefault(require('./vault.cjs')), 1);
var workspace = __toESM(__extractDefault(require('./workspace.cjs')), 1);
// Annotate the CommonJS export names for ESM import in node:
0 && (module.exports = {
  "active-file-provider": null,
  app,
  "async-with-notice": null,
  "attachment-path": null,
  backlink,
  callout,
  "code-block-markdown-information": null,
  "command-handlers": null,
  "command-registrar": null,
  components,
  constructors,
  "data-handler": null,
  dataview,
  "dataview-link": null,
  editor,
  "file-change": null,
  "file-manager": null,
  "file-system": null,
  frontmatter,
  "frontmatter-link-cache-with-offsets": null,
  i18n,
  "is-in-obsidian": null,
  link,
  logger,
  loop,
  markdown,
  "markdown-code-block-processor": null,
  "markdown-code-block-processor-registrar": null,
  "markdown-view": null,
  "menu-event-registrar": null,
  "metadata-cache": null,
  modals,
  "obsidian-protocol-handler-registrar": null,
  "obsidian-settings": null,
  "path-settings": null,
  pdf,
  plugin,
  queue,
  react,
  reference,
  "resource-url": null,
  "setting-components": null,
  "setting-ex": null,
  "setting-group-ex": null,
  validation,
  vault,
  "vault-delete": null,
  workspace
});
//# sourceMappingURL=data:application/json;base64, 
