File: /www/wwwroot/www.waciwang.com/wp-content/plugins/gutenberg/build/scripts/warning/index.js.map
{
"version": 3,
"sources": ["../../../packages/warning/src/utils.ts", "../../../packages/warning/src/index.ts"],
"sourcesContent": ["/**\n * Object map tracking messages which have been logged, for use in ensuring a\n * message is only logged once.\n */\nexport const logged: Set< string > = new Set();\n", "/**\n * Internal dependencies\n */\nimport { logged } from './utils';\n\nfunction isDev(): boolean {\n\t// eslint-disable-next-line @wordpress/wp-global-usage\n\treturn globalThis.SCRIPT_DEBUG === true;\n}\n\n/**\n * Shows a warning with `message` if environment is not `production`.\n *\n * @param message Message to show in the warning.\n *\n * @example\n * ```js\n * import warning from '@wordpress/warning';\n *\n * function MyComponent( props ) {\n * if ( ! props.title ) {\n * warning( '`props.title` was not passed' );\n * }\n * ...\n * }\n * ```\n */\nexport default function warning( message: string ): void {\n\tif ( ! isDev() ) {\n\t\treturn;\n\t}\n\n\t// Skip if already logged.\n\tif ( logged.has( message ) ) {\n\t\treturn;\n\t}\n\n\t// eslint-disable-next-line no-console\n\tconsole.warn( message );\n\n\t// Throwing an error and catching it immediately to improve debugging\n\t// A consumer can use 'pause on caught exceptions'\n\t// https://github.com/facebook/react/issues/4216\n\ttry {\n\t\tthrow Error( message );\n\t} catch ( x ) {\n\t\t// Do nothing.\n\t}\n\tlogged.add( message );\n}\n"],
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAIO,MAAM,SAAwB,oBAAI,IAAI;;;ACC7C,WAAS,QAAiB;AAEzB,WAAO;EACR;AAmBe,WAAR,QAA0B,SAAwB;AACxD,QAAK,CAAE,MAAM,GAAI;AAChB;IACD;AAGA,QAAK,OAAO,IAAK,OAAQ,GAAI;AAC5B;IACD;AAGA,YAAQ,KAAM,OAAQ;AAKtB,QAAI;AACH,YAAM,MAAO,OAAQ;IACtB,SAAU,GAAI;IAEd;AACA,WAAO,IAAK,OAAQ;EACrB;",
"names": []
}