!function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.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 o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));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=0)}([function(e,t){jQuery(document).ready((function(){jQuery(".kaliforms-submission-link").on("click",(function(e){e.preventDefault(),n(jQuery(e.target).parent().data("link")),alert("Link to submission copied to clipboard")})),jQuery(".kaliforms-resend-emails").on("click",(function(e){e.preventDefault();var t={submissionId:jQuery(e.target).parent().data("submission-id"),formId:jQuery(e.target).parent().data("form-id"),nonce:KaliFormsObject.ajax_nonce};jQuery.ajax({type:"POST",data:{action:"kaliforms_resend_emails",args:t},dataType:"json",url:ajaxurl,complete:function(e){"ok"===e.responseText?alert("Emails resent"):alert("Something went wrong")}})})),jQuery("#kaliforms_export_from").on("change",(function(e){var t={formId:e.target.value,nonce:KaliFormsObject.ajax_nonce};jQuery.ajax({type:"POST",data:{action:"kaliforms_retrieve_form_fields",args:t},dataType:"json",url:ajaxurl,success:function(e){var t=jQuery("#kaliforms-form-fields");t.empty(),"Something went wrong."!==e&&"function"==typeof e.map&&e.map((function(e){var n='<label style="margin-right:10px"><input type="checkbox" id="kaliforms_export_field_'+e.id+'" name="kaliforms_export_fields" value="'+e.id+'" />'+e.caption+"</label>";t.append(n)}))}})}))}));var n=function(e){var t=document.createElement("textarea");t.value=e,t.setAttribute("readonly",""),t.style.position="absolute",t.style.left="-9999px",document.body.appendChild(t);var n=document.getSelection().rangeCount>0&&document.getSelection().getRangeAt(0);t.select(),document.execCommand("copy"),document.body.removeChild(t),n&&(document.getSelection().removeAllRanges(),document.getSelection().addRange(n))}}]);