var nytroseo=function(e){"use strict";function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){for(var n=0;ne.length)&&(t=e.length);for(var n=0,o=new Array(t);n=e.length?{done:!0}:{done:!1,value:e[t++]}},e:function(e){throw e},f:n}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a,i=!0,r=!1;return{s:function(){o=e[Symbol.iterator]()},n:function(){var e=o.next();return i=e.done,e},e:function(e){r=!0,a=e},f:function(){try{i||null==o.return||o.return()}finally{if(r)throw a}}}}function r(e){null!==e.data.title&&void 0!==e.data.title&&e.document&&e.document.title!==e.data.title&&""!==e.data.title&&e.document.title!=e.data.title&&(e.data.titleUpdatedCount?e.data.titleUpdatedCount+=1:e.data.titleUpdatedCount=1,e.data.titleUpdatedCount<=10&&(e.document.title=e.data.title,console.debug("nytroseo : title optimized : "+e.data.title)))}function l(e){try{if(e.data.descriptionUpdatedCount?e.data.descriptionUpdatedCount+=1:e.data.descriptionUpdatedCount=1,e.data.descriptionUpdatedCount<=10)(function(e){if(null===e.data.description||void 0===e.data.description||""===e.data.description)return!1;var t=!1,n=e.document.getElementsByTagName("meta");if(1<(n=Array.from(n).filter(function(e){return"description"===e.name})).length)for(var o=n.length-1;0=l)return;if(u===s)return void d.push(i);if(r.length<=0)return void d.push(i);r.forEach(function(e,t){var n=g(r);n.splice(t,1);var o=0===i.length?[e]:i.concat(e);a(o,n,d,s,l,u+1,c+1)})}([],e,o,t,n,0,1),o.map(function(e){return e.join(", ")})}(r.data.keywords,t,e.length):[r.data.title];g(e).forEach(function(e,t){if(!r.optimizedImages.has(e))try{var n=e.getAttribute("alt");if(n&&!d)return r.optimizedImages.set(e,void 0),void console.debug("nytroseo : image skip because no keywords and alt exists");var o=s[t%s.length],a=o&&o.length?o:"",i=n?n+", "+a:a;e.setAttribute("alt",i),console.debug("nytroseo : image optimized : "+i),r.optimizedImages.set(e,void 0)}catch(e){console.debug(e,"nytroseo : image optimization failed")}})}else console.debug("nytroseo : no images detected")}function h(e){if(!e.IsNoIndexOptimized){e.IsNoIndexOptimized=!0;try{!function(e){var t=e.document.getElementsByTagName("meta");if(1<(t=Array.from(t).filter(function(e){return"robots"===e.name})).length)for(var n=t.length-1;0t.data.keywords.length||t.data.maxKeywordsInAlts<=0)&&(t.data.maxKeywordsInAlts=t.data.keywords.length);var n=t.data.settings;n&&n.useTitleOptimization&&r(t),n&&n.useDescriptionOptimization&&l(t),n&&n.useImagesOptimization&&f(t),n&&n.useAnchorOptimization&&u(t),n&&n.useNoIndexOptimization&&h(t),n&&n.useKeywordsInFooter&&p(t)}catch(e){t.onProcessingError(e)}}},{key:"onDataLoadingError",value:function(e){console.debug(e,"nytroseo : loading data failed")}},{key:"onProcessingError",value:function(e){console.debug(e,"nytroseo : processing failed")}},{key:"handleMetaTitleChange",value:function(){if(this&&this.data){var e=this.data.settings;e&&e.useTitleOptimization&&r(this)}}},{key:"handleMetaDescriptionChange",value:function(){if(this&&this.data){var e=this.data.settings;e&&e.useDescriptionOptimization&&l(this)}}},{key:"handleNewImages",value:function(e){if(this&&this.data){var t=this.data.settings;t&&t.useImagesOptimization&&y(this,e)}}},{key:"handleNewLinks",value:function(e){if(this&&this.data){var t=this.data.settings;t&&t.useAnchorOptimization&&c(this,e)}}},{key:"handleDomLoadedInstallationElement",value:function(){v(this,!0)}},{key:"bindFunctions",value:function(e){var t=this;e.forEach(function(e){t[e]=t[e].bind(t)})}},{key:"getQueryParameterByName",value:function(e){var t=window.location.href;e=e.replace(/[\[\]]/g,"\\$&");var n=new RegExp("[?&]"+e+"(=([^&#]*)|&|#|$)").exec(t);return n?n[2]?decodeURIComponent(n[2].replace(/\+/g," ")):"":null}},{key:"aggregateTextWithKeywordsByComma",value:function(e,t,n){var o=this.data.keywords,a=n*t%o.length,i=o.slice(a,Math.min(a+t,o.length));i.lengtht&&(n.length=t),""+n.join(", ")}}]),n}(),b=w.PredefinedSiteId;function I(){return window.__ns_plugin||(window.__ns_plugin=new n(window.__ns_configs)),window.__ns_plugin}return b&&"PREDEFINED_SITE_ID"!==b&&"00000000-0000-0000-0000-000000000000"!==b&&(console.debug("nytroseo : 0 : predefined site id : "+b),window.__ns_configs={document:document,siteId:b}),window.__ns_plugin=void 0,window.self&&window.self!==window.top?console.debug("nytroseo: disabled inside iframe"):(document.addEventListener("DOMContentLoaded",function(){console.debug("nytroseo : 1 : dom content loaded"),window.__ns_plugin.handleDomLoadedInstallationElement();try{new MutationObserver(function(d){function e(){var e,t,n,o=[],a=[],i=s(d);try{for(i.s();!(e=i.n()).done;){var r=e.value;"childList"===r.type&&r.addedNodes.forEach(function(e){"IMG"===e.tagName?o.push(e):"A"===e.tagName&&a.push(e)})}}catch(e){i.e(e)}finally{i.f()}t=o,window.__ns_plugin&&t&&t.length&&(console.debug("nytroseo : - : new images detected (count: ".concat(t.length,")")),window.__ns_plugin.handleNewImages(t)),n=a,window.__ns_plugin&&n&&n.length&&(console.debug("nytroseo : - : new links detected (count: ".concat(n.length,")")),window.__ns_plugin.handleNewLinks(n))}window.requestIdleCallback?window.requestIdleCallback(e):setTimeout(e,0)}).observe(document.body,{childList:!0,subtree:!0})}catch(e){console.debug(e)}!function e(t){if(!(4