diff --git a/README.txt b/README.txt index 814be3d3..ddb2f93f 100755 --- a/README.txt +++ b/README.txt @@ -5,7 +5,7 @@ Tags: sales notification, fomo, social proof, woocommerce sales, notification ba Requires at least: 5.0 Tested up to: 6.6 Requires PHP: 5.6 -Stable tag: 2.9.1 +Stable tag: 2.9.2 License: GPL-3.0-or-later License URI: https://www.gnu.org/licenses/gpl-3.0.html @@ -205,6 +205,10 @@ Yes. Your data is legally safe and we guarantee to not make use of your data und == Changelog == += 2.9.2 - 27/10/2024 = +Improved: Codebase for better performance. +Few minor bug fixes and improvements. + = 2.9.1 - 01/10/2024 = Fixed: Issues with custom notification shortcode. Improved: Notification creation and duplication process. diff --git a/assets/admin/js/admin.asset.php b/assets/admin/js/admin.asset.php index 34a5d9af..0fad2487 100644 --- a/assets/admin/js/admin.asset.php +++ b/assets/admin/js/admin.asset.php @@ -1 +1 @@ - array('lodash', 'moment', 'react', 'react-dom', 'wp-api-fetch', 'wp-components', 'wp-compose', 'wp-data', 'wp-date', 'wp-element', 'wp-escape-html', 'wp-hooks', 'wp-i18n', 'wp-media-utils'), 'version' => '1a09014ec32ac95bf9fc'); + array('lodash', 'moment', 'react', 'react-dom', 'wp-api-fetch', 'wp-components', 'wp-compose', 'wp-data', 'wp-date', 'wp-element', 'wp-escape-html', 'wp-hooks', 'wp-i18n', 'wp-media-utils'), 'version' => 'f714fd63b763742acf98'); diff --git a/assets/admin/js/admin.js b/assets/admin/js/admin.js index 795aa3af..11d300ef 100644 --- a/assets/admin/js/admin.js +++ b/assets/admin/js/admin.js @@ -15,4 +15,4 @@ return["deleted",(0,ce.sprintf)((0,ce.__)("%d notification Alerts have been\n // translators: Title of the new Notification Alert. %1$s: title, %2$s: current date. u((0,ce.sprintf)((0,ce.__)("NotificationX - %1$s - %2$s","notificationx"),i,s))}),[null===(r=null==o?void 0:o.values)||void 0===r?void 0:r.type]),t().createElement(gt.BuilderProvider,{value:qr(qr({},o),{isLoading:a,setIsLoading:s,title:c,setTitle:u})},t().createElement(jt,{addNew:!0}),t().createElement(Nt,{isLoading:a},t().createElement(Wr,{isLoading:a})))}),(0,ce.__)("Quick Builder","notificationx"));var Qr=function(){return Qr=Object.assign||function(e){for(var t,n=1,r=arguments.length;n0&&o.setFormField(null,null==e?void 0:e.tabs)})),null===(t=null===(e=null==n?void 0:n.location)||void 0===e?void 0:e.state)||void 0===t?void 0:t.duplicate){var a=parseInt(null===(i=null===(r=null==n?void 0:n.location)||void 0===r?void 0:r.state)||void 0===i?void 0:i._id);u(!0),Ct.get("nx/".concat(a)).then((function(e){e&&(delete e.id,delete e.nx_id,e.nx_id=null,e.enabled=!!(null==p?void 0:p.is_pro_active),o.setValues(e),o.setSavedValues(e),o.setActiveTab(null==e?void 0:e.currentTab), // translators: Postfix for notice created by duplicate button. -s((null==e?void 0:e.title)+(0,ce.__)(" - Copy","notificationx")),u(!1))}))}}),[]),(0,e.useEffect)((function(){var e,t,n,r,i,a,s,l,c;(null===(n=null===(t=null===(e=null==p?void 0:p.state)||void 0===e?void 0:e.redirect)||void 0===t?void 0:t.state)||void 0===n?void 0:n.type)&&o.setValues({type:null===(a=null===(i=null===(r=null==p?void 0:p.state)||void 0===r?void 0:r.redirect)||void 0===i?void 0:i.state)||void 0===a?void 0:a.type,source:null===(c=null===(l=null===(s=null==p?void 0:p.state)||void 0===s?void 0:s.redirect)||void 0===l?void 0:l.state)||void 0===c?void 0:c.source})}),[]),t().createElement(gt.BuilderProvider,{value:o},t().createElement("div",null,t().createElement(jt,{addNew:!0}),t().createElement(Nt,{isLoading:c},t().createElement(no,{setIsLoading:u,title:a,setTitle:s}))))}),(0,ce.__)("Add New","notificationx"));(0,o.addFilter)("nx_adv_template_default","notificationx",(function(e){var t=function(e){var t=e.themes.replace(e.source+"_","");return t=t.replace(e.type+"_",""),(null==e?void 0:e.custom_type)&&(t=t.replace((null==e?void 0:e.custom_type)+"_","")),t}(e),n=Gr(Gr({},{first_param:"",second_param:"",third_param:"",fourth_param:"",fifth_param:"",sixth_param:"",map_fourth_param:"",ga_fourth_param:"",ga_fifth_param:"",pa_fourth_param:"",review_fourth_param:"",freemius_fifth_param:"",freemius_sixth_param:"",freemius_seventh_param:""}),null==e?void 0:e["notification-template"]);for(var r in n)if(Object.hasOwnProperty.call(n,r)){var o=n[r]||"";if("tag_custom"==(o="string"==typeof o?(0,Gt.escapeHTML)(o):o)&&(null==n?void 0:n["custom_"+r])&&(o=(null==n?void 0:n["custom_"+r])||""),"tag_siteview"==o||"tag_realtime_siteview"==o?n[r]="{{views}}":"ga_title"==o?n[r]="{{title}}":0===o.indexOf("tag_")?n[r]="{{"+o.replace("tag_","")+"}}":0===o.indexOf("product_")?n[r]="{{"+o.replace("product_","")+"}}":n[r]=o||"","second_param"==r&&["woocommerce_sales_conv-theme-seven","woocommerce_sales_conv-theme-eight","woocommerce_sales_conv-theme-nine","conversions_conv-theme-seven","conversions_conv-theme-eight","conversions_conv-theme-nine"].includes(null==e?void 0:e.themes)){var i=/(\S+)(\s?.*)/.exec(o);i&&(n[r]="",i[1]&&(n[r]+="".concat(i[1],"")),i[2]&&(n[r]+="".concat(i[2],"")),n[r]+="")}else n[r]="".concat(n[r],"")}switch(e.themes){case"donation_theme-one":case"donation_theme-two":case"donation_theme-three":case"donation_theme-four":case"donation_theme-five":return["".concat(null==n?void 0:n.first_param," ").concat(null==n?void 0:n.second_param," ").concat(null==n?void 0:n.third_param),"".concat(null==n?void 0:n.fourth_param),"".concat(null==n?void 0:n.fifth_param)];case"donation_conv-theme-seven":case"donation_conv-theme-eight":case"donation_conv-theme-nine":return["".concat(null==n?void 0:n.first_param," ").concat(null==n?void 0:n.second_param),"in ".concat(null==n?void 0:n.third_param," ").concat(null==n?void 0:n.fourth_param)];case"google_reviews_maps_theme":return["".concat(null==n?void 0:n.first_param," ").concat(null==n?void 0:n.second_param),"".concat(null==n?void 0:n.third_param),"".concat(null==n?void 0:n.fourth_param)];case"woocommerce_sales_inline_conv-theme-seven":case"woo_inline_conv-theme-seven":return["".concat(null==n?void 0:n.first_param," ").concat(null==n?void 0:n.second_param," ").concat(null==n?void 0:n.third_param," ").concat(null==n?void 0:n.fourth_param)];case"youtube_channel-1":return["".concat(null==n?void 0:n.second_param," ").concat(null==n?void 0:n.third_param," ").concat(null==n?void 0:n.yt_third_label),"".concat(null==n?void 0:n.fourth_param," ").concat(null==n?void 0:n.yt_fourth_label," ").concat(null==n?void 0:n.fifth_param," ").concat(null==n?void 0:n.yt_fifth_label)];case"youtube_channel-2":return["".concat(null==n?void 0:n.second_param," ").concat(null==n?void 0:n.third_param," ").concat(null==n?void 0:n.yt_third_label),"".concat(null==n?void 0:n.fourth_param," ").concat(null==n?void 0:n.fifth_param)];case"youtube_video-1":case"youtube_video-3":return["".concat(null==n?void 0:n.second_param),"".concat(null==n?void 0:n.third_param," ").concat(null==n?void 0:n.fourth_param," ").concat(null==n?void 0:n.fifth_param)];case"youtube_video-2":case"youtube_video-4":return["".concat(null==n?void 0:n.second_param),"".concat(null==n?void 0:n.third_param," ").concat(null==n?void 0:n.yt_third_label," ").concat(null==n?void 0:n.fourth_param," ").concat(null==n?void 0:n.yt_fourth_label," ").concat(null==n?void 0:n.fifth_param," ").concat(null==n?void 0:n.yt_fifth_label)];case"announcements_theme-1":case"announcements_theme-2":case"announcements_theme-12":case"announcements_theme-14":return["".concat(null==n?void 0:n.first_param),"".concat(null==n?void 0:n.third_param),"".concat(null==n?void 0:n.fourth_param)];case"announcements_theme-13":return["".concat(null==n?void 0:n.first_param)];case"announcements_theme-15":return["".concat(null==n?void 0:n.first_param),"".concat(null==n?void 0:n.third_param)]}if("freemius_conversions"===e.source)switch(t){case"theme-one":case"theme-two":case"theme-three":case"theme-four":case"theme-five":return["".concat(null==n?void 0:n.first_param," ").concat(null==n?void 0:n.second_param),"".concat(null==n?void 0:n.third_param," ").concat(null==n?void 0:n.freemius_fifth_param," ").concat(null==n?void 0:n.fifth_param," ").concat(null==n?void 0:n.freemius_sixth_param," ").concat(null==n?void 0:n.freemius_seventh_param),"".concat(null==n?void 0:n.fourth_param)];case"conv-theme-ten":case"conv-theme-eleven":return["".concat(null==n?void 0:n.first_param," ").concat(null==n?void 0:n.second_param),"".concat(null==n?void 0:n.third_param," ").concat(null==n?void 0:n.freemius_fifth_param," ").concat(null==n?void 0:n.freemius_sixth_param," ").concat(null==n?void 0:n.freemius_seventh_param),"".concat(null==n?void 0:n.fourth_param)];case"conv-theme-six":return["".concat(null==n?void 0:n.first_param," ").concat(null==n?void 0:n.second_param," ").concat(null==n?void 0:n.third_param),"".concat(null==n?void 0:n.map_fourth_param," ").concat(null==n?void 0:n.fourth_param," ").concat(null==n?void 0:n.freemius_fifth_param," ").concat(null==n?void 0:n.freemius_sixth_param," ").concat(null==n?void 0:n.freemius_seventh_param),"".concat(null==n?void 0:n.fifth_param)];case"conv-theme-seven":case"conv-theme-eight":case"conv-theme-nine":return["".concat(null==n?void 0:n.first_param," ").concat(null==n?void 0:n.second_param),"".concat(null==n?void 0:n.third_param," ").concat(null==n?void 0:n.fourth_param," ").concat(null==n?void 0:n.freemius_fifth_param," ").concat(null==n?void 0:n.freemius_sixth_param," ").concat(null==n?void 0:n.freemius_seventh_param)]}switch(t){case"theme-one":case"theme-two":case"theme-three":case"theme-four":case"theme-five":case"conv-theme-ten":case"conv-theme-eleven":return["".concat(null==n?void 0:n.first_param," ").concat(null==n?void 0:n.second_param),"".concat(null==n?void 0:n.third_param),"".concat(null==n?void 0:n.fourth_param)];case"conv-theme-six":return["".concat(null==n?void 0:n.first_param," ").concat(null==n?void 0:n.second_param," ").concat(null==n?void 0:n.third_param),"".concat(null==n?void 0:n.map_fourth_param," ").concat(null==n?void 0:n.fourth_param),"".concat(null==n?void 0:n.fifth_param)];case"conv-theme-seven":case"conv-theme-eight":case"conv-theme-nine":return["".concat(null==n?void 0:n.first_param," ").concat(null==n?void 0:n.second_param),"".concat(null==n?void 0:n.third_param," ").concat(null==n?void 0:n.fourth_param)];case"theme-six-free":case"theme-seven-free":case"theme-eight-free":case"review-comment":case"review-comment-2":case"review-comment-3":case"total-rated":case"reviewed":return["".concat(null==n?void 0:n.first_param," ").concat(null==n?void 0:n.second_param," "),"".concat(null==n?void 0:n.third_param),"".concat(null==n?void 0:n.fourth_param)];case"review_saying":return["".concat(null==n?void 0:n.first_param," ").concat(null==n?void 0:n.second_param," ").concat(null==n?void 0:n.third_param," ").concat(null==n?void 0:n.review_fourth_param),"".concat(null==n?void 0:n.fifth_param),"".concat(null==n?void 0:n.sixth_param)];case"today-download":case"7day-download":case"total-download":return["".concat(null==n?void 0:n.first_param," "),"".concat(null==n?void 0:n.second_param," ").concat(null==n?void 0:n.third_param),"".concat(null==n?void 0:n.fourth_param)];case"actively_using":return["".concat(null==n?void 0:n.first_param," ").concat(null==n?void 0:n.second_param," "),"".concat(null==n?void 0:n.third_param)];case"maps_theme":return["".concat(null==n?void 0:n.first_param," ").concat(null==n?void 0:n.second_param," ").concat(null==n?void 0:n.third_param," ").concat(null==n?void 0:n.map_fourth_param),"".concat(null==n?void 0:n.fourth_param),"".concat(null==n?void 0:n.fifth_param)];case"pa-theme-one":return["".concat(null==n?void 0:n.first_param),"".concat(null==n?void 0:n.second_param," ").concat(null==n?void 0:n.third_param," ").concat(null==n?void 0:n.ga_fourth_param," ").concat(null==n?void 0:n.ga_fifth_param," ").concat(null==n?void 0:n.sixth_param)];case"pa-theme-two":return["".concat(null==n?void 0:n.first_param," ").concat(null==n?void 0:n.second_param),"".concat(null==n?void 0:n.third_param," ").concat(null==n?void 0:n.ga_fourth_param," ").concat(null==n?void 0:n.ga_fifth_param," ").concat(null==n?void 0:n.sixth_param)];case"pa-theme-three":return["".concat(null==n?void 0:n.first_param," ").concat(null==n?void 0:n.second_param),"".concat(null==n?void 0:n.third_param," ").concat(null==n?void 0:n.ga_fourth_param)];case"pa-theme-four":return["".concat(null==n?void 0:n.first_param," ").concat(null==n?void 0:n.second_param," ").concat(null==n?void 0:n.third_param),"".concat(null==n?void 0:n.pa_fourth_param),"".concat(null==n?void 0:n.sixth_param)];case"stock-theme-one":case"stock-theme-two":return["".concat(null==n?void 0:n.second_param," ").concat(null==n?void 0:n.third_param," ").concat(null==n?void 0:n.fourth_param," ").concat(null==n?void 0:n.fifth_param)];default:return console.error("Please select a theme",e),["".concat(null==n?void 0:n.first_param," ").concat(null==n?void 0:n.second_param),"".concat(null==n?void 0:n.third_param),"".concat(null==n?void 0:n.fourth_param)]}}));var lo=function(){return lo=Object.assign||function(e){for(var t,n=1,r=arguments.length;n0){var n=g.filter((function(e){return null==e?void 0:e.options})).map((function(e){return null==e?void 0:e.options})).flat();h(n)}}),[null===(r=null==g?void 0:g[0])||void 0===r?void 0:r.options]),(0,e.useEffect)((function(){var e=xo()((0,wo.convertToRaw)(u.getCurrentContent()));n.onChange({target:{type:"advanced-template",value:e,name:n.name}})}),[u]);var v=function(e){var t,n=u.getCurrentContent(),r=u.getSelection(),o=wo.EditorState.createEmpty();t=r.isCollapsed()?wo.Modifier.insertText(n,r,"{{".concat(e,"}}")):wo.Modifier.replaceText(n,r,"{{".concat(e,"}}")),o=wo.EditorState.push(u,t,"insert-fragment"),p(o),setTimeout((function(){l.current.editor.focus()}),300)};return(0,e.useEffect)((function(){var e,t,n;if(!(null===(e=s.savedValues)||void 0===e?void 0:e.advanced_template)){var r=s.values.themes,i=So({},s.values);if("page_analytics_pa-theme-two"==r||"page_analytics_pa-theme-one"==r){var a=null===(t=i["notification-template"].ga_fifth_param)||void 0===t?void 0:t.trim(),l=null===(n=i["notification-template"].sixth_param)||void 0===n?void 0:n.replace("tag_",""),c="{{".concat(l,":").concat(a,"}}");i=So(So({},i),{"notification-template":So(So({},i["notification-template"]),{ga_fifth_param:c,sixth_param:""})})}var u=(0,o.applyFilters)("nx_adv_template_default",i),f=Co()(u.map((function(e){return"

