/*
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 esbuild_impl_exports = {};
__export(esbuild_impl_exports, {
  "change-extension-plugin": () => change_extension_plugin,
  "copy-to-obsidian-plugins-folder-plugin": () => copy_to_obsidian_plugins_folder_plugin,
  "custom-esbuild-options-plugin": () => custom_esbuild_options_plugin,
  dependency: () => dependency,
  "fix-esm-plugin": () => fix_esm_plugin,
  "fix-source-maps-plugin": () => fix_source_maps_plugin,
  "obsidian-plugin-builder": () => obsidian_plugin_builder,
  "preprocess-plugin": () => preprocess_plugin,
  "rename-css-plugin": () => rename_css_plugin,
  "svelte-wrapper-plugin": () => svelte_wrapper_plugin
});
module.exports = __toCommonJS(esbuild_impl_exports);
var change_extension_plugin = __toESM(__extractDefault(require('./change-extension-plugin.cjs')), 1);
var copy_to_obsidian_plugins_folder_plugin = __toESM(__extractDefault(require('./copy-to-obsidian-plugins-folder-plugin.cjs')), 1);
var custom_esbuild_options_plugin = __toESM(__extractDefault(require('./custom-esbuild-options-plugin.cjs')), 1);
var dependency = __toESM(__extractDefault(require('./dependency.cjs')), 1);
var fix_esm_plugin = __toESM(__extractDefault(require('./fix-esm-plugin.cjs')), 1);
var fix_source_maps_plugin = __toESM(__extractDefault(require('./fix-source-maps-plugin.cjs')), 1);
var obsidian_plugin_builder = __toESM(__extractDefault(require('./obsidian-plugin-builder.cjs')), 1);
var preprocess_plugin = __toESM(__extractDefault(require('./preprocess-plugin.cjs')), 1);
var rename_css_plugin = __toESM(__extractDefault(require('./rename-css-plugin.cjs')), 1);
var svelte_wrapper_plugin = __toESM(__extractDefault(require('./svelte-wrapper-plugin.cjs')), 1);
// Annotate the CommonJS export names for ESM import in node:
0 && (module.exports = {
  "change-extension-plugin": null,
  "copy-to-obsidian-plugins-folder-plugin": null,
  "custom-esbuild-options-plugin": null,
  dependency,
  "fix-esm-plugin": null,
  "fix-source-maps-plugin": null,
  "obsidian-plugin-builder": null,
  "preprocess-plugin": null,
  "rename-css-plugin": null,
  "svelte-wrapper-plugin": null
});
//# sourceMappingURL=data:application/json;base64,ewogICJ2ZXJzaW9uIjogMywKICAic291cmNlcyI6IFsiLi4vLi4vLi4vLi4vLi4vLi4vc3JjL3NjcmlwdC11dGlscy9idW5kbGVycy9lc2J1aWxkLWltcGwvaW5kZXgudHMiXSwKICAic291cmNlc0NvbnRlbnQiOiBbIi8q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