!function(a,b){var c=function(){function c(a){return a&&b.pressThisL10n?b.pressThisL10n[a]||a:a||""}function d(b){return b=a.trim(b||""),/^(?:https?:)?\/\//.test(b)?(b=wp.sanitize.stripTags(b),b.replace(/["\\]+/g,"")):""}function e(){a(".spinner").addClass("is-active"),a(".post-actions button").attr("disabled","disabled")}function f(){a(".spinner").removeClass("is-active"),a(".post-actions button").removeAttr("disabled")}function g(a){var c,d;G&&!G.isHidden()||(a="reset"===a||Z&&Z>X.value.length,d=X.style.height,a?(c=b.pageYOffset,X.style.height="auto",X.style.height=Math.max(X.scrollHeight,Y)+"px",b.scrollTo(b.pageXOffset,c)):parseInt(X.style.height,10)=91&&d<=93||d>=112&&d<=123||144===d||145===d||j(d)}function j(a){var c,d,e,f=h(),g=50,i=65,j=b.tinymce.util.VK;f&&(c=f.top+G.iframeElement.getBoundingClientRect().top,d=c+f.height,c-=g,d+=i,e=J.height(),ee&&b.scrollTo(b.pageXOffset,d+b.pageYOffset-e)))}function k(){var b=a("#title-container");return b.find("img.emoji").each(function(){var b=a(this);b.replaceWith(a("").text(b.attr("alt")))}),wp.sanitize.sanitizeText(b.text())}function l(){var c=a("#pressthis-form"),d=a('');G&&G.save(),a("#post_title").val(k()),b.tagBox&&a("div.tagsdiv").each(function(){b.tagBox.flushTags(this,!1,1)}),a(".categories-select .category").each(function(b,e){var f=a(e);f.hasClass("selected")&&c.append(d.clone().val(f.attr("data-term-id")||""))})}function m(d){var g;L=!1,e(),"publish"===d&&a("#post_status").val("publish"),l(),g=a("#pressthis-form").serialize(),a.ajax({type:"post",url:b.ajaxurl,data:g}).always(function(){f(),s(),a(".publish-button").removeClass("is-saving")}).done(function(a){if(a.success){if(a.data.redirect)if(b.opener&&(N.redirInParent||a.data.force))try{b.opener.location.href=a.data.redirect,b.setTimeout(function(){b.self.close()},200)}catch(c){b.location.href=a.data.redirect}else b.location.href=a.data.redirect}else r(a.data.errorMessage)}).fail(function(){r(c("serverError"))})}function n(a){var c,e,f="";c=d(a.attr("data-wp-src")||""),e=d(O.u),a.hasClass("is-image")?(e||(e=c),f=''):f="[embed]"+c+"[/embed]",G&&!G.isHidden()?Q?G.execCommand("mceInsertContent",!1,f):G.setContent("

"+f+"

"+G.getContent()):b.QTags&&b.QTags.insertContent(f)}function o(){var c,d=a("#new-category").val();d&&(c={action:"press-this-add-category",post_id:a("#post_ID").val()||0,name:d,new_cat_nonce:a("#_ajax_nonce-add-category").val()||"",parent:a("#new-category-parent").val()||0},a.post(b.ajaxurl,c,function(b){if(b.success){var c,d,e=a("ul.categories-select");a.each(b.data,function(b,f){var g=a("
  • ").append(a('