".concat(e,"

")})).join("\r\n")),d=f.contentBlocks,h=f.entityMap,m=wo.ContentState.createFromBlockArray(d,h),g=wo.EditorState.createWithContent(m);p(g)}}),[s.values.themes,s.values["notification-template"]]),t().createElement(t().Fragment,null,t().createElement(bo.Editor,{ref:l,toolbar:ko,editorState:u,toolbarClassName:"wprf-editor-toolbar",wrapperClassName:"wprf-editor wprf-control",editorClassName:"wprf-editor-main",onEditorStateChange:p,handleBeforeInput:function(e,t,n){if((0,wo.convertToRaw)(t.getCurrentContent()).blocks.length>3)return"handled"},handleReturn:function(e,t){if((0,wo.convertToRaw)(t.getCurrentContent()).blocks.length>=3)return e.preventDefault(),e.stopPropagation(),"handled"},handlePastedText:function(e,t,n){if((0,wo.convertToRaw)(n.getCurrentContent()).blocks.length+e.split(/\r\n|\r|\n/).length>4)return!0}}),(null===(i=null==n?void 0:n.sales_count_themes)||void 0===i?void 0:i.includes(s.values.themes))&&t().createElement("div",{className:"template-example"},t().createElement("span",{className:"advance-template-label"},"Example: "," "),t().createElement("code",null,"{{title}} {{7days}}"),t().createElement("span",{className:"advance-template-doc"}," or "),t().createElement("code",null,"{{title}} in last {{day:7}}"),t().createElement("span",{className:"advance-template-doc"},". "," ","For more information check out this ",t().createElement("a",{href:"https://notificationx.com/docs/notificationx-advanced-template/",target:"_blank"},"doc"),".")),("page_analytics_pa-theme-one"==s.values.themes||"page_analytics_pa-theme-two"==s.values.themes)&&t().createElement("div",{className:"template-example"},t().createElement("span",{className:"advance-template-label"},"Example: "," "),t().createElement("code",null,"in last {{day:7}}"),t().createElement("span",{className:"advance-template-doc"},". "," ","For more information check out this ",t().createElement("a",{href:"https://notificationx.com/docs/notificationx-advanced-template/",target:"_blank"},"doc"),".")),t().createElement("br",null),t().createElement("div",{className:"template-options"},t().createElement("span",{className:"advance-template-label"},"Variables:"),s.eligibleOptions(d).map((function(e,n){if("tag_day"!=e.value&&"tag_month"!=e.value&&"tag_year"!=e.value&&"tag_custom"!=e.value&&"select_a_tag"!=e.value){var r=e.value.replace("tag_",""),o=e.label,i="elementor_form"===s.values.source&&r.includes("el_");return t().createElement(t().Fragment,{key:n},t().createElement("span",{className:"button button-secondary",title:i?"{{".concat(r,"}}"):o,onClick:function(){return v(r)}},i?o:"{{".concat(r,"}}")))}})),(null===(a=null==n?void 0:n.sales_count_themes)||void 0===a?void 0:a.includes(s.values.themes))&&t().createElement(t().Fragment,{key:":days"},t().createElement("span",{className:"button button-secondary",title:"7 days",onClick:function(){return v("day:7")}},"{{day:7}}")),("page_analytics_pa-theme-one"==s.values.themes||"page_analytics_pa-theme-two"==s.values.themes)&&t().createElement(t().Fragment,null,t().createElement(t().Fragment,{key:"day"},t().createElement("span",{className:"button button-secondary",title:"{{day:7}}",onClick:function(){return v("day:7")}},"{{day:7}}")),t().createElement(t().Fragment,{key:"month"},t().createElement("span",{className:"button button-secondary",title:"{{month:7}}",onClick:function(){return v("month:7")}},"{{month:7}}")),t().createElement(t().Fragment,{key:"year"},t().createElement("span",{className:"button button-secondary",title:"{{year:7}}",onClick:function(){return v("year:7")}},"{{year:7}}")))))};var jo;function Do(){return Do=Object.assign?Object.assign.bind():function(e){for(var t=1;t{let t={};e.forEach(((e,n)=>t[e]=n))})(Fo),String.fromCharCode.bind(String)),Ho=("function"==typeof Uint8Array.from&&Uint8Array.from.bind(Uint8Array),e=>e.replace(/=/g,"").replace(/[+\/]/g,(e=>"+"==e?"-":"_"))),Vo="function"==typeof btoa?e=>btoa(e):Ro?e=>Buffer.from(e,"binary").toString("base64"):e=>{let t,n,r,o,i="";const a=e.length%3;for(let a=0;a255||(r=e.charCodeAt(a++))>255||(o=e.charCodeAt(a++))>255)throw new TypeError("invalid character found");t=n<<16|r<<8|o,i+=Fo[t>>18&63]+Fo[t>>12&63]+Fo[t>>6&63]+Fo[63&t]}return a?i.slice(0,a-3)+"===".substring(a):i},Ko=Ro?e=>Buffer.from(e).toString("base64"):e=>{let t=[];for(let n=0,r=e.length;n{if(e.length<2)return(t=e.charCodeAt(0))<128?e:t<2048?Uo(192|t>>>6)+Uo(128|63&t):Uo(224|t>>>12&15)+Uo(128|t>>>6&63)+Uo(128|63&t);var t=65536+1024*(e.charCodeAt(0)-55296)+(e.charCodeAt(1)-56320);return Uo(240|t>>>18&7)+Uo(128|t>>>12&63)+Uo(128|t>>>6&63)+Uo(128|63&t)},Wo=/[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g,qo=Ro?e=>Buffer.from(e,"utf8").toString("base64"):Bo?e=>Ko(Bo.encode(e)):e=>Vo(e.replace(Wo,Yo)),Zo=(e,t=!1)=>t?Ho(qo(e)):qo(e);var Qo=function(){return Qo=Object.assign||function(e){for(var t,n=1,r=arguments.length;n0&&o[o.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]'),confirmButtonText:(0,ce.__)("Close","notificationx"),customClass:{container:"nx-csv-modal-ift-container",popup:"nx-csv-modal-ift-popup",actions:"nx-delete-actions nx-csv-invalid-file-type"},confirmedCallback:function(){},completeAction:function(e){},completeArgs:function(){},afterComplete:function(){}}),[2];n.label=1;case 1:return n.trys.push([1,3,,4]),[4,(r=e.url,new Promise((function(e,t){var n=new URL(r,window.location.href);"https:"===window.location.protocol&&"https:"!==n.protocol&&(n.protocol="https:");var o=new XMLHttpRequest;o.open("GET",n.toString(),!0),o.responseType="blob",o.onload=function(){if(200===o.status){var n=new FileReader;n.onload=function(t){var n,r=(null===(n=t.target)||void 0===n?void 0:n.result).split("\n");e(r.length)},n.onerror=function(){return t(new Error("Error reading CSV file."))},n.readAsText(o.response)}else t(new Error("Error fetching CSV file."))},o.onerror=function(){return t(new Error("Error fetching CSV file."))},o.send()})))];case 2:return n.sent()>101?be().fire({title:(0,ce.__)("Import Limit Exceeded.","notificationx"),html:(0,ce.__)('Your file contains more than 100 rows. Only the first 100 rows will be imported. Click "Continue" to proceed or "Cancel" to abort.',"notificationx"),iconHtml:'NotificationX'),showDenyButton:!0,iconColor:"transparent",confirmButtonText:(0,ce.__)("Continue","notificationx"),denyButtonText:(0,ce.__)("Cancel","notificationx"),reverseButtons:!0,customClass:{container:"nx-csv-modal-import-limit-container",popup:"nx-csv-modal-import-limit-popup",actions:"nx-delete-actions nx-csv-import-limit"},allowOutsideClick:!1}).then((function(t){t.isConfirmed?(i({id:e.id,title:null==e?void 0:e.filename,url:e.url}),d(!0)):t.isDenied&&(i(null),d(!1))})):(i({id:e.id,title:null==e?void 0:e.filename,url:e.url}),d(!0)),[3,4];case 3:return t=n.sent(),console.error("Error processing the CSV file:",t),d(!1),[3,4];case 4:return[2]}var r}))},new((r=void 0)||(r=Promise))((function(e,i){function a(e){try{l(o.next(e))}catch(e){i(e)}}function s(e){try{l(o.throw(e))}catch(e){i(e)}}function l(t){var n;t.done?e(t.value):(n=t.value,n instanceof r?n:new r((function(e){e(n)}))).then(a,s)}l((o=o.apply(t,n||[])).next())}));var t,n,r,o}(e)},multiple:!1,value:o,render:function(e){var r=e.open;return t().createElement(t().Fragment,null,t().createElement("button",{className:"wprf-btn wprf-csv-upload-btn",onClick:r},c?t().createElement(di,null):t().createElement(fi,null)," ",null!=o?(null==n?void 0:n.reset)||(0,ce.__)("Upload","notificationx"):(null==n?void 0:n.button)||"Upload"),(null==o?void 0:o.title)&&t().createElement("span",null,null==o?void 0:o.title),t().createElement("a",{className:"wprf-btn wprf-btn-sample-csv",href:"".concat(s.assets.admin,"sample_data.csv"),download:!0},t().createElement(hi,null)," ",(0,ce.__)("Sample CSV","notificationx")))}})))}));var gi,vi=a(5901),yi=new Uint8Array(16);function bi(){if(!gi&&!(gi="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto)))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return gi(yi)}const wi=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;for(var _i=[],xi=0;xi<256;++xi)_i.push((xi+256).toString(16).substr(1));const Ei=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=(_i[e[t+0]]+_i[e[t+1]]+_i[e[t+2]]+_i[e[t+3]]+"-"+_i[e[t+4]]+_i[e[t+5]]+"-"+_i[e[t+6]]+_i[e[t+7]]+"-"+_i[e[t+8]]+_i[e[t+9]]+"-"+_i[e[t+10]]+_i[e[t+11]]+_i[e[t+12]]+_i[e[t+13]]+_i[e[t+14]]+_i[e[t+15]]).toLowerCase();if(!function(e){return"string"==typeof e&&wi.test(e)}(n))throw TypeError("Stringified UUID is invalid");return n},Ci=function(e,t,n){var r=(e=e||{}).random||(e.rng||bi)();if(r[6]=15&r[6]|64,r[8]=63&r[8]|128,t){n=n||0;for(var o=0;o<16;++o)t[n+o]=r[o];return t}return Ei(r)},Si=window.wp.compose,Oi=function(){return t().createElement("svg",{width:"16",height:"16",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},t().createElement("path",{d:"M16.875 4.68408H15V2.80908C15 1.77783 14.1562 0.934082 13.125 0.934082H3.125C2.09375 0.934082 1.25 1.77783 1.25 2.80908V12.8091C1.25 13.8403 2.09375 14.6841 3.125 14.6841H5V16.5591C5 17.5903 5.84375 18.4341 6.875 18.4341H16.875C17.9062 18.4341 18.75 17.5903 18.75 16.5591V6.55908C18.75 5.52783 17.9062 4.68408 16.875 4.68408ZM3.125 13.4341C2.78125 13.4341 2.5 13.1528 2.5 12.8091V2.80908C2.5 2.46533 2.78125 2.18408 3.125 2.18408H13.125C13.4688 2.18408 13.75 2.46533 13.75 2.80908V4.68408H6.875C5.84375 4.68408 5 5.52783 5 6.55908V13.4341H3.125ZM17.5 16.5591C17.5 16.9028 17.2188 17.1841 16.875 17.1841H6.875C6.53125 17.1841 6.25 16.9028 6.25 16.5591V6.55908C6.25 6.21533 6.53125 5.93408 6.875 5.93408H16.875C17.2188 5.93408 17.5 6.21533 17.5 6.55908V16.5591Z",fill:"#7C8DB5"}))},ki=function(){return t().createElement("svg",{width:"16",height:"16",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},t().createElement("path",{d:"M2.5 4.68408H4.16667H17.5",stroke:"#7C8DB5","stroke-linecap":"round","stroke-linejoin":"round"}),t().createElement("path",{d:"M15.8327 4.68392V16.3506C15.8327 16.7926 15.6571 17.2165 15.3445 17.5291C15.032 17.8417 14.608 18.0173 14.166 18.0173H5.83268C5.39065 18.0173 4.96673 17.8417 4.65417 17.5291C4.34161 17.2165 4.16602 16.7926 4.16602 16.3506V4.68392M6.66602 4.68392V3.01725C6.66602 2.57523 6.84161 2.1513 7.15417 1.83874C7.46673 1.52618 7.89065 1.35059 8.33268 1.35059H11.666C12.108 1.35059 12.532 1.52618 12.8445 1.83874C13.1571 2.1513 13.3327 2.57523 13.3327 3.01725V4.68392",stroke:"#7C8DB5","stroke-linecap":"round","stroke-linejoin":"round"}),t().createElement("path",{d:"M8.33398 8.85059V13.8506",stroke:"#7C8DB5","stroke-linecap":"round","stroke-linejoin":"round"}),t().createElement("path",{d:"M11.666 8.85059V13.8506",stroke:"#7C8DB5","stroke-linecap":"round","stroke-linejoin":"round"}))};var Mi=function(){return Mi=Object.assign||function(e){for(var t,n=1,r=arguments.length;n0){var n=(null==t?void 0:t[e])||{};(null==n?void 0:n.title)&&(n=Bi(Bi({},n),{title:n.title+" - Copy"})),(null==n?void 0:n.post_title)&&(n=Bi(Bi({},n),{post_title:n.post_title+" - Copy"})),(null==n?void 0:n.username)&&(n=Bi(Bi({},n),{username:n.username+" - Copy"})),(null==n?void 0:n.plugin_theme_name)&&(n=Bi(Bi({},n),{plugin_theme_name:n.plugin_theme_name+" - Copy"})),n=Bi(Bi({},n),{index:Ci(),isCollapsed:!1}),w.setFieldValue([l,null==j?void 0:j.length],n)}}),[j]),G=(0,e.useMemo)((function(){return _t(j||[],m)}),[j,m]),X=function(e,t){!function(e,t){e.persist&&e.persist();var n=(0,gt.executeChange)(e),r=n.field,o=n.val;w.setFieldValue([l,t,r],o)}(e,t)},J=function(e){var t=Fi([],y,!0),n=t.indexOf(e);n>-1?t.splice(n,1):t.push(e),b(t)},$=function(e){C(E===e?null:e)},ee=(null==j?void 0:j.length)||0,te=(f-1)*m+1,ne=Math.min(f*m,ee),re=G[f-1]||[],oe=["index","chosen","selected","isCollapsed","iscollapsed","id"],ie=["first_name","last_name","post_title","timestamp","image"],ae=function(e,t,n,r){void 0===r&&(r=["email","image","link"]);var o=n.eligibleOptions(t).map((function(e){return e.value.replace(/^tag_/,"")})),i=new Set(o),a=e.filter((function(e){return i.has(e)}));return Fi(Fi([],a,!0),r,!0)}((0,e.useMemo)((function(){if((null==j?void 0:j.length)>0){var e=Object.keys(j[0]).filter((function(e){return!oe.includes(e)})),t=ie.filter((function(t){return e.includes(t)})),n=e.filter((function(e){return!ie.includes(e)}));return Fi(Fi(Fi([],t.slice(0,3),!0),n,!0),t.slice(3),!0)}return[]}),[j,oe,ie]),O,w),se=(0,e.useMemo)((function(){return null==j?void 0:j.filter((function(e){return y.includes(e.index)}))}),[y]),le=(0,e.useMemo)((function(){return _t(j||[],U)}),[j,U]),ue=(R-1)*U+1,pe=Math.min(R*U,ee),de=le[R-1]||[],he=null===(a=null===(i=null==_?void 0:_.state)||void 0===i?void 0:i.csv_upload_loader)||void 0===a?void 0:a.csv_upload_loader;return(0,e.useEffect)((function(){var e,t;if((null===(t=null===(e=null==u?void 0:u[0])||void 0===e?void 0:e.options)||void 0===t?void 0:t.length)>0){var n=u.filter((function(e){return null==e?void 0:e.options})).map((function(e){return null==e?void 0:e.options})).flat();k(n)}}),[null===(s=null==u?void 0:u[0])||void 0===s?void 0:s.options]),t().createElement("div",{className:"wprf-repeater-control wprf-advanced-repeater-control ".concat("loading")},he&&t().createElement("div",{className:"loader-wrapper"},t().createElement("img",{src:"".concat(_.assets.admin,"images/logos/logo-preloader.gif")})),t().createElement("div",{className:"wprf-advanced-repeater-heading"},t().createElement("span",null,(0,ce.__)("Custom Notification")),t().createElement("div",{className:"wprf-advanced-repeater-header-action"},(null==j?void 0:j.length)>9&&t().createElement("button",{className:"wprf-repeater-button preview",onClick:function(){return P(!0)}},t().createElement(Li,null)," ",(0,ce.__)("Preview","notificationx")),t().createElement("button",{className:"wprf-repeater-button add-new",onClick:function(){return w.setFieldValue(l,Fi(Fi([],j,!0),[{index:Ci()}],!1))},disabled:ee>=100},t().createElement(Pi,null)," ",t().createElement("span",null," ",null==c?void 0:c.label)))),t().createElement("div",{className:"wprf-advanced-repeater-header"},(null==re?void 0:re.length)>0&&t().createElement("div",{className:"nx-all-selector"},t().createElement("input",{id:"nx-advanced-repeater-all-checkbox",type:"checkbox",checked:(null==re?void 0:re.length)==(null==se?void 0:se.length),onChange:function(e){return function(e){if(e.target.checked){var t=re.map((function(e){return e.index}));b(t)}else b([])}(e)}}),t().createElement("label",{htmlFor:"nx-advanced-repeater-all-checkbox"},(0,ce.__)("Select All","notificationx"))),ee>1&&t().createElement("div",{className:"wprf-repeater-label"},t().createElement("div",{className:"change-time"},t().createElement("button",{disabled:void 0===se||(null==se?void 0:se.length)<2,className:"wprf-repeater-button",onClick:function(){return Y(!K)}},t().createElement(Ii,null)," ",t().createElement("span",null," ",(0,ce.__)("Change Time","notificationx")," ")),K&&t().createElement(Ri,{handleChangeTime:function(e,t){if(e&&t){var n=new Date(e),r=new Date(t);if(n&&r){var o=j.map((function(e){return y.includes(e.index)?Bi(Bi({},e),{timestamp:(t=n,o=r,new Date(t.getTime()+Math.random()*(o.getTime()-t.getTime()))).toISOString(),selected:!0}):e;var t,o}));D(o),w.setFieldValue(l,o),Y(!1),ct((0,ce.__)("Selected custom notification Time updated successfully!","notificationx"))}}},setChangeTimeToggle:Y})),t().createElement("button",{className:"wprf-repeater-button bulk-edit",onClick:function(){return I(!0)},disabled:void 0===se||(null==se?void 0:se.length)<2},t().createElement(Ii,null)," ",t().createElement("span",null,(0,ce.__)("Edit","notificationx"))),t().createElement("button",{className:"wprf-repeater-button bulk-delete",onClick:function(){be().fire({title:(0,ce.__)("Are you sure?","notificationx"),text:(0,ce.__)("Do you really want to delete the selected items? This process cannot be undone.","notificationx"),icon:"error",showCancelButton:!0,confirmButtonText:(0,ce.__)("Yes, Delete Them","notificationx"),cancelButtonText:(0,ce.__)("No, Keep Them","notificationx"),customClass:{actions:"nx-delete-actions nx-bulk-delete-actions"}}).then((function(e){if(e.isConfirmed){var t=j.filter((function(e){return!y.includes(e.index)}));w.setFieldValue(l,t),b([])}}))},disabled:void 0===se||(null==se?void 0:se.length)<2},t().createElement(Ti,null)," ",t().createElement("span",null,(0,ce.__)("Delete","notificationx"))))),j&&j.length>0&&t().createElement(t().Fragment,null,t().createElement(vi.ReactSortable,{className:"wprf-repeater-content wprf-advanced-repeater-content",list:j,setList:function(e){w.setFieldValue(l,e)},handle:".wprf-repeater-field-title",filter:".wprf-repeater-field-controls",forceFallback:!0},re.map((function(e,n){return t().createElement(ji,{isCollapsed:E!==(null==e?void 0:e.index)&&1!=re.length,key:(null==e?void 0:e.index)||n+(f-1)*m,fields:u,index:n+(f-1)*m,__index:null==e?void 0:e.index,parent:l,clone:Q,remove:Z,checked:-1!=y.findIndex((function(t){return t==e.index})),onChange:function(e){return X(e,n+(f-1)*m)},onChecked:J,setIsCollapsed:$})}))),t().createElement("div",{className:"nx-admin-items-footer"},t().createElement("div",{className:"items-per-page-wrapper"},t().createElement(Pt.SelectControl,{options:[{value:"5",label:(0,ce.__)("5")},{value:"10",label:(0,ce.__)("10")},{value:"20",label:(0,ce.__)("20")},{value:"50",label:(0,ce.__)("50")},{value:"100",label:(0,ce.__)("100")}],value:m.toString(),onChange:function(e){return function(e){g(parseInt(e)),d(1)}(e)}}),t().createElement("label",{htmlFor:""},(0,ce.__)("Items Per Page"))),t().createElement("div",{className:"pagination-wrapper"},t().createElement("div",{className:"pagination-info"},"Displaying ".concat(te,"-").concat(ne," of ").concat(ee)),t().createElement(or,{current:f,onChange:function(e){d(e),b([])},total:j.length,pageSize:m,showTitle:!1,locale:ir})))),t().createElement(Nr(),{isOpen:A,onRequestClose:function(){return I(!1)},ariaHideApp:!1,overlayClassName:"nx-custom-notification-edit",style:{overlay:{position:"fixed",display:"flex",top:0,left:0,right:0,bottom:0,backgroundColor:"rgba(3, 6, 60, 0.7)",zIndex:9999,padding:"60px 15px"},content:{position:"static",width:"900px",margin:"auto",border:"0px solid #5414D0",overflow:"auto",WebkitOverflowScrolling:"touch",borderRadius:"4px",outline:"none",padding:"15px"}}},t().createElement(t().Fragment,null,t().createElement("div",{className:"wprf-modal-preview-header"},t().createElement("span",null,(0,ce.__)("Edit","notificationx")),t().createElement("button",{onClick:function(){return I(!1)}},t().createElement(Ai,null))),t().createElement("div",{className:"wprf-modal-table-wrapper wpsp-bulk-edit-fields"},se&&se.map((function(e,n){return t().createElement(Ni,{isCollapsed:!0,key:null==e?void 0:e.index,fields:u,index:j.findIndex((function(t){return t.index==(null==e?void 0:e.index)})),__index:null==e?void 0:e.index,parent:l,remove:Z,onChange:function(t){return X(t,j.findIndex((function(t){return t.index==(null==e?void 0:e.index)})))}})}))),t().createElement("div",{className:"wprf-modal-preview-footer"},t().createElement("button",{className:"wpsp-btn wpsp-btn-preview-update",onClick:function(){return I(!1)}},(0,ce.__)("Update","notificationx"))))),t().createElement(Nr(),{isOpen:L,onRequestClose:function(){return P(!1)},ariaHideApp:!1,overlayClassName:"nx-custom-notification-preview",style:{overlay:{position:"fixed",display:"flex",top:0,left:0,right:0,bottom:0,backgroundColor:"rgba(3, 6, 60, 0.7)",zIndex:9999,padding:"60px 15px"},content:{position:"static",width:"900px",margin:"auto",border:"0px solid #5414D0",overflow:"auto",WebkitOverflowScrolling:"touch",borderRadius:"4px",outline:"none",padding:"15px"}}},t().createElement(t().Fragment,null,ae.length>0&&t().createElement(t().Fragment,null,t().createElement("div",{className:"wprf-modal-preview-header"},t().createElement("span",null,(0,ce.__)("Custom Notification Preview","notificationx")),t().createElement("button",{onClick:function(){return P(!1)}},t().createElement(Ai,null))),t().createElement("div",{className:"wprf-modal-table-wrapper"},t().createElement("table",{className:"table table-striped"},t().createElement("thead",null,t().createElement("tr",null,ae.map((function(e){return t().createElement("th",{key:e},e)})))),t().createElement("tbody",null,de&&de.map((function(e,n){return t().createElement("tr",{key:n},ae.map((function(n){var r=e[n];return"timestamp"===n&&r?t().createElement("td",{key:n},new Date(r).toLocaleDateString(void 0,{year:"numeric",month:"long",day:"numeric",hour:"2-digit",minute:"2-digit",second:"2-digit"})):"image"===n&&r?t().createElement("td",{key:n,className:"wprf-preview-img"},t().createElement("div",{className:"image-container"},t().createElement("img",{src:null==r?void 0:r.url,style:{maxWidth:"100px",height:"auto"},className:"image"}),t().createElement("div",{className:"popup-image"},t().createElement("img",{src:null==r?void 0:r.url})))):"object"===(0,Kn.A)(r)&&null!==r?t().createElement("td",{key:n},JSON.stringify(r)):t().createElement("td",{key:n},void 0!==r?r:"")})))}))))),t().createElement("div",{className:"wprf-modal-preview-footer"},t().createElement("div",{className:"items-per-page-wrapper"},t().createElement(Pt.SelectControl,{className:"items-per-page",value:U.toString(),options:[{label:"5",value:"5"},{label:"10",value:"10"},{label:"15",value:"15"},{label:"20",value:"20"}],onChange:function(e){return function(e){H(parseInt(e)),B(1)}(e)}}),t().createElement("label",null,(0,ce.__)("Items Per Page","notificationx"))),t().createElement("div",{className:"pagination-wrapper"},t().createElement("div",{className:"pagination-info"},"".concat(ue," - ").concat(pe," of ").concat(ee," items")),t().createElement(or,{current:R,total:ee,pageSize:U,onChange:function(e){B(e)},locale:ir})))))))};var Hi=function(){return Hi=Object.assign||function(e){for(var t,n=1,r=arguments.length;n",i[1]&&(n[r]+="".concat(i[1],"")),i[2]&&(n[r]+="".concat(i[2],"")),n[r]+="")}else n[r]="".concat(n[r],"")}switch(e.themes){case"donation_theme-one":case"donation_theme-two":case"donation_theme-three":case"donation_theme-four":case"donation_theme-five":return["".concat(null==n?void 0:n.first_param," ").concat(null==n?void 0:n.second_param," ").concat(null==n?void 0:n.third_param),"".concat(null==n?void 0:n.fourth_param),"".concat(null==n?void 0:n.fifth_param)];case"donation_conv-theme-seven":case"donation_conv-theme-eight":case"donation_conv-theme-nine":return["".concat(null==n?void 0:n.first_param," ").concat(null==n?void 0:n.second_param),"in ".concat(null==n?void 0:n.third_param," ").concat(null==n?void 0:n.fourth_param)];case"google_reviews_maps_theme":return["".concat(null==n?void 0:n.first_param," ").concat(null==n?void 0:n.second_param),"".concat(null==n?void 0:n.third_param),"".concat(null==n?void 0:n.fourth_param)];case"woocommerce_sales_inline_conv-theme-seven":case"woo_inline_conv-theme-seven":return["".concat(null==n?void 0:n.first_param," ").concat(null==n?void 0:n.second_param," ").concat(null==n?void 0:n.third_param," ").concat(null==n?void 0:n.fourth_param)];case"youtube_channel-1":return["".concat(null==n?void 0:n.second_param," ").concat(null==n?void 0:n.third_param," ").concat(null==n?void 0:n.yt_third_label),"".concat(null==n?void 0:n.fourth_param," ").concat(null==n?void 0:n.yt_fourth_label," ").concat(null==n?void 0:n.fifth_param," ").concat(null==n?void 0:n.yt_fifth_label)];case"youtube_channel-2":return["".concat(null==n?void 0:n.second_param," ").concat(null==n?void 0:n.third_param," ").concat(null==n?void 0:n.yt_third_label),"".concat(null==n?void 0:n.fourth_param," ").concat(null==n?void 0:n.fifth_param)];case"youtube_video-1":case"youtube_video-3":return["".concat(null==n?void 0:n.second_param),"".concat(null==n?void 0:n.third_param," ").concat(null==n?void 0:n.fourth_param," ").concat(null==n?void 0:n.fifth_param)];case"youtube_video-2":case"youtube_video-4":return["".concat(null==n?void 0:n.second_param),"".concat(null==n?void 0:n.third_param," ").concat(null==n?void 0:n.yt_third_label," ").concat(null==n?void 0:n.fourth_param," ").concat(null==n?void 0:n.yt_fourth_label," ").concat(null==n?void 0:n.fifth_param," ").concat(null==n?void 0:n.yt_fifth_label)];case"announcements_theme-1":case"announcements_theme-2":case"announcements_theme-12":case"announcements_theme-14":return["".concat(null==n?void 0:n.first_param),"".concat(null==n?void 0:n.third_param),"".concat(null==n?void 0:n.fourth_param)];case"announcements_theme-13":return["".concat(null==n?void 0:n.first_param)];case"announcements_theme-15":return["".concat(null==n?void 0:n.first_param),"".concat(null==n?void 0:n.third_param)]}if("freemius_conversions"===e.source)switch(t){case"theme-one":case"theme-two":case"theme-three":case"theme-four":case"theme-five":return["".concat(null==n?void 0:n.first_param," ").concat(null==n?void 0:n.second_param),"".concat(null==n?void 0:n.third_param," ").concat(null==n?void 0:n.freemius_fifth_param," ").concat(null==n?void 0:n.fifth_param," ").concat(null==n?void 0:n.freemius_sixth_param," ").concat(null==n?void 0:n.freemius_seventh_param),"".concat(null==n?void 0:n.fourth_param)];case"conv-theme-ten":case"conv-theme-eleven":return["".concat(null==n?void 0:n.first_param," ").concat(null==n?void 0:n.second_param),"".concat(null==n?void 0:n.third_param," ").concat(null==n?void 0:n.freemius_fifth_param," ").concat(null==n?void 0:n.freemius_sixth_param," ").concat(null==n?void 0:n.freemius_seventh_param),"".concat(null==n?void 0:n.fourth_param)];case"conv-theme-six":return["".concat(null==n?void 0:n.first_param," ").concat(null==n?void 0:n.second_param," ").concat(null==n?void 0:n.third_param),"".concat(null==n?void 0:n.map_fourth_param," ").concat(null==n?void 0:n.fourth_param," ").concat(null==n?void 0:n.freemius_fifth_param," ").concat(null==n?void 0:n.freemius_sixth_param," ").concat(null==n?void 0:n.freemius_seventh_param),"".concat(null==n?void 0:n.fifth_param)];case"conv-theme-seven":case"conv-theme-eight":case"conv-theme-nine":return["".concat(null==n?void 0:n.first_param," ").concat(null==n?void 0:n.second_param),"".concat(null==n?void 0:n.third_param," ").concat(null==n?void 0:n.fourth_param," ").concat(null==n?void 0:n.freemius_fifth_param," ").concat(null==n?void 0:n.freemius_sixth_param," ").concat(null==n?void 0:n.freemius_seventh_param)]}switch(t){case"theme-one":case"theme-two":case"theme-three":case"theme-four":case"theme-five":case"conv-theme-ten":case"conv-theme-eleven":return["".concat(null==n?void 0:n.first_param," ").concat(null==n?void 0:n.second_param),"".concat(null==n?void 0:n.third_param),"".concat(null==n?void 0:n.fourth_param)];case"conv-theme-six":return["".concat(null==n?void 0:n.first_param," ").concat(null==n?void 0:n.second_param," ").concat(null==n?void 0:n.third_param),"".concat(null==n?void 0:n.map_fourth_param," ").concat(null==n?void 0:n.fourth_param),"".concat(null==n?void 0:n.fifth_param)];case"conv-theme-seven":case"conv-theme-eight":case"conv-theme-nine":return["".concat(null==n?void 0:n.first_param," ").concat(null==n?void 0:n.second_param),"".concat(null==n?void 0:n.third_param," ").concat(null==n?void 0:n.fourth_param)];case"theme-six-free":case"theme-seven-free":case"theme-eight-free":case"review-comment":case"review-comment-2":case"review-comment-3":case"total-rated":case"reviewed":return["".concat(null==n?void 0:n.first_param," ").concat(null==n?void 0:n.second_param," "),"".concat(null==n?void 0:n.third_param),"".concat(null==n?void 0:n.fourth_param)];case"review_saying":return["".concat(null==n?void 0:n.first_param," ").concat(null==n?void 0:n.second_param," ").concat(null==n?void 0:n.third_param," ").concat(null==n?void 0:n.review_fourth_param),"".concat(null==n?void 0:n.fifth_param),"".concat(null==n?void 0:n.sixth_param)];case"today-download":case"7day-download":case"total-download":return["".concat(null==n?void 0:n.first_param," "),"".concat(null==n?void 0:n.second_param," ").concat(null==n?void 0:n.third_param),"".concat(null==n?void 0:n.fourth_param)];case"actively_using":return["".concat(null==n?void 0:n.first_param," ").concat(null==n?void 0:n.second_param," "),"".concat(null==n?void 0:n.third_param)];case"maps_theme":return["".concat(null==n?void 0:n.first_param," ").concat(null==n?void 0:n.second_param," ").concat(null==n?void 0:n.third_param," ").concat(null==n?void 0:n.map_fourth_param),"".concat(null==n?void 0:n.fourth_param),"".concat(null==n?void 0:n.fifth_param)];case"pa-theme-one":return["".concat(null==n?void 0:n.first_param),"".concat(null==n?void 0:n.second_param," ").concat(null==n?void 0:n.third_param," ").concat(null==n?void 0:n.ga_fourth_param," ").concat(null==n?void 0:n.ga_fifth_param," ").concat(null==n?void 0:n.sixth_param)];case"pa-theme-two":return["".concat(null==n?void 0:n.first_param," ").concat(null==n?void 0:n.second_param),"".concat(null==n?void 0:n.third_param," ").concat(null==n?void 0:n.ga_fourth_param," ").concat(null==n?void 0:n.ga_fifth_param," ").concat(null==n?void 0:n.sixth_param)];case"pa-theme-three":return["".concat(null==n?void 0:n.first_param," ").concat(null==n?void 0:n.second_param),"".concat(null==n?void 0:n.third_param," ").concat(null==n?void 0:n.ga_fourth_param)];case"pa-theme-four":return["".concat(null==n?void 0:n.first_param," ").concat(null==n?void 0:n.second_param," ").concat(null==n?void 0:n.third_param),"".concat(null==n?void 0:n.pa_fourth_param),"".concat(null==n?void 0:n.sixth_param)];case"stock-theme-one":case"stock-theme-two":return["".concat(null==n?void 0:n.second_param," ").concat(null==n?void 0:n.third_param," ").concat(null==n?void 0:n.fourth_param," ").concat(null==n?void 0:n.fifth_param)];default:return console.error("Please select a theme",e),["".concat(null==n?void 0:n.first_param," ").concat(null==n?void 0:n.second_param),"".concat(null==n?void 0:n.third_param),"".concat(null==n?void 0:n.fourth_param)]}}));var lo=function(){return lo=Object.assign||function(e){for(var t,n=1,r=arguments.length;n0){var n=g.filter((function(e){return null==e?void 0:e.options})).map((function(e){return null==e?void 0:e.options})).flat();h(n)}}),[null===(r=null==g?void 0:g[0])||void 0===r?void 0:r.options]),(0,e.useEffect)((function(){var e=xo()((0,wo.convertToRaw)(u.getCurrentContent()));n.onChange({target:{type:"advanced-template",value:e,name:n.name}})}),[u]);var v=function(e){var t,n=u.getCurrentContent(),r=u.getSelection(),o=wo.EditorState.createEmpty();t=r.isCollapsed()?wo.Modifier.insertText(n,r,"{{".concat(e,"}}")):wo.Modifier.replaceText(n,r,"{{".concat(e,"}}")),o=wo.EditorState.push(u,t,"insert-fragment"),p(o),setTimeout((function(){l.current.editor.focus()}),300)};return(0,e.useEffect)((function(){var e,t,n;if(!(null===(e=s.savedValues)||void 0===e?void 0:e.advanced_template)){var r=s.values.themes,i=So({},s.values);if("page_analytics_pa-theme-two"==r||"page_analytics_pa-theme-one"==r){var a=null===(t=i["notification-template"].ga_fifth_param)||void 0===t?void 0:t.trim(),l=null===(n=i["notification-template"].sixth_param)||void 0===n?void 0:n.replace("tag_",""),c="{{".concat(l,":").concat(a,"}}");i=So(So({},i),{"notification-template":So(So({},i["notification-template"]),{ga_fifth_param:c,sixth_param:""})})}var u=(0,o.applyFilters)("nx_adv_template_default",i),f=Co()(u.map((function(e){return"

