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a,EAAU+B,OACVlD,EAASkD,MACX,EACAsB,IAAK,WACH,IAAIC,EAAQnF,EAAEoF,aAAaF,MAW3B,OAVIC,EAAME,QACRF,EAAME,OAAOC,iBAAiB,YAAY,SAAU/C,GAClD,GAAIA,EAAEgD,iBAAkB,CACtB,IAAItE,EAAUsB,EAAEiD,OAASjD,EAAEkD,MAAQ,IACnCxE,EAAUA,EAAQyE,QAAQ,GAC1B5D,EAAad,WAAWC,GACxBP,EAASM,WAAWC,EACtB,CACF,IAAG,GAEEkE,CACT,IAEFnF,EAAEQ,MAAMmF,IAAI,GA7DZ,CA8DF,GACF,IACOnF,IACT,EACAR,EAAE4F,UAAUC,OAAM,WAChB7F,EAAE,oBAAoBK,kBACtBL,EAAE,qBAAqBsC,GAAG,SAAS,WACjC,IAAIwD,EAAc9F,EAAEQ,MAAMiB,KAAK,UAC3BsE,EAAW/F,EAAEQ,MAAMwF,SAAS9E,KAAK,YACrC6E,EAAS9D,SAAS,aAClB,IACIgE,EADcC,OAAOC,SAASC,KACD,eAAiBN,EAC/B,YAAfA,IACkB9F,EAAEQ,MAAM6F,QAAQ,SAASnF,KAAK,0BAChCoF,GAAG,cACnBL,GAAgB,YAEHjG,EAAE,kCACJsG,GAAG,cACdL,GAAgB,eAGpB,IAAIM,EAAkBvG,EAAE,aAAaiD,KAAK,MAAOgD,GAAc5B,IAAI,UAAW,QAC9ErE,EAAE,QAAQ0C,OAAO6D,GACjB5C,YAAW,WACToC,EAAStD,YAAY,YACvB,GAAG,IACL,IACA+D,OAAO,8DAA8DC,YAAYxG,EACnF,GACD,CA9MD,CA8MGuG","sources":["webpack://wp-internal-linkjuicer/./src/admin/js/ilj_tools.js"],"sourcesContent":["var __webpack_exports__ = {};\n/*!***********************************!*\\\n !*** ./src/admin/js/ilj_tools.js ***!\n \\***********************************/\n(function ($) {\n var ilj_select2_multi_input = {\n minimumResultsForSearch: 10,\n width: '70%'\n };\n var createFeedbackNotice = function () {\n var $feedbackNotice = $('<div/>').addClass('feedback').hide();\n $feedbackNotice.setNotice = function (message) {\n var $message = $('<p/>').html(message);\n var $dismiss = $('<button/>').addClass('notice-dismiss');\n $dismiss.on('click', function (e) {\n e.preventDefault();\n $feedbackNotice.hide();\n });\n $(this).removeClass().addClass('feedback');\n $(this).html($message).append($dismiss);\n return this;\n };\n $feedbackNotice.setSuccess = function (message) {\n this.setNotice(message);\n $(this).addClass('success');\n return this;\n };\n $feedbackNotice.setError = function (message) {\n this.setNotice(message);\n $(this).addClass('error');\n return this;\n };\n return $feedbackNotice;\n };\n $.fn.applyFileImport = function (options) {\n var that = this;\n this.createLoadingText = function () {\n var $loading = $('<span></span>').html('<small>' + ilj_tools.translation.loading + ' - <span>0</span>%</small>').hide();\n $loading.setPercent = function (percent) {\n $(this).find('span').text(percent);\n };\n return $loading;\n };\n this.each(function () {\n var settings = $.extend({\n fileSize: 0,\n fileType: '.'\n }, $(this).data());\n var $settingsForm = $(this).find('form[name^=\"ilj-import\"]');\n var $settingsFile = $settingsForm.find('.import-file');\n var $uploadButton = $settingsForm.find('.button');\n var $progress = $settingsForm.find('.ilj-progress');\n var $progressBar = $progress.find('.ilj-progress-bar');\n var $settingsHint = $settingsForm.find('.hint');\n var $feedbackNotice = createFeedbackNotice();\n var $loading = that.createLoadingText();\n var $startImport = $('<button/>').addClass('button button-primary ilj-import-settings-start').text(ilj_tools.translation.start_import).on('click', function (e) {\n e.preventDefault();\n $cancelImport.hide();\n $(this).attr('disabled', true).removeClass('button-primary');\n var $importSpinner = $('<span/>').addClass('spinner');\n $(this).after($importSpinner);\n $importSpinner.addClass('is-active');\n $.ajax({\n url: ilj_tools.ajax_url,\n data: {\n 'action': 'ilj_start_import',\n 'nonce': ilj_tools.nonce,\n 'file_type': settings.fileType\n },\n type: 'POST',\n success: function (resp) {\n setTimeout(function () {\n $feedbackNotice.hide();\n $uploadButton.show();\n $feedbackNotice.setSuccess(ilj_tools.translation.import_success);\n $startImport.hide().attr('disabled', false).addClass('button-primary');\n $importSpinner.remove();\n $feedbackNotice.show();\n }, 500);\n },\n error: function (jqXHR) {\n var error_msg = ilj_tools.translation.error;\n if (jqXHR.responseJSON.data) {\n error_msg = jqXHR.responseJSON.data;\n }\n $feedbackNotice.setError(error_msg);\n setTimeout(function () {\n $startImport.hide().attr('disabled', false).addClass('button-primary');\n $cancelImport.hide();\n $feedbackNotice.show();\n $uploadButton.show();\n $importSpinner.remove();\n }, 500);\n }\n });\n }).hide().insertAfter($settingsHint);\n var $cancelImport = $('<button/>').addClass('button').text(ilj_tools.translation.cancel_import).on('click', function (e) {\n e.preventDefault();\n $uploadButton.show();\n $feedbackNotice.hide();\n $startImport.hide();\n $cancelImport.hide();\n }).hide().insertAfter($startImport);\n $progressBar.setPercent = function (percent) {\n $(this).css('width', percent + \"%\");\n };\n $feedbackNotice.insertAfter($settingsHint);\n $progress.after($loading);\n $uploadButton.on('click', function (e) {\n e.preventDefault();\n $settingsFile.click();\n });\n $settingsFile.on('change', function (e) {\n e.preventDefault();\n if ($settingsFile[0].files[0].size > settings.fileSize) {\n $feedbackNotice.setError(ilj_tools.translation.upload_error_filesize).show();\n return;\n }\n var formData = new FormData();\n formData.append('action', 'ilj_upload_import');\n formData.append('file_type', settings.fileType); // settings / keyword\n formData.append('file_data', $settingsFile[0].files[0]);\n formData.append('file_name', $settingsFile[0].files[0].name);\n formData.append('nonce', ilj_tools.nonce);\n $.ajax({\n url: ilj_tools.ajax_url,\n data: formData,\n processData: false,\n contentType: false,\n dataType: 'json',\n type: 'POST',\n success: function (resp) {\n $feedbackNotice.setNotice(ilj_tools.translation.upload_success);\n $cancelImport.after($('<div/>').addClass('clear'));\n setTimeout(function () {\n $progress.hide();\n $loading.hide();\n $feedbackNotice.show();\n $cancelImport.show();\n $startImport.show();\n }, 800);\n },\n error: function (jqXHR) {\n var error_msg = ilj_tools.translation.error;\n if (jqXHR.responseJSON.data) {\n error_msg = jqXHR.responseJSON.data;\n }\n $feedbackNotice.setError(error_msg);\n setTimeout(function () {\n $progress.hide();\n $loading.hide();\n $feedbackNotice.show();\n $uploadButton.show();\n }, 800);\n },\n beforeSend: function () {\n $feedbackNotice.hide();\n $uploadButton.hide();\n $progressBar.setPercent(0);\n $loading.setPercent(0);\n $progress.show();\n $loading.show();\n },\n xhr: function () {\n var myXhr = $.ajaxSettings.xhr();\n if (myXhr.upload) {\n myXhr.upload.addEventListener('progress', function (e) {\n if (e.lengthComputable) {\n var percent = e.loaded / e.total * 100;\n percent = percent.toFixed(2);\n $progressBar.setPercent(percent);\n $loading.setPercent(percent);\n }\n }, false);\n }\n return myXhr;\n }\n });\n $(this).val('');\n });\n });\n return this;\n };\n $(document).ready(function () {\n $('.ilj-upload-form').applyFileImport();\n $('button.ilj-export').on('click', function () {\n var export_type = $(this).data('export');\n var $spinner = $(this).parent().find('.spinner');\n $spinner.addClass('is-active');\n var current_url = window.location.href;\n var download_url = current_url + '&ilj_export=' + export_type;\n if (export_type == \"keywords\") {\n var $export_empty = $(this).closest('.wrap').find('input#ilj-export-empty');\n if ($export_empty.is(':checked')) {\n download_url += '&empty=1';\n }\n var $addcols = $('#ilj-export-additional-columns');\n if ($addcols.is(':checked')) {\n download_url += '&addcols=1';\n }\n }\n var $download_frame = $('<iframe/>').attr('src', download_url).css('display', 'none');\n $('body').append($download_frame);\n setTimeout(function () {\n $spinner.removeClass('is-active');\n }, 500);\n });\n jQuery('#ilj-import-intern-type-post, #ilj-import-intern-type-term').ilj_select2(ilj_select2_multi_input);\n });\n})(jQuery);\n"],"names":["__webpack_exports__","$","ilj_select2_multi_input","minimumResultsForSearch","width","fn","applyFileImport","options","that","this","createLoadingText","$loading","html","ilj_tools","translation","loading","hide","setPercent","percent","find","text","each","settings","extend","fileSize","fileType","data","$settingsForm","$settingsFile","$uploadButton","$progress","$progressBar","$settingsHint","$feedbackNotice","addClass","setNotice","message","$message","$dismiss","on","e","preventDefault","removeClass","append","setSuccess","setError","createFeedbackNotice","$startImport","start_import","$cancelImport","attr","$importSpinner","after","ajax","url","ajax_url","nonce","type","success","resp","setTimeout","show","import_success","remove","error","jqXHR","error_msg","responseJSON","insertAfter","cancel_import","css","click","files","size","upload_error_filesize","formData","FormData","name","processData","contentType","dataType","upload_success","beforeSend","xhr","myXhr","ajaxSettings","upload","addEventListener","lengthComputable","loaded","total","toFixed","val","document","ready","export_type","$spinner","parent","download_url","window","location","href","closest","is","$download_frame","jQuery","ilj_select2"],"sourceRoot":""}