File: //home2/gazetufm/www/wp/wp-content/plugins/gutenberg/build/scripts/deprecated/index.min.js.map
{
"version": 3,
"sources": ["package-external:@wordpress/hooks", "../../../packages/deprecated/src/index.ts"],
"sourcesContent": ["module.exports = window.wp.hooks;", "/**\n * WordPress dependencies\n */\nimport { doAction } from '@wordpress/hooks';\n\n/**\n * Object map tracking messages which have been logged, for use in ensuring a\n * message is only logged once.\n */\nexport const logged: Record< string, true > = Object.create( null );\n\ntype DeprecatedOptions = {\n\t/**\n\t * Version in which the feature was deprecated.\n\t */\n\tsince?: string;\n\t/**\n\t * Version in which the feature will be removed.\n\t */\n\tversion?: string;\n\t/**\n\t * Feature to use instead.\n\t */\n\talternative?: string;\n\t/**\n\t * Plugin name if it's a plugin feature.\n\t */\n\tplugin?: string;\n\t/**\n\t * Link to documentation.\n\t */\n\tlink?: string;\n\t/**\n\t * Additional message to help transition away from the deprecated feature.\n\t */\n\thint?: string;\n};\n\n/**\n * Logs a message to notify developers about a deprecated feature.\n *\n * @param {string} feature Name of the deprecated feature.\n * @param {DeprecatedOptions} [options] Personalisation options\n *\n * @example\n * ```js\n * import deprecated from '@wordpress/deprecated';\n *\n * deprecated( 'Eating meat', {\n * \tsince: '2019.01.01',\n * \tversion: '2020.01.01',\n * \talternative: 'vegetables',\n * \tplugin: 'the earth',\n * \thint: 'You may find it beneficial to transition gradually.',\n * } );\n *\n * // Logs: 'Eating meat is deprecated since version 2019.01.01 and will be removed from the earth in version 2020.01.01. Please use vegetables instead. Note: You may find it beneficial to transition gradually.'\n * ```\n */\nexport default function deprecated(\n\tfeature: string,\n\toptions: DeprecatedOptions = {}\n) {\n\tconst { since, version, alternative, plugin, link, hint } = options;\n\n\tconst pluginMessage = plugin ? ` from ${ plugin }` : '';\n\tconst sinceMessage = since ? ` since version ${ since }` : '';\n\tconst versionMessage = version\n\t\t? ` and will be removed${ pluginMessage } in version ${ version }`\n\t\t: '';\n\tconst useInsteadMessage = alternative\n\t\t? ` Please use ${ alternative } instead.`\n\t\t: '';\n\tconst linkMessage = link ? ` See: ${ link }` : '';\n\tconst hintMessage = hint ? ` Note: ${ hint }` : '';\n\tconst message = `${ feature } is deprecated${ sinceMessage }${ versionMessage }.${ useInsteadMessage }${ linkMessage }${ hintMessage }`;\n\n\t// Skip if already logged.\n\tif ( message in logged ) {\n\t\treturn;\n\t}\n\n\t/**\n\t * Fires whenever a deprecated feature is encountered\n\t *\n\t * @param {string} feature Name of the deprecated feature.\n\t * @param {DeprecatedOptions} options Personalisation options\n\t * @param {string} message Message sent to console.warn\n\t */\n\tdoAction( 'deprecated', feature, options, message );\n\n\t// eslint-disable-next-line no-console\n\tconsole.warn( message );\n\n\tlogged[ message ] = true;\n}\n"],
"mappings": "spBAAA,IAAAA,EAAAC,EAAA,CAAAC,EAAAC,IAAA,CAAAA,EAAO,QAAU,OAAO,GAAG,mDCG3B,IAAAC,EAAyB,SAMZC,EAAiC,OAAO,OAAQ,IAAK,EAkDnD,SAARC,EACNC,EACAC,EAA6B,CAAC,EAC7B,CACD,GAAM,CAAE,MAAAC,EAAO,QAAAC,EAAS,YAAAC,EAAa,OAAAC,EAAQ,KAAAC,EAAM,KAAAC,CAAK,EAAIN,EAEtDO,EAAgBH,EAAS,SAAUA,CAAO,GAAK,GAC/CI,EAAeP,EAAQ,kBAAmBA,CAAM,GAAK,GACrDQ,EAAiBP,EACpB,uBAAwBK,CAAc,eAAgBL,CAAQ,GAC9D,GACGQ,EAAoBP,EACvB,eAAgBA,CAAY,YAC5B,GACGQ,EAAcN,EAAO,SAAUA,CAAK,GAAK,GACzCO,EAAcN,EAAO,UAAWA,CAAK,GAAK,GAC1CO,EAAU,GAAId,CAAQ,iBAAkBS,CAAa,GAAIC,CAAe,IAAKC,CAAkB,GAAIC,CAAY,GAAIC,CAAY,GAGhIC,KAAWhB,OAWhB,YAAU,aAAcE,EAASC,EAASa,CAAQ,EAGlD,QAAQ,KAAMA,CAAQ,EAEtBhB,EAAQgB,CAAQ,EAAI,GACrB",
"names": ["require_hooks", "__commonJSMin", "exports", "module", "import_hooks", "logged", "deprecated", "feature", "options", "since", "version", "alternative", "plugin", "link", "hint", "pluginMessage", "sinceMessage", "versionMessage", "useInsteadMessage", "linkMessage", "hintMessage", "message"]
}