".concat(e,"

")})).join("\r\n")),d=f.contentBlocks,h=f.entityMap,m=wo.ContentState.createFromBlockArray(d,h),g=wo.EditorState.createWithContent(m);p(g)}}),[s.values.themes,s.values["notification-template"]]),t().createElement(t().Fragment,null,t().createElement(bo.Editor,{ref:l,toolbar:ko,editorState:u,toolbarClassName:"wprf-editor-toolbar",wrapperClassName:"wprf-editor wprf-control",editorClassName:"wprf-editor-main",onEditorStateChange:p,handleBeforeInput:function(e,t,n){if((0,wo.convertToRaw)(t.getCurrentContent()).blocks.length>3)return"handled"},handleReturn:function(e,t){if((0,wo.convertToRaw)(t.getCurrentContent()).blocks.length>=3)return e.preventDefault(),e.stopPropagation(),"handled"},handlePastedText:function(e,t,n){if((0,wo.convertToRaw)(n.getCurrentContent()).blocks.length+e.split(/\r\n|\r|\n/).length>4)return!0}}),(null===(i=null==n?void 0:n.sales_count_themes)||void 0===i?void 0:i.includes(s.values.themes))&&t().createElement("div",{className:"template-example"},t().createElement("span",{className:"advance-template-label"},"Example: "," "),t().createElement("code",null,"{{title}} {{7days}}"),t().createElement("span",{className:"advance-template-doc"}," or "),t().createElement("code",null,"{{title}} in last {{day:7}}"),t().createElement("span",{className:"advance-template-doc"},". "," ","For more information check out this ",t().createElement("a",{href:"https://notificationx.com/docs/notificationx-advanced-template/",target:"_blank"},"doc"),".")),("page_analytics_pa-theme-one"==s.values.themes||"page_analytics_pa-theme-two"==s.values.themes)&&t().createElement("div",{className:"template-example"},t().createElement("span",{className:"advance-template-label"},"Example: "," "),t().createElement("code",null,"in last {{day:7}}"),t().createElement("span",{className:"advance-template-doc"},". "," ","For more information check out this ",t().createElement("a",{href:"https://notificationx.com/docs/notificationx-advanced-template/",target:"_blank"},"doc"),".")),t().createElement("br",null),t().createElement("div",{className:"template-options"},t().createElement("span",{className:"advance-template-label"},"Variables:"),s.eligibleOptions(d).map((function(e,n){if("tag_day"!=e.value&&"tag_month"!=e.value&&"tag_year"!=e.value&&"tag_custom"!=e.value&&"select_a_tag"!=e.value){var r=e.value.replace("tag_",""),o=e.label,i="elementor_form"===s.values.source&&r.includes("el_");return t().createElement(t().Fragment,{key:n},t().createElement("span",{className:"button button-secondary",title:i?"{{".concat(r,"}}"):o,onClick:function(){return v(r)}},i?o:"{{".concat(r,"}}")))}})),(null===(a=null==n?void 0:n.sales_count_themes)||void 0===a?void 0:a.includes(s.values.themes))&&t().createElement(t().Fragment,{key:":days"},t().createElement("span",{className:"button button-secondary",title:"7 days",onClick:function(){return v("day:7")}},"{{day:7}}")),("page_analytics_pa-theme-one"==s.values.themes||"page_analytics_pa-theme-two"==s.values.themes)&&t().createElement(t().Fragment,null,t().createElement(t().Fragment,{key:"day"},t().createElement("span",{className:"button button-secondary",title:"{{day:7}}",onClick:function(){return v("day:7")}},"{{day:7}}")),t().createElement(t().Fragment,{key:"month"},t().createElement("span",{className:"button button-secondary",title:"{{month:7}}",onClick:function(){return v("month:7")}},"{{month:7}}")),t().createElement(t().Fragment,{key:"year"},t().createElement("span",{className:"button button-secondary",title:"{{year:7}}",onClick:function(){return v("year:7")}},"{{year:7}}")))))};var jo;function Do(){return Do=Object.assign?Object.assign.bind():function(e){for(var t=1;t{let t={};e.forEach(((e,n)=>t[e]=n))})(Fo),String.fromCharCode.bind(String)),Ho=("function"==typeof Uint8Array.from&&Uint8Array.from.bind(Uint8Array),e=>e.replace(/=/g,"").replace(/[+\/]/g,(e=>"+"==e?"-":"_"))),Vo="function"==typeof btoa?e=>btoa(e):Ro?e=>Buffer.from(e,"binary").toString("base64"):e=>{let t,n,r,o,i="";const a=e.length%3;for(let a=0;a255||(r=e.charCodeAt(a++))>255||(o=e.charCodeAt(a++))>255)throw new TypeError("invalid character found");t=n<<16|r<<8|o,i+=Fo[t>>18&63]+Fo[t>>12&63]+Fo[t>>6&63]+Fo[63&t]}return a?i.slice(0,a-3)+"===".substring(a):i},Ko=Ro?e=>Buffer.from(e).toString("base64"):e=>{let t=[];for(let n=0,r=e.length;n{if(e.length<2)return(t=e.charCodeAt(0))<128?e:t<2048?Uo(192|t>>>6)+Uo(128|63&t):Uo(224|t>>>12&15)+Uo(128|t>>>6&63)+Uo(128|63&t);var t=65536+1024*(e.charCodeAt(0)-55296)+(e.charCodeAt(1)-56320);return Uo(240|t>>>18&7)+Uo(128|t>>>12&63)+Uo(128|t>>>6&63)+Uo(128|63&t)},Wo=/[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g,qo=Ro?e=>Buffer.from(e,"utf8").toString("base64"):Bo?e=>Ko(Bo.encode(e)):e=>Vo(e.replace(Wo,Yo)),Zo=(e,t=!1)=>t?Ho(qo(e)):qo(e);var Qo=function(){return Qo=Object.assign||function(e){for(var t,n=1,r=arguments.length;n0&&o[o.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]'),confirmButtonText:(0,ce.__)("Close","notificationx"),customClass:{container:"nx-csv-modal-ift-container",popup:"nx-csv-modal-ift-popup",actions:"nx-delete-actions nx-csv-invalid-file-type"},confirmedCallback:function(){},completeAction:function(e){},completeArgs:function(){},afterComplete:function(){}}),[2];n.label=1;case 1:return n.trys.push([1,3,,4]),[4,(r=e.url,new Promise((function(e,t){var n=new URL(r,window.location.href);"https:"===window.location.protocol&&"https:"!==n.protocol&&(n.protocol="https:");var o=new XMLHttpRequest;o.open("GET",n.toString(),!0),o.responseType="blob",o.onload=function(){if(200===o.status){var n=new FileReader;n.onload=function(t){var n,r=(null===(n=t.target)||void 0===n?void 0:n.result).split("\n");e(r.length)},n.onerror=function(){return t(new Error("Error reading CSV file."))},n.readAsText(o.response)}else t(new Error("Error fetching CSV file."))},o.onerror=function(){return t(new Error("Error fetching CSV file."))},o.send()})))];case 2:return n.sent()>101?be().fire({title:(0,ce.__)("Import Limit Exceeded.","notificationx"),html:(0,ce.__)('Your file contains more than 100 rows. Only the first 100 rows will be imported. Click "Continue" to proceed or "Cancel" to abort.',"notificationx"),iconHtml:'NotificationX'),showDenyButton:!0,iconColor:"transparent",confirmButtonText:(0,ce.__)("Continue","notificationx"),denyButtonText:(0,ce.__)("Cancel","notificationx"),reverseButtons:!0,customClass:{container:"nx-csv-modal-import-limit-container",popup:"nx-csv-modal-import-limit-popup",actions:"nx-delete-actions nx-csv-import-limit"},allowOutsideClick:!1}).then((function(t){t.isConfirmed?(i({id:e.id,title:null==e?void 0:e.filename,url:e.url}),d(!0)):t.isDenied&&(i(null),d(!1))})):(i({id:e.id,title:null==e?void 0:e.filename,url:e.url}),d(!0)),[3,4];case 3:return t=n.sent(),console.error("Error processing the CSV file:",t),d(!1),[3,4];case 4:return[2]}var r}))},new((r=void 0)||(r=Promise))((function(e,i){function a(e){try{l(o.next(e))}catch(e){i(e)}}function s(e){try{l(o.throw(e))}catch(e){i(e)}}function l(t){var n;t.done?e(t.value):(n=t.value,n instanceof r?n:new r((function(e){e(n)}))).then(a,s)}l((o=o.apply(t,n||[])).next())}));var t,n,r,o}(e)},multiple:!1,value:o,render:function(e){var r=e.open;return t().createElement(t().Fragment,null,t().createElement("button",{className:"wprf-btn wprf-csv-upload-btn",onClick:r},c?t().createElement(di,null):t().createElement(fi,null)," ",null!=o?(null==n?void 0:n.reset)||(0,ce.__)("Upload","notificationx"):(null==n?void 0:n.button)||"Upload"),(null==o?void 0:o.title)&&t().createElement("span",null,null==o?void 0:o.title),t().createElement("a",{className:"wprf-btn wprf-btn-sample-csv",href:"".concat(s.assets.admin,"sample_data.csv"),download:!0},t().createElement(hi,null)," ",(0,ce.__)("Sample CSV","notificationx")))}})))}));var gi,vi=a(5901),yi=new Uint8Array(16);function bi(){if(!gi&&!(gi="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto)))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return gi(yi)}const wi=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;for(var _i=[],xi=0;xi<256;++xi)_i.push((xi+256).toString(16).substr(1));const Ei=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=(_i[e[t+0]]+_i[e[t+1]]+_i[e[t+2]]+_i[e[t+3]]+"-"+_i[e[t+4]]+_i[e[t+5]]+"-"+_i[e[t+6]]+_i[e[t+7]]+"-"+_i[e[t+8]]+_i[e[t+9]]+"-"+_i[e[t+10]]+_i[e[t+11]]+_i[e[t+12]]+_i[e[t+13]]+_i[e[t+14]]+_i[e[t+15]]).toLowerCase();if(!function(e){return"string"==typeof e&&wi.test(e)}(n))throw TypeError("Stringified UUID is invalid");return n},Ci=function(e,t,n){var r=(e=e||{}).random||(e.rng||bi)();if(r[6]=15&r[6]|64,r[8]=63&r[8]|128,t){n=n||0;for(var o=0;o<16;++o)t[n+o]=r[o];return t}return Ei(r)},Si=window.wp.compose,Oi=function(){return t().createElement("svg",{width:"16",height:"16",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},t().createElement("path",{d:"M16.875 4.68408H15V2.80908C15 1.77783 14.1562 0.934082 13.125 0.934082H3.125C2.09375 0.934082 1.25 1.77783 1.25 2.80908V12.8091C1.25 13.8403 2.09375 14.6841 3.125 14.6841H5V16.5591C5 17.5903 5.84375 18.4341 6.875 18.4341H16.875C17.9062 18.4341 18.75 17.5903 18.75 16.5591V6.55908C18.75 5.52783 17.9062 4.68408 16.875 4.68408ZM3.125 13.4341C2.78125 13.4341 2.5 13.1528 2.5 12.8091V2.80908C2.5 2.46533 2.78125 2.18408 3.125 2.18408H13.125C13.4688 2.18408 13.75 2.46533 13.75 2.80908V4.68408H6.875C5.84375 4.68408 5 5.52783 5 6.55908V13.4341H3.125ZM17.5 16.5591C17.5 16.9028 17.2188 17.1841 16.875 17.1841H6.875C6.53125 17.1841 6.25 16.9028 6.25 16.5591V6.55908C6.25 6.21533 6.53125 5.93408 6.875 5.93408H16.875C17.2188 5.93408 17.5 6.21533 17.5 6.55908V16.5591Z",fill:"#7C8DB5"}))},ki=function(){return t().createElement("svg",{width:"16",height:"16",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},t().createElement("path",{d:"M2.5 4.68408H4.16667H17.5",stroke:"#7C8DB5","stroke-linecap":"round","stroke-linejoin":"round"}),t().createElement("path",{d:"M15.8327 4.68392V16.3506C15.8327 16.7926 15.6571 17.2165 15.3445 17.5291C15.032 17.8417 14.608 18.0173 14.166 18.0173H5.83268C5.39065 18.0173 4.96673 17.8417 4.65417 17.5291C4.34161 17.2165 4.16602 16.7926 4.16602 16.3506V4.68392M6.66602 4.68392V3.01725C6.66602 2.57523 6.84161 2.1513 7.15417 1.83874C7.46673 1.52618 7.89065 1.35059 8.33268 1.35059H11.666C12.108 1.35059 12.532 1.52618 12.8445 1.83874C13.1571 2.1513 13.3327 2.57523 13.3327 3.01725V4.68392",stroke:"#7C8DB5","stroke-linecap":"round","stroke-linejoin":"round"}),t().createElement("path",{d:"M8.33398 8.85059V13.8506",stroke:"#7C8DB5","stroke-linecap":"round","stroke-linejoin":"round"}),t().createElement("path",{d:"M11.666 8.85059V13.8506",stroke:"#7C8DB5","stroke-linecap":"round","stroke-linejoin":"round"}))};var Mi=function(){return Mi=Object.assign||function(e){for(var t,n=1,r=arguments.length;n0){var n=(null==t?void 0:t[e])||{};(null==n?void 0:n.title)&&(n=Bi(Bi({},n),{title:n.title+" - Copy"})),(null==n?void 0:n.post_title)&&(n=Bi(Bi({},n),{post_title:n.post_title+" - Copy"})),(null==n?void 0:n.username)&&(n=Bi(Bi({},n),{username:n.username+" - Copy"})),(null==n?void 0:n.plugin_theme_name)&&(n=Bi(Bi({},n),{plugin_theme_name:n.plugin_theme_name+" - Copy"})),n=Bi(Bi({},n),{index:Ci(),isCollapsed:!1}),w.setFieldValue([l,null==j?void 0:j.length],n)}}),[j]),G=(0,e.useMemo)((function(){return _t(j||[],m)}),[j,m]),X=function(e,t){!function(e,t){e.persist&&e.persist();var n=(0,gt.executeChange)(e),r=n.field,o=n.val;w.setFieldValue([l,t,r],o)}(e,t)},J=function(e){var t=Fi([],y,!0),n=t.indexOf(e);n>-1?t.splice(n,1):t.push(e),b(t)},$=function(e){C(E===e?null:e)},ee=(null==j?void 0:j.length)||0,te=(f-1)*m+1,ne=Math.min(f*m,ee),re=G[f-1]||[],oe=["index","chosen","selected","isCollapsed","iscollapsed","id"],ie=["first_name","last_name","post_title","timestamp","image"],ae=function(e,t,n,r){void 0===r&&(r=["email","image","link"]);var o=n.eligibleOptions(t).map((function(e){return e.value.replace(/^tag_/,"")})),i=new Set(o),a=e.filter((function(e){return i.has(e)}));return Fi(Fi([],a,!0),r,!0)}((0,e.useMemo)((function(){if((null==j?void 0:j.length)>0){var e=Object.keys(j[0]).filter((function(e){return!oe.includes(e)})),t=ie.filter((function(t){return e.includes(t)})),n=e.filter((function(e){return!ie.includes(e)}));return Fi(Fi(Fi([],t.slice(0,3),!0),n,!0),t.slice(3),!0)}return[]}),[j,oe,ie]),O,w),se=(0,e.useMemo)((function(){return null==j?void 0:j.filter((function(e){return y.includes(e.index)}))}),[y]),le=(0,e.useMemo)((function(){return _t(j||[],U)}),[j,U]),ue=(R-1)*U+1,pe=Math.min(R*U,ee),de=le[R-1]||[],he=null===(a=null===(i=null==_?void 0:_.state)||void 0===i?void 0:i.csv_upload_loader)||void 0===a?void 0:a.csv_upload_loader;return(0,e.useEffect)((function(){var e,t;if((null===(t=null===(e=null==u?void 0:u[0])||void 0===e?void 0:e.options)||void 0===t?void 0:t.length)>0){var n=u.filter((function(e){return null==e?void 0:e.options})).map((function(e){return null==e?void 0:e.options})).flat();k(n)}}),[null===(s=null==u?void 0:u[0])||void 0===s?void 0:s.options]),t().createElement("div",{className:"wprf-repeater-control wprf-advanced-repeater-control ".concat("loading")},he&&t().createElement("div",{className:"loader-wrapper"},t().createElement("img",{src:"".concat(_.assets.admin,"images/logos/logo-preloader.gif")})),t().createElement("div",{className:"wprf-advanced-repeater-heading"},t().createElement("span",null,(0,ce.__)("Custom Notification")),t().createElement("div",{className:"wprf-advanced-repeater-header-action"},(null==j?void 0:j.length)>9&&t().createElement("button",{className:"wprf-repeater-button preview",onClick:function(){return P(!0)}},t().createElement(Li,null)," ",(0,ce.__)("Preview","notificationx")),t().createElement("button",{className:"wprf-repeater-button add-new",onClick:function(){return w.setFieldValue(l,Fi(Fi([],j,!0),[{index:Ci()}],!1))},disabled:ee>=100},t().createElement(Pi,null)," ",t().createElement("span",null," ",null==c?void 0:c.label)))),t().createElement("div",{className:"wprf-advanced-repeater-header"},(null==re?void 0:re.length)>0&&t().createElement("div",{className:"nx-all-selector"},t().createElement("input",{id:"nx-advanced-repeater-all-checkbox",type:"checkbox",checked:(null==re?void 0:re.length)==(null==se?void 0:se.length),onChange:function(e){return function(e){if(e.target.checked){var t=re.map((function(e){return e.index}));b(t)}else b([])}(e)}}),t().createElement("label",{htmlFor:"nx-advanced-repeater-all-checkbox"},(0,ce.__)("Select All","notificationx"))),ee>1&&t().createElement("div",{className:"wprf-repeater-label"},t().createElement("div",{className:"change-time"},t().createElement("button",{disabled:void 0===se||(null==se?void 0:se.length)<2,className:"wprf-repeater-button",onClick:function(){return Y(!K)}},t().createElement(Ii,null)," ",t().createElement("span",null," ",(0,ce.__)("Change Time","notificationx")," ")),K&&t().createElement(Ri,{handleChangeTime:function(e,t){if(e&&t){var n=new Date(e),r=new Date(t);if(n&&r){var o=j.map((function(e){return y.includes(e.index)?Bi(Bi({},e),{timestamp:(t=n,o=r,new Date(t.getTime()+Math.random()*(o.getTime()-t.getTime()))).toISOString(),selected:!0}):e;var t,o}));D(o),w.setFieldValue(l,o),Y(!1),ct((0,ce.__)("Selected custom notification Time updated successfully!","notificationx"))}}},setChangeTimeToggle:Y})),t().createElement("button",{className:"wprf-repeater-button bulk-edit",onClick:function(){return I(!0)},disabled:void 0===se||(null==se?void 0:se.length)<2},t().createElement(Ii,null)," ",t().createElement("span",null,(0,ce.__)("Edit","notificationx"))),t().createElement("button",{className:"wprf-repeater-button bulk-delete",onClick:function(){be().fire({title:(0,ce.__)("Are you sure?","notificationx"),text:(0,ce.__)("Do you really want to delete the selected items? This process cannot be undone.","notificationx"),icon:"error",showCancelButton:!0,confirmButtonText:(0,ce.__)("Yes, Delete Them","notificationx"),cancelButtonText:(0,ce.__)("No, Keep Them","notificationx"),customClass:{actions:"nx-delete-actions nx-bulk-delete-actions"}}).then((function(e){if(e.isConfirmed){var t=j.filter((function(e){return!y.includes(e.index)}));w.setFieldValue(l,t),b([])}}))},disabled:void 0===se||(null==se?void 0:se.length)<2},t().createElement(Ti,null)," ",t().createElement("span",null,(0,ce.__)("Delete","notificationx"))))),j&&j.length>0&&t().createElement(t().Fragment,null,t().createElement(vi.ReactSortable,{className:"wprf-repeater-content wprf-advanced-repeater-content",list:j,setList:function(e){w.setFieldValue(l,e)},handle:".wprf-repeater-field-title",filter:".wprf-repeater-field-controls",forceFallback:!0},re.map((function(e,n){return t().createElement(ji,{isCollapsed:E!==(null==e?void 0:e.index)&&1!=re.length,key:(null==e?void 0:e.index)||n+(f-1)*m,fields:u,index:n+(f-1)*m,__index:null==e?void 0:e.index,parent:l,clone:Q,remove:Z,checked:-1!=y.findIndex((function(t){return t==e.index})),onChange:function(e){return X(e,n+(f-1)*m)},onChecked:J,setIsCollapsed:$})}))),t().createElement("div",{className:"nx-admin-items-footer"},t().createElement("div",{className:"items-per-page-wrapper"},t().createElement(Pt.SelectControl,{options:[{value:"5",label:(0,ce.__)("5")},{value:"10",label:(0,ce.__)("10")},{value:"20",label:(0,ce.__)("20")},{value:"50",label:(0,ce.__)("50")},{value:"100",label:(0,ce.__)("100")},{value:"500",label:(0,ce.__)("500")}],value:m.toString(),onChange:function(e){return function(e){g(parseInt(e)),d(1)}(e)}}),t().createElement("label",{htmlFor:""},(0,ce.__)("Items Per Page"))),t().createElement("div",{className:"pagination-wrapper"},t().createElement("div",{className:"pagination-info"},"Displaying ".concat(te,"-").concat(ne," of ").concat(ee)),t().createElement(or,{current:f,onChange:function(e){d(e),b([])},total:j.length,pageSize:m,showTitle:!1,locale:ir})))),t().createElement(Nr(),{isOpen:A,onRequestClose:function(){return I(!1)},ariaHideApp:!1,overlayClassName:"nx-custom-notification-edit",style:{overlay:{position:"fixed",display:"flex",top:0,left:0,right:0,bottom:0,backgroundColor:"rgba(3, 6, 60, 0.7)",zIndex:9999,padding:"60px 15px"},content:{position:"static",width:"900px",margin:"auto",border:"0px solid #5414D0",overflow:"auto",WebkitOverflowScrolling:"touch",borderRadius:"4px",outline:"none",padding:"15px"}}},t().createElement(t().Fragment,null,t().createElement("div",{className:"wprf-modal-preview-header"},t().createElement("span",null,(0,ce.__)("Edit","notificationx")),t().createElement("button",{onClick:function(){return I(!1)}},t().createElement(Ai,null))),t().createElement("div",{className:"wprf-modal-table-wrapper wpsp-bulk-edit-fields"},se&&se.map((function(e,n){return t().createElement(Ni,{isCollapsed:!0,key:null==e?void 0:e.index,fields:u,index:j.findIndex((function(t){return t.index==(null==e?void 0:e.index)})),__index:null==e?void 0:e.index,parent:l,remove:Z,onChange:function(t){return X(t,j.findIndex((function(t){return t.index==(null==e?void 0:e.index)})))}})}))),t().createElement("div",{className:"wprf-modal-preview-footer"},t().createElement("button",{className:"wpsp-btn wpsp-btn-preview-update",onClick:function(){return I(!1)}},(0,ce.__)("Update","notificationx"))))),t().createElement(Nr(),{isOpen:L,onRequestClose:function(){return P(!1)},ariaHideApp:!1,overlayClassName:"nx-custom-notification-preview",style:{overlay:{position:"fixed",display:"flex",top:0,left:0,right:0,bottom:0,backgroundColor:"rgba(3, 6, 60, 0.7)",zIndex:9999,padding:"60px 15px"},content:{position:"static",width:"900px",margin:"auto",border:"0px solid #5414D0",overflow:"auto",WebkitOverflowScrolling:"touch",borderRadius:"4px",outline:"none",padding:"15px"}}},t().createElement(t().Fragment,null,ae.length>0&&t().createElement(t().Fragment,null,t().createElement("div",{className:"wprf-modal-preview-header"},t().createElement("span",null,(0,ce.__)("Custom Notification Preview","notificationx")),t().createElement("button",{onClick:function(){return P(!1)}},t().createElement(Ai,null))),t().createElement("div",{className:"wprf-modal-table-wrapper"},t().createElement("table",{className:"table table-striped"},t().createElement("thead",null,t().createElement("tr",null,ae.map((function(e){return t().createElement("th",{key:e},e)})))),t().createElement("tbody",null,de&&de.map((function(e,n){return t().createElement("tr",{key:n},ae.map((function(n){var r=e[n];return"timestamp"===n&&r?t().createElement("td",{key:n},new Date(r).toLocaleDateString(void 0,{year:"numeric",month:"long",day:"numeric",hour:"2-digit",minute:"2-digit",second:"2-digit"})):"image"===n&&r?t().createElement("td",{key:n,className:"wprf-preview-img"},t().createElement("div",{className:"image-container"},t().createElement("img",{src:null==r?void 0:r.url,style:{maxWidth:"100px",height:"auto"},className:"image"}),t().createElement("div",{className:"popup-image"},t().createElement("img",{src:null==r?void 0:r.url})))):"object"===(0,Kn.A)(r)&&null!==r?t().createElement("td",{key:n},JSON.stringify(r)):t().createElement("td",{key:n},void 0!==r?r:"")})))}))))),t().createElement("div",{className:"wprf-modal-preview-footer"},t().createElement("div",{className:"items-per-page-wrapper"},t().createElement(Pt.SelectControl,{className:"items-per-page",value:U.toString(),options:[{label:"5",value:"5"},{label:"10",value:"10"},{label:"15",value:"15"},{label:"20",value:"20"}],onChange:function(e){return function(e){H(parseInt(e)),B(1)}(e)}}),t().createElement("label",null,(0,ce.__)("Items Per Page","notificationx"))),t().createElement("div",{className:"pagination-wrapper"},t().createElement("div",{className:"pagination-info"},"".concat(ue," - ").concat(pe," of ").concat(ee," items")),t().createElement(or,{current:R,total:ee,pageSize:U,onChange:function(e){B(e)},locale:ir})))))))};var Hi=function(){return Hi=Object.assign||function(e){for(var t,n=1,r=arguments.length;n\n" "Language-Team: LANGUAGE \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"POT-Creation-Date: 2024-09-30T10:12:51+00:00\n" +"POT-Creation-Date: 2024-10-27T09:01:57+00:00\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "X-Generator: WP-CLI 2.8.1\n" "X-Domain: notificationx\n" @@ -82,11 +82,11 @@ msgstr "" msgid "Grab The Offer" msgstr "" -#: includes/Admin/Admin.php:325 +#: includes/Admin/Admin.php:347 msgid "Want to help make NotificationX even more awesome? You can get a 10% discount coupon for Premium extensions if you allow us to track the usage." msgstr "" -#: includes/Admin/Admin.php:326 +#: includes/Admin/Admin.php:348 msgid "" "We collect non-sensitive diagnostic data and plugin usage information.\n" "\t\t\tYour site URL, WordPress & PHP version, plugins & themes and email address to send you the\n" diff --git a/notificationx.php b/notificationx.php index 5d028a33..12bd5907 100755 --- a/notificationx.php +++ b/notificationx.php @@ -3,7 +3,7 @@ * Plugin Name: NotificationX * Plugin URI: https://notificationx.com * Description: Social Proof & Recent Sales Popup, Comment Notification, Subscription Notification, Notification Bar and many more. - * Version: 2.9.1 + * Version: 2.9.2 * Author: WPDeveloper * Author URI: https://wpdeveloper.com * License: GPL-3.0+ @@ -26,7 +26,7 @@ * Defines CONSTANTS for Whole plugins. */ define( 'NOTIFICATIONX_FILE', __FILE__ ); -define( 'NOTIFICATIONX_VERSION', '2.9.1' ); +define( 'NOTIFICATIONX_VERSION', '2.9.2' ); define( 'NOTIFICATIONX_URL', plugins_url( '/', __FILE__ ) ); define( 'NOTIFICATIONX_PATH', plugin_dir_path( __FILE__ ) ); define( 'NOTIFICATIONX_BASENAME', plugin_basename( __FILE__ ) ); diff --git a/package.json b/package.json index d3863488..0bc38647 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "notificationx", - "version": "2.9.1", + "version": "2.9.2", "main": "nxdev/index.js", "author": "WPDeveloper", "scripts": {