/*
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 transformers_exports = {};
__export(transformers_exports, {
  "date-transformer": () => date_transformer,
  "duration-transformer": () => duration_transformer,
  "group-transformer": () => group_transformer,
  "map-transformer": () => map_transformer,
  "set-transformer": () => set_transformer,
  "skip-private-property-transformer": () => skip_private_property_transformer,
  transformer: () => transformer,
  "two-way-map-transformer": () => two_way_map_transformer,
  "typed-transformer": () => typed_transformer
});
module.exports = __toCommonJS(transformers_exports);
var date_transformer = __toESM(__extractDefault(require('./date-transformer.cjs')), 1);
var duration_transformer = __toESM(__extractDefault(require('./duration-transformer.cjs')), 1);
var group_transformer = __toESM(__extractDefault(require('./group-transformer.cjs')), 1);
var map_transformer = __toESM(__extractDefault(require('./map-transformer.cjs')), 1);
var set_transformer = __toESM(__extractDefault(require('./set-transformer.cjs')), 1);
var skip_private_property_transformer = __toESM(__extractDefault(require('./skip-private-property-transformer.cjs')), 1);
var transformer = __toESM(__extractDefault(require('./transformer.cjs')), 1);
var two_way_map_transformer = __toESM(__extractDefault(require('./two-way-map-transformer.cjs')), 1);
var typed_transformer = __toESM(__extractDefault(require('./typed-transformer.cjs')), 1);
// Annotate the CommonJS export names for ESM import in node:
0 && (module.exports = {
  "date-transformer": null,
  "duration-transformer": null,
  "group-transformer": null,
  "map-transformer": null,
  "set-transformer": null,
  "skip-private-property-transformer": null,
  transformer,
  "two-way-map-transformer": null,
  "typed-transformer": null
});
//# sourceMappingURL=data:application/json;base64,ewogICJ2ZXJzaW9uIjogMywKICAic291cmNlcyI6IFsiLi4vLi4vLi4vLi4vc3JjL3RyYW5zZm9ybWVycy9pbmRleC50cyJdLAogICJzb3VyY2VzQ29udGVudCI6IFsiLyogVEhJUyBJUyBBIEdFTkVSQVRFRC9CVU5ETEVEIEZJTEUgQlkgQlVJTEQgU0NSSVBUICovXG5cbmV4cG9ydCAqIGFzICdkYXRlLXRyYW5zZm9ybWVyJyBmcm9tICcuL2RhdGUtdHJhbnNmb3JtZXIudHMnO1xuZXhwb3J0ICogYXMgJ2R1cmF0aW9uLXRyYW5zZm9ybWVyJyBmcm9tICcuL2R1cmF0aW9uLXRyYW5zZm9ybWVyLnRzJztcbmV4cG9ydCAqIGFzICdncm91cC10cmFuc2Zvcm1lcicgZnJvbSAnLi9ncm91cC10cmFuc2Zvcm1lci50cyc7XG5leHBvcnQgKi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