/*
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 skip_private_property_transformer_exports = {};
__export(skip_private_property_transformer_exports, {
  SkipPrivatePropertyTransformer: () => SkipPrivatePropertyTransformer
});
module.exports = __toCommonJS(skip_private_property_transformer_exports);
var import_transformer = require('./transformer.cjs');
const PRIVATE_PROPERTY_PREFIX = "_";
class SkipPrivatePropertyTransformer extends import_transformer.Transformer {
  /**
   * An id of the transformer.
   *
   * @returns `skip-private-property`.
   */
  get id() {
    return "skip-private-property";
  }
  /**
   * Determines if the transformer can transform the given value.
   *
   * @param _value - The value to check.
   * @param key - The key of the value to check.
   * @returns A boolean indicating if the transformer can transform the value.
   */
  canTransform(_value, key) {
    return key.startsWith(PRIVATE_PROPERTY_PREFIX);
  }
  /**
   * Transforms the given value.
   *
   * @returns The transformed value.
   */
  transformValue() {
    return void 0;
  }
  /**
   * Restores the given value.
   */
  restoreValue() {
    throw new Error("SkipPrivatePropertyTransformer does not support restoring values");
  }
}
// Annotate the CommonJS export names for ESM import in node:
0 && (module.exports = {
  SkipPrivatePropertyTransformer
});
//# sourceMappingURL=data:application/json;base64,ewogICJ2ZXJzaW9uIjogMywKICAic291cmNlcyI6IFsiLi4vLi4vLi4vLi4vc3JjL3RyYW5zZm9ybWVycy9za2lwLXByaXZhdGUtcHJvcGVydHktdHJhbnNmb3JtZXIudHMiXSwKICAic291cmNlc0NvbnRlbnQiOiBbIi8qKlxuICogQGZpbGVcbiAqXG4gKiBBIHRyYW5zZm9ybWVyIHRoYXQgc2tpcHMgcHJpdmF0ZSBwcm9wZXJ0aWVzLlxuICovXG5cbmltcG9ydCB7IFRyYW5zZm9ybWVyIH0gZnJvbSAnLi90cmFuc2Zvcm1lci50cyc7XG5cbmNvbnN0IFBSSVZBVEVfUFJPUEVSVFlfUFJFRklYID0gJ18nO1xuXG4vKipcbiAqIEEgdHJhbnNmb3JtZXIgdGhhdCBza2lwcyBwcml2YXRlIHByb3BlcnRpZXMuXG4gKi9cbmV4cG9ydCBjbGFzcyBTa2lwUHJpdmF0ZVByb3BlcnR5VHJhbnNmb3JtZXIgZXh0ZW5kcyBUcmFuc2Zvcm1lciB7XG4gIC8qKlxuICAgKiBBbiBpZCBvZiB0aGUgdHJhbnNmb3JtZXIuXG4gICAqXG4gICAqIEByZXR1cm5zIGBza2lwLXByaXZhdGUtcHJvcGVydHlgLlxuICAgKi9cbiAgcHVibGljIG92ZXJyaWRlIGdldCBpZCgpOiBzdHJpbmcge1xuICAgIHJldHVybiAnc2tpcC1wcml2YXRlLXByb3BlcnR5JztcbiAgfVxuXG4gIC8qKlxuICAgKiBEZXRlcm1pbmVzIGlmIHRoZSB0cmFuc2Zvcm1lciBjYW4gdHJhbnNmb3JtIHRoZSBnaXZlbiB2YWx1ZS5cbiAgICpcbiAgICogQHBhcmFtIF92YWx1ZSAt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