(()=>{"use strict";function e(i){return e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e(i)}function i(i){var r=function(i){if("object"!=e(i)||!i)return i;var r=i[Symbol.toPrimitive];if(void 0!==r){var t=r.call(i,"string");if("object"!=e(t))return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(i)}(i);return"symbol"==e(r)?r:r+""}function r(e,r){for(var t=0;t<r.length;t++){var s=r[t];s.enumerable=s.enumerable||!1,s.configurable=!0,"value"in s&&(s.writable=!0),Object.defineProperty(e,i(s.key),s)}}var t=window.yoast.analysis.bundledPlugins.usedKeywords;(new(function(){return e=function e(){!function(e,i){if(!(e instanceof i))throw new TypeError("Cannot call a class as a function")}(this,e),this._initialized=!1},(i=[{key:"register",value:function(){analysisWorker.registerMessageHandler("updateKeywordUsage",this.updateKeywordUsage.bind(this),"used-keywords-assessment"),analysisWorker.registerMessageHandler("initialize",this.initialize.bind(this),"used-keywords-assessment")}},{key:"initialize",value:function(e){this._plugin=new t(analysisWorker,e),this._plugin.registerPlugin(),this._initialized=!0}},{key:"updateKeywordUsage",value:function(e){if(!this._initialized)throw new Error("UsedKeywordsAssessment must be initialized before keyphrases can be updated.");var i=e.usedKeywords,r=e.usedKeywordsPostTypes;this._plugin.updateKeywordUsage(i,r),analysisWorker.refreshAssessment("usedKeywords","previouslyUsedKeywords")}}])&&r(e.prototype,i),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,i}())).register()})();