/*
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 __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
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 __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
var markdown_code_block_processor_registrar_exports = {};
__export(markdown_code_block_processor_registrar_exports, {
  PluginMarkdownCodeBlockProcessorRegistrar: () => PluginMarkdownCodeBlockProcessorRegistrar
});
module.exports = __toCommonJS(markdown_code_block_processor_registrar_exports);
class PluginMarkdownCodeBlockProcessorRegistrar {
  plugin;
  /**
   * Creates a new markdown code block processor registrar.
   *
   * @param plugin - The plugin to register the markdown code block processor with.
   */
  constructor(plugin) {
    this.plugin = plugin;
  }
  /**
   * Registers a markdown code block processor.
   *
   * @param language - The language of the code block.
   * @param handler - The handler for the code block.
   * @param sortOrder - The sort order of the code block.
   * @returns The markdown post processor.
   */
  registerMarkdownCodeBlockProcessor(language, handler, sortOrder) {
    return this.plugin.registerMarkdownCodeBlockProcessor(language, handler, sortOrder);
  }
}
// Annotate the CommonJS export names for ESM import in node:
0 && (module.exports = {
  PluginMarkdownCodeBlockProcessorRegistrar
});
//# sourceMappingURL=data:application/json;base64,ewogICJ2ZXJzaW9uIjogMywKICAic291cmNlcyI6IFsiLi4vLi4vLi4vLi4vc3JjL29ic2lkaWFuL21hcmtkb3duLWNvZGUtYmxvY2stcHJvY2Vzc29yLXJlZ2lzdHJhci50cyJdLAogICJzb3VyY2VzQ29udGVudCI6IFsiLyoqXG4gKiBAZmlsZVxuICpcbiAqIFJlZ2lzdGVycyBhIG1hcmtkb3duIGNvZGUgYmxvY2sgcHJvY2Vzc29yLlxuICovXG5cbmltcG9ydCB0eXBlIHtcbiAgTWFya2Rvd25Qb3N0UHJvY2Vzc29yLFxuICBNYXJrZG93blBvc3RQcm9jZXNzb3JDb250ZXh0LFxuICBQbHVnaW5cbn0gZnJvbSAnb2JzaWRpYW4nO1xuXG5pbXBvcnQgdHlwZSB7IE1heWJlUmV0dXJuIH0gZnJvbSAnLi4vdHlwZS50cyc7XG5cbi8qKlxuICogQSByZWdpc3RyYXIgZm9yIG1hcmtkb3duIGNvZGUgYmxvY2sgcHJvY2Vzc29ycy5cbiAqL1xuZXhwb3J0IGludGVyZmFjZSBNYXJrZG93bkNvZGVCbG9ja1Byb2Nlc3NvclJlZ2lzdHJhciB7XG4gIC8qKlxuICAgKiBSZWdpc3RlcnMgYSBtYXJrZG93biBjb2RlIGJsb2NrIHByb2Nlc3Nvci5cbiAgICpcbiAgICogQHBhcmFtIGxhbmd1YWdlIC0gVGhlIGxhbmd1YWdlIG9mIHRoZSBjb2RlIGJsb2NrLlxuICAgKiBAcGFyYW0gaGFuZGxlciAtIFRoZSBoYW5kbGVyIGZvciB0aGUgY29kZSBibG9jay5cbiAgICogQHBhcmFtIHNvcnRPcmRlciAtIFRoZSBzb3J0IG9yZGVyIG9mIHRoZSBjb2RlIGJsb2NrLlxuICAgKiBAcmV0dXJucyBUaGUgbWFya2Rvd24gcG9zdC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