/*
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 two_way_map_transformer_exports = {};
__export(two_way_map_transformer_exports, {
  TwoWayMapTransformer: () => TwoWayMapTransformer
});
module.exports = __toCommonJS(two_way_map_transformer_exports);
var import_two_way_map = require('../two-way-map.cjs');
var import_typed_transformer = require('./typed-transformer.cjs');
class TwoWayMapTransformer extends import_typed_transformer.TypedTransformer {
  /**
   * Gets the ID of the transformer.
   *
   * @returns The ID of the transformer.
   */
  get id() {
    return "two-way-map";
  }
  /**
   * Checks if the value is a TwoWayMap.
   *
   * @param value - The value to check.
   * @returns `true` if the value is a TwoWayMap, `false` otherwise.
   */
  canTransform(value) {
    return value instanceof import_two_way_map.TwoWayMap;
  }
  /**
   * Restores a TwoWayMap from an array of entries.
   *
   * @param transformedValue - The array of entries.
   * @returns The TwoWayMap.
   */
  restoreValue(transformedValue) {
    return new import_two_way_map.TwoWayMap(transformedValue);
  }
  /**
   * Transforms a TwoWayMap to an array of entries.
   *
   * @param value - The TwoWayMap.
   * @returns The array of entries.
   */
  transformValue(value) {
    return Array.from(value.entries());
  }
}
// Annotate the CommonJS export names for ESM import in node:
0 && (module.exports = {
  TwoWayMapTransformer
});
//# sourceMappingURL=data:application/json;base64,ewogICJ2ZXJzaW9uIjogMywKICAic291cmNlcyI6IFsiLi4vLi4vLi4vLi4vc3JjL3RyYW5zZm9ybWVycy90d28td2F5LW1hcC10cmFuc2Zvcm1lci50cyJdLAogICJzb3VyY2VzQ29udGVudCI6IFsiLyoqXG4gKiBAZmlsZVxuICpcbiAqIEEgdHJhbnNmb3JtZXIgdGhhdCBjYW4gdHJhbnNmb3JtIGEgVHdvV2F5TWFwIHRvIGFuIGFycmF5IG9mIGVudHJpZXMgYW5kIGJhY2suXG4gKi9cblxuaW1wb3J0IHsgVHdvV2F5TWFwIH0gZnJvbSAnLi4vdHdvLXdheS1tYXAudHMnO1xuaW1wb3J0IHsgVHlwZWRUcmFuc2Zvcm1lciB9IGZyb20gJy4vdHlwZWQtdHJhbnNmb3JtZXIudHMnO1xuXG50eXBlIE1hcEVudHJ5ID0gcmVhZG9ubHkgW2tleTogdW5rbm93biwgdmFsdWU6IHVua25vd25dO1xuXG4vKipcbiAqIEEgdHJhbnNmb3JtZXIgdGhhdCBjYW4gdHJhbnNmb3JtIGEgVHdvV2F5TWFwIHRvIGFuIGFycmF5IG9mIGVudHJpZXMgYW5kIGJhY2suXG4gKi9cbmV4cG9ydCBjbGFzcyBUd29XYXlNYXBUcmFuc2Zvcm1lciBleHRlbmRzIFR5cGVkVHJhbnNmb3JtZXI8VHdvV2F5TWFwPHVua25vd24sIHVua25vd24+LCBNYXBFbnRyeVtdPiB7XG4gIC8qKlxuICAgKiBHZXRzIHRoZSBJRCBvZiB0aGUgdHJhbnNmb3JtZXIuXG4gICAqXG4gICAqIEByZXR1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