!function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)n.d(r,i,function(t){return e[t]}.bind(null,i));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=371)}({371:function(e,t,n){"use strict";n.r(t);var r=function(e,t){var n=i(t),r=function(e){return-1!==i(e).indexOf(n)};return _.filter(e,(function(e){return r(e.title)||_.some(e.keywords,r)}))},i=function(e){return(e=e.toLowerCase()).trim()};function o(e){var t=document.querySelectorAll(".edd-email-tags-list-item");if(t.length){var n=document.activeElement;if(n&&(n.matches(".edd-email-tags-filter-search")||n.matches(".edd-email-tags-list-button"))){var r,i=!1;if(n.matches(".edd-email-tags-filter-search")){if("up"===e)return;r=_.find(t,(function(e){return"none"!==e.style.display})),i=!0}else r=n.parentElement;for(;!i;)i=!(r="down"===e?r.nextElementSibling:r.previousElementSibling)||"none"!==r.style.display;r?r.querySelector(".edd-email-tags-list-button").focus():"up"===e&&document.querySelector(".edd-email-tags-filter-search").focus()}}}document.addEventListener("DOMContentLoaded",(function(){var e,t,n,i=document.querySelector(".edd-email-tags-inserter");i&&(i.addEventListener("click",tb_position),(e=document.querySelectorAll(".edd-email-tags-list-button"))&&_.each(e,(function(e){e.addEventListener("click",(function(){tb_remove(),window.send_to_editor(e.dataset.to_insert)}))})),(n=document.querySelector(".edd-email-tags-filter-search"))&&n.addEventListener("input",(function(e){!function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=document.querySelectorAll(".edd-email-tags-list-item"),n=r(eddEmailTagsInserter.items,e);_.each(t,(function(e){var t=_.findWhere(n,{tag:e.dataset.tag});e.style.display=t?"block":"none"}))}(e.target.value)})),document.addEventListener("keydown",(function(e){var t=e.key||e.keyCode;t&&("ArrowDown"!==t&&40!==t?"ArrowUp"!==t&&38!==t||o("up"):o("down"))})),(t=document.querySelector(".edd-email-tags-inserter"))&&t.addEventListener("click",(function(){setTimeout((function(){var e=document.querySelector(".edd-email-tags-filter-search");e&&(e.value="",e.dispatchEvent(new Event("input")),e.focus())}),10)})))}))}});