(i=>{let e=null,r=(i(".wp-list-table .ninjadraw-shortcode .ninjadraw-btn").attr({style:null}),i(".wp-list-table").on("click",".ninjadraw-shortcode .ninjadraw-btn",a=>{let n=i(a.currentTarget);a=n.siblings(".ninjadraw-val").text();navigator?.clipboard?.writeText&&(navigator.clipboard.writeText(a),n.addClass("ninjadraw-done"),clearTimeout(e),e=setTimeout(()=>{n.removeClass("ninjadraw-done")},1e3))}),ninjadraw_globals);if(!r.data.is_licensed){let e=new window.Yalogica.NinjaDraw.Plugins.Notify,n=i("#ninjadraw-button-create");n.on("click",a=>{a.preventDefault(),i.ajax({url:r.api.url+"/items/count",method:"GET",headers:{"X-WP-Nonce":r.api.nonce},dataType:"json",success:function(a){5<=a.data.count?e.show(r.i18n.limits_diagrams,"ninjadraw-warning"):(n.off("click"),a=n.attr("href"),window.location.href=a)},error:function(a,n,i){e.show(i||r.i18n.error_unknown,"ninjadraw-error")}})})}})(jQuery);