!function e(t,n,i){function r(o,s){if(!n[o]){if(!t[o]){var c="function"==typeof require&&require;if(!s&&c)return c(o,!0);if(a)return a(o,!0);var p=new Error("Cannot find module '"+o+"'");throw p.code="MODULE_NOT_FOUND",p}var u=n[o]={exports:{}};t[o][0].call(u.exports,(function(e){return r(t[o][1][e]||e)}),u,u.exports,e,t,n,i)}return n[o].exports}for(var a="function"==typeof require&&require,o=0;o<i.length;o++)r(i[o]);return r}({1:[function(e,t,n){"use strict";!function(){var e=document.getElementById("code_snippets_ajax_nonce").value,t="-network"===pagenow.substring(pagenow.length-"-network".length),n=window.code_snippets_manage_i18n;function i(e,t){for(var n=0;n<e.length;n++)t(e[n],n)}function r(n,i,r,a){var o=i.querySelector(".column-id");if(o&&parseInt(o.textContent)){r.id=parseInt(o.textContent),r.shared_network=!!i.className.match(/\bshared-network-snippet\b/),r.network=r.shared_network||t;var s="action=update_code_snippet&_ajax_nonce="+e+"&field="+n+"&snippet="+JSON.stringify(r),c=new XMLHttpRequest;c.open("POST",ajaxurl,!0),c.setRequestHeader("Content-Type","application/x-www-form-urlencoded; charset=UTF-8"),c.onload=function(){c.status<200||c.status>=400||(console.log(c.responseText),void 0!==a&&a(JSON.parse(c.responseText)))},c.send(s)}}function a(){r("priority",this.parentElement.parentElement,{priority:this.value})}function o(e,t){var n=parseInt(e.textContent.replace(/\((\d+)\)/,"$1"));t?n++:n--,e.textContent="("+n.toString()+")"}function s(e){var t=this.parentElement.parentElement,i=t.className.match(/\b(?:in)?active-snippet\b/);if(i){e.preventDefault();var a="inactive-snippet"===i[0];r("active",t,{active:a},(function(e){var i=t.querySelector(".snippet-activation-switch");if(e.success){t.className=a?t.className.replace(/\binactive-snippet\b/,"active-snippet"):t.className.replace(/\bactive-snippet\b/,"inactive-snippet");var r=document.querySelector(".subsubsub");o(r.querySelector(".active .count"),a),o(r.querySelector(".inactive .count"),a),i.title=a?n.deactivate:n.activate}else t.className+=" erroneous-snippet",i.title=n.activation_error}))}}i(document.getElementsByClassName("snippet-priority"),(function(e,t){e.addEventListener("input",a),e.disabled=!1})),i(document.getElementsByClassName("snippet-activation-switch"),(function(e,t){e.addEventListener("click",s)}))}()},{}]},{},[1]);
