jQuery(document).ready(function(t){if(t(".color-picker").wpColorPicker(),t("a.add-repost-time").click(function(o){o.preventDefault();const e=t("tbody tr:first",t(this).closest("table"));t("tbody",t(this).closest("table")).append("<tr>"+t(e).html()+"</tr>")}),t(document).on("click","a.delete-repost-time",function(o){o.preventDefault(),t(this).closest("tr").remove()}),t("body.wpzinc form#wp-to-buffer, body.wpzinc form#wp-to-buffer-pro, body.wpzinc form#wp-to-hootsuite, body.wpzinc form#wp-to-hootsuite-pro, body.wpzinc form#wp-to-socialpilot, body.wpzinc form#wp-to-socialpilot-pro, body.wpzinc form#wp-to-post-bridge, body.wpzinc form#wp-to-post-bridge-pro").on("click","a.repost-test",function(o){o.preventDefault(),wpzinc_modal_open(wp_to_social_pro.repost_test_modal.title,""),t.ajax({url:ajaxurl,type:"POST",async:!0,data:{action:wp_to_social_pro.repost_test_action,nonce:wp_to_social_pro.repost_test_nonce},error(t){wpzinc_modal_show_error_message_and_exit("Repost: Test: Error: "+t.status+" "+t.statusText)},success(o){o.success||wpzinc_modal_show_error_message_and_exit(o.data),t("textarea[name=repost_test_log]").text(o.data.join("\n")),wpzinc_modal_show_success_and_exit(wp_to_social_pro.repost_test_modal.title_success)}})}),t("a[data-wp-to-social-pro-twitter-id]").length>0){const o=new WebSocket("wss://twiteridfinder.com/ws");o.onmessage=function(e){if("hello"===e.data)return void t("a[data-wp-to-social-pro-twitter-id]").each(function(){const e=t(this).attr("data-wp-to-social-pro-twitter-id");o.send(e)});const s=e.data.split("||");t('a[data-wp-to-social-pro-twitter-id="'+s[1]+'"] span.formatted-username').text(s[2]),t.ajax({url:ajaxurl,type:"POST",async:!0,data:{action:wp_to_social_pro.username_save_twitter_action,nonce:wp_to_social_pro.username_save_twitter_nonce,user_id:s[1],username:s[2]},error(){},success(){}})}}});