!function a(b,c,d){function e(g,h){if(!c[g]){if(!b[g]){var i="function"==typeof require&&require;if(!h&&i)return i(g,!0);if(f)return f(g,!0);var j=new Error("Cannot find module '"+g+"'");throw j.code="MODULE_NOT_FOUND",j}var k=c[g]={exports:{}};b[g][0].call(k.exports,function(a){var c=b[g][1][a];return e(c||a)},k,k.exports,a,b,c,d)}return c[g].exports}for(var f="function"==typeof require&&require,g=0;g&/\\[\\]\0- =]+?( [^\\]]+?)?\\]","g"),f=new RegExp("\\[/[^<>&/\\[\\]\0- =]+?\\]","g");!function(){var a=function(a){this._app=a,this._app.registerPlugin("YoastShortcodePlugin",{status:"loading"}),this.bindElementEvents();var b="("+wpseoShortcodePluginL10n.wpseo_shortcode_tags.join("|")+")";this.keywordRegex=new RegExp(b,"g"),this.closingTagRegex=new RegExp("\\[\\/"+b+"\\]","g"),this.nonCaptureRegex=new RegExp("\\["+b+"[^\\]]*?\\]","g"),this.parsedShortcodes=[],this.loadShortcodes(this.declareReady.bind(this))};a.prototype.declareReady=function(){this._app.pluginReady("YoastShortcodePlugin"),this.registerModifications()},a.prototype.declareReloaded=function(){this._app.pluginReloaded("YoastShortcodePlugin")},a.prototype.registerModifications=function(){this._app.registerModification("content",this.replaceShortcodes.bind(this),"YoastShortcodePlugin")},a.prototype.removeUnknownShortCodes=function(a){return a=a.replace(e,""),a=a.replace(f,"")},a.prototype.replaceShortcodes=function(a){var b=this.parsedShortcodes;if("string"==typeof a&&b.length>0)for(var c=0;c0))return a();this.parseShortcodes(b,a)},a.prototype.bindElementEvents=function(){var a=document.getElementById("content")||!1,b=_.debounce(this.loadShortcodes.bind(this,this.declareReloaded.bind(this)),500);a&&(a.addEventListener("keyup",b),a.addEventListener("change",b)),"undefined"!=typeof tinyMCE&&"function"==typeof tinyMCE.on&&tinyMCE.on("addEditor",function(a){a.editor.on("change",b),a.editor.on("keyup",b)})},a.prototype.getContentTinyMCE=function(){var a=document.getElementById("content")&&document.getElementById("content").value||"";return"undefined"!=typeof tinyMCE&&void 0!==tinyMCE.editors&&0!==tinyMCE.editors.length&&(a=tinyMCE.get("content")&&tinyMCE.get("content").getContent()||""),a},a.prototype.getUnparsedShortcodes=function(a){if("object"!==(void 0===a?"undefined":d(a)))return console.error("Failed to get unparsed shortcodes. Expected parameter to be an array, instead received "+(void 0===a?"undefined":d(a))),!1;for(var b=[],c=0;c0?void jQuery.post(ajaxurl,{action:"wpseo_filter_shortcodes",_wpnonce:wpseoShortcodePluginL10n.wpseo_filter_shortcodes_nonce,data:a},function(a){this.saveParsedShortcodes(a,b)}.bind(this)):b()},a.prototype.saveParsedShortcodes=function(a,b){a=JSON.parse(a);for(var c=0;c