/*
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 index_exports = {};
__export(index_exports, {
  "abort-controller": () => abort_controller,
  array: () => array,
  async: () => async,
  "async-events": () => async_events,
  blob: () => blob,
  codemirror: () => codemirror,
  "css-class": () => css_class,
  debug: () => debug,
  "debug-controller": () => debug_controller,
  enum: () => enum2,
  error: () => error,
  function: () => function2,
  "html-element": () => html_element,
  library: () => library,
  "object-utils": () => object_utils,
  obsidian: () => obsidian,
  path: () => path,
  "reg-exp": () => reg_exp,
  "strict-proxy": () => strict_proxy,
  string: () => string,
  transformers: () => transformers,
  "two-way-map": () => two_way_map,
  type: () => type,
  "type-guards": () => type_guards,
  url: () => url,
  "value-provider": () => value_provider,
  "value-wrapper": () => value_wrapper
});
module.exports = __toCommonJS(index_exports);
var abort_controller = __toESM(__extractDefault(require('./abort-controller.cjs')), 1);
var array = __toESM(__extractDefault(require('./array.cjs')), 1);
var async_events = __toESM(__extractDefault(require('./async-events.cjs')), 1);
var async = __toESM(__extractDefault(require('./async.cjs')), 1);
var blob = __toESM(__extractDefault(require('./blob.cjs')), 1);
var codemirror = __toESM(__extractDefault(require('./codemirror/index.cjs')), 1);
var css_class = __toESM(__extractDefault(require('./css-class.cjs')), 1);
var debug_controller = __toESM(__extractDefault(require('./debug-controller.cjs')), 1);
var debug = __toESM(__extractDefault(require('./debug.cjs')), 1);
var enum2 = __toESM(__extractDefault(require('./enum.cjs')), 1);
var error = __toESM(__extractDefault(require('./error.cjs')), 1);
var function2 = __toESM(__extractDefault(require('./function.cjs')), 1);
var html_element = __toESM(__extractDefault(require('./html-element.cjs')), 1);
var library = __toESM(__extractDefault(require('./library.cjs')), 1);
var object_utils = __toESM(__extractDefault(require('./object-utils.cjs')), 1);
var obsidian = __toESM(__extractDefault(require('./obsidian/index.cjs')), 1);
var path = __toESM(__extractDefault(require('./path.cjs')), 1);
var reg_exp = __toESM(__extractDefault(require('./reg-exp.cjs')), 1);
var strict_proxy = __toESM(__extractDefault(require('./strict-proxy.cjs')), 1);
var string = __toESM(__extractDefault(require('./string.cjs')), 1);
var transformers = __toESM(__extractDefault(require('./transformers/index.cjs')), 1);
var two_way_map = __toESM(__extractDefault(require('./two-way-map.cjs')), 1);
var type_guards = __toESM(__extractDefault(require('./type-guards.cjs')), 1);
var type = __toESM(__extractDefault(require('./type.cjs')), 1);
var url = __toESM(__extractDefault(require('./url.cjs')), 1);
var value_provider = __toESM(__extractDefault(require('./value-provider.cjs')), 1);
var value_wrapper = __toESM(__extractDefault(require('./value-wrapper.cjs')), 1);
// Annotate the CommonJS export names for ESM import in node:
0 && (module.exports = {
  "abort-controller": null,
  array,
  async,
  "async-events": null,
  blob,
  codemirror,
  "css-class": null,
  debug,
  "debug-controller": null,
  enum: null,
  error,
  function: null,
  "html-element": null,
  library,
  "object-utils": null,
  obsidian,
  path,
  "reg-exp": null,
  "strict-proxy": null,
  string,
  transformers,
  "two-way-map": null,
  type,
  "type-guards": null,
  url,
  "value-provider": null,
  "value-wrapper": null
});
//# sourceMappingURL=data:application/json;base64,ewogICJ2ZXJzaW9uIjogMywKICAic291cmNlcyI6IFsiLi4vLi4vLi4vc3JjL2luZGV4LnRzIl0sCiAgInNvdXJjZXNDb250ZW50IjogWyIvKiBUSElTIElTIEEgR0VORVJBVEVEL0JVTkRMRUQgRklMRSBCWSBCVUlMRCBTQ1JJUFQgKi9cblxuZXhwb3J0ICogYXMgJ2Fib3J0LWNvbnRyb2xsZXInIGZyb20gJy4vYWJvcnQtY29udHJvbGxlci50cyc7XG5leHBvcnQgKiBhcyAnYXJyYXknIGZyb20gJy4vYXJyYXkudHMnO1xuZXhwb3J0ICogYXMgJ2FzeW5jLWV2ZW50cycgZnJvbSAnLi9hc3luYy1ldmVudHMudHMnO1xuZXhwb3J0ICogYXMgJ2FzeW5jJyBmcm9tICcuL2FzeW5jLnRzJztcbmV4cG9ydCAqIGFzICdibG9iJyBmcm9tICcuL2Jsb2IudHMnO1xuZXhwb3J0ICogYXMgJ2NvZGVtaXJyb3InIGZyb20gJy4vY29kZW1pcnJvci9pbmRleC50cyc7XG5leHBvcnQgKiBhcyAnY3NzLWNsYXNzJyBmcm9tICcuL2Nzcy1jbGFzcy50cyc7XG5leHBvcnQgKiBhcyAnZGVidWctY29udHJvbGxlcicgZnJvbSAnLi9kZWJ1Zy1jb250cm9sbGVyLnRzJztcbmV4cG9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