1"use strict";(self.webpackChunkmijnhost=self.webpackChunkmijnhost||[]).push([[2314],{655:function(t,e,n){var a=n(6955),o=String;t.exports=function(t){if("Symbol"===a(t))throw new TypeError("Cannot convert a Symbol value to a string");return o(t)}},2314:function(e,n,a){a.r(n),a(8335);var o=a(1669);n.default=()=>{const e=document.querySelector('[data-component="affiliate"]');if(e)switch(e.dataset.page||""){case"overview":!function(){let e;function n(){const n=o(".sales-chart-container");o(n).block({message:'<i class="fas fa-spinner fa-spin"></i>',overlayCSS:{backgroundColor:"#3e3f47",opacity:.8,cursor:"wait"},css:{border:0,padding:0,backgroundColor:"transparent"}});const a=o(".date-range").data("daterangepicker").startDate.format("YYYY-MM-DD"),s=o(".date-range").data("daterangepicker").endDate.format("YYYY-MM-DD");setTimeout(function(){const r=document.getElementById("sales-chart-area");o.ajax({type:"POST",dataType:"json",url:"/cp/modules/affiliate/json/load-statistics.php",data:{start_date:a,end_date:s},success(a){o(".clicks-count").html(a.totals.clicks),o(".sales-count").html(a.totals.sales),o(".earnings-count").html(a.totals.earnings);const s=new google.visualization.DataTable(a.data),i="dark"===document.documentElement.getAttribute("data-bs-theme")?"#e6ecf2":"#023E5A",c={fontName:"Lato",height:400,fontSize:14,areaOpacity:.25,chartArea:{left:"5%",width:"94%",height:350},pointSize:7,backgroundColor:"transparent",tooltip:{textStyle:{fontName:"Lato",fontSize:14}},vAxis:{title:t("Aantal"),titleTextStyle:{fontSize:15,italic:!1,color:i},textStyle:{color:i},baselineColor:"#697692",gridlines:{color:"#4b5975",count:0},minorGridlines:{color:"#3e495f"},gridarea:{count:10},minValue:0},hAxis:{textStyle:{color:i},format:"d MMM",gridlines:{color:"#e3e3e3"},minorGridlines:{color:"#e3e3e3"}},legend:{position:"top",alignment:"center",textStyle:{fontSize:14,color:i}},series:{0:{color:"#CDEDFC"},1:{color:"#FFAC24"}}};e=new google.visualization.AreaChart(r),e.draw(s,c),google.visualization.events.addListener(e,"ready",function(){o(n).unblock()})},error(){o(".sales-chart-container").hide()}})},200)}google.charts.load("current",{callback:function(){n();const t=document.querySelector(".sidebar-control");let e;t&&t.addEventListener("click",n),window.addEventListener("resize",function(){clearTimeout(e),e=setTimeout(function(){n()},200)})},packages:["corechart"]}),o("#select_date_sales").on("change",function(){n()}),moment.locale("nl");const a={};for(let t=0;t<4;t++)a[moment().subtract(t,"month").endOf("month").format("MMMM")]=[moment().subtract(t,"month").startOf("month"),moment().subtract(t,"month").endOf("month")];o(".date-range").daterangepicker({startDate:moment().startOf("month"),endDate:moment().endOf("month"),ranges:a,applyClass:"btn-sm btn-primary",cancelClass:"btn-sm btn-light",locale:{separator:" - ",applyLabel:"Bevestigen",fromLabel:"Van",toLabel:"Tot",daysOfWeek:["Zo","Ma","Di","Wo","Do","Vr","Za"],monthNames:["Januari","Februari","Maart","April","Mei","Juni","Juli","Augustus","September","Oktober","November","December"],firstDay:0,format:"DD-MM-YYYY",cancelLabel:"Wissen",customRangeLabel:"Zelf opgeven"}},function(e,a){o(".date-range span").html(`${e.format("DD-MM-YYYY")} ${t("tot")} ${a.format("DD-MM-YYYY")}`),n()}),o(".date-range span").html(`${moment().startOf("month").format("DD-MM-YYYY")} ${t("tot")} ${moment().endOf("month").format("DD-MM-YYYY")}`)}();break;case"settings":!function(){const n=JSON.parse(e.dataset.config||"{}");o("#settingsForm").bootstrapValidator(),o(document).on("click",'a[href*="affiliate-banners"]',function(){setTimeout(function(){"undefined"!=typeof topbar&&topbar.hide()},500)}),o("#btn_addition_conditions").click(function(t){t.preventDefault(),o(".addition_conditions").slideToggle()}),o("#sub_id").change(function(){o(".sub_id_container").toggle(),o(this).is(":checked")||(o("#explainer-modal input[name=code]").val(function(){return o(this).data("value")}),o("#sub_id_string").val(""))}),o(document).on("keyup","#sub_id_string",function(){const t=o(this).val();o("#explainer-modal input[name=code]").val(function(){return`${o(this).data("value")}&sid=${t}`})}),n.showWelcomeModal&&o("#welcome-modal").modal("show"),function(e){e.toastType&&e.toastMessage&&o.toast({heading:"success"===e.toastType?t("Succesvol"):t("Foutmelding"),text:e.toastMessage,position:"bottom-left",loaderBg:"#87888a",icon:e.toastType,hideAfter:6e3,stack:6})}(n)}();break;case"commissions":n(),o("#search-container").on("submit",function(t){t.preventDefault(),n()});break;case"payments":a(),o("#search-container").on("submit",function(t){t.preventDefault(),a()})}function n(){o(".commissions-table tbody").empty();const e=o("#input_search").val();o.ajax({type:"POST",dataType:"json",url:"/cp/modules/affiliate/json/load-commissions.php",data:{search_phrase:e},success(e){o(".invoice-count").html(e.details.count),o(".invoice-count-container").show(),e.details.count>0?o.each(e.details.commissions,function(t,e){o("#table.commissions-table tbody").append(`\n\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t<td>${e.date}</td>\n\t\t\t\t\t\t\t\t<td>${e.sub_id}</td>\n\t\t\t\t\t\t\t\t<td>${e.order_nr}</td>\n\t\t\t\t\t\t\t\t<td>€ ${e.sale_amount}</td>\n\t\t\t\t\t\t\t\t<td>€ ${e.commission_amount}</td>\n\t\t\t\t\t\t\t\t<td>${e.approved}</td>\n\t\t\t\t\t\t\t\t<td>${e.paidout}</td>\n\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t`)}):o("#table.commissions-table tbody").append(`<tr><td colspan="7">${t("Geen commissies gevonden")}</td></tr>`)},error(t){o(".status").addClass("bg-danger"),o(".status").removeClass("bg-success"),o(".status").html(o.parseJSON(t.responseText).status_description),o(".status").fadeIn(),setTimeout(function(){o(".status").fadeOut()},1e4)}})}function a(){o(".payments-table tbody").empty();const e=o("#input_search").val();o.ajax({type:"POST",dataType:"json",url:"/cp/modules/affiliate/json/load-payments.php",data:{search_phrase:e},success(e){o(".invoice-count").html(e.details.count),o(".invoice-count-container").show(),e.details.count>0?o.each(e.details.payments,function(t,e){o("#table.payments-table tbody").append(`\n\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t<td>${e.date}</td>\n\t\t\t\t\t\t\t\t<td>${e.payment_id}</td>\n\t\t\t\t\t\t\t\t<td>${e.invoice_nr}</td>\n\t\t\t\t\t\t\t\t<td>€ ${e.amount}</td>\n\t\t\t\t\t\t\t\t<td>${e.payment_status}</td>\n\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t`)}):o("#table.payments-table tbody").append(`<tr><td colspan="5">${t("Geen uitbetalingen gevonden")}</td></tr>`)},error(t){o(".status").addClass("bg-danger"),o(".status").removeClass("bg-success"),o(".status").html(o.parseJSON(t.responseText).status_description),o(".status").fadeIn(),setTimeout(function(){o(".status").fadeOut()},1e4)}})}}},8235:function(t,e,n){var a=n(9504),o=n(9297),s=SyntaxError,r=parseInt,i=String.fromCharCode,c=a("".charAt),u=a("".slice),d=a(/./.exec),l={'\\"':'"',"\\\\":"\\","\\/":"/","\\b":"\b","\\f":"\f","\\n":"\n","\\r":"\r","\\t":"\t"},f=/^[\da-f]{4}$/i,h=/^[\u0000-\u001F]$/;t.exports=function(t,e){for(var n=!0,a="";e<t.length;){var m=c(t,e);if("\\"===m){var p=u(t,e,e+2);if(o(l,p))a+=l[p],e+=2;else{if("\\u"!==p)throw new s('Unknown escape sequence: "'+p+'"');var b=u(t,e+=2,e+4);if(!d(f,b))throw new s("Bad Unicode escape at: "+e);a+=i(r(b,16)),e+=4}}else{if('"'===m){n=!1,e++;break}if(d(h,m))throw new s("Bad control character in string literal at: "+e);a+=m,e++}}if(n)throw new s("Unterminated string at: "+e);return{value:a,end:e}}},8335:function(t,e,n){n(9112)},9112:function(t,e,n){var a=n(6518),o=n(3724),s=n(4576),r=n(7751),i=n(9504),c=n(9565),u=n(4901),d=n(34),l=n(4376),f=n(9297),h=n(655),m=n(6198),p=n(4659),b=n(9039),g=n(8235),v=n(4495),y=s.JSON,k=s.Number,w=s.SyntaxError,x=y&&y.parse,S=r("Object","keys"),D=Object.getOwnPropertyDescriptor,Y=i("".charAt),$=i("".slice),M=i(/./.exec),_=i([].push),O=/^\d$/,T=/^[1-9]$/,C=/^[\d-]$/,j=/^[\t\n\r ]$/,A=function(t,e,n,a){var o,s,r,i,u,h=t[e],p=a&&h===a.value,b=p&&"string"==typeof a.source?{source:a.source}:{};if(d(h)){var g=l(h),v=p?a.nodes:g?[]:{};if(g)for(o=v.length,r=m(h),i=0;i<r;i++)E(h,i,A(h,""+i,n,i<o?v[i]:void 0));else for(s=S(h),r=m(s),i=0;i<r;i++)u=s[i],E(h,u,A(h,u,n,f(v,u)?v[u]:void 0))}return c(n,t,e,h,b)},E=function(t,e,n){if(o){var a=D(t,e);if(a&&!a.configurable)return}void 0===n?delete t[e]:p(t,e,n)},F=function(t,e,n,a){this.value=t,this.end=e,this.source=n,this.nodes=a},L=function(t,e){this.source=t,this.index=e};L.prototype={fork:function(t){return new L(this.source,t)},parse:function(){var t=this.source,e=this.skip(j,this.index),n=this.fork(e),a=Y(t,e);if(M(C,a))return n.number();switch(a){case"{":return n.object();case"[":return n.array();case'"':return n.string();case"t":return n.keyword(!0);case"f":return n.keyword(!1);case"n":return n.keyword(null)}throw new w('Unexpected character: "'+a+'" at: '+e)},node:function(t,e,n,a,o){return new F(e,a,t?null:$(this.source,n,a),o)},object:function(){for(var t=this.source,e=this.index+1,n=!1,a={},o={};e<t.length;){if(e=this.until(['"',"}"],e),"}"===Y(t,e)&&!n){e++;break}var s=this.fork(e).string(),r=s.value;e=s.end,e=this.until([":"],e)+1,e=this.skip(j,e),s=this.fork(e).parse(),p(o,r,s),p(a,r,s.value),e=this.until([",","}"],s.end);var i=Y(t,e);if(","===i)n=!0,e++;else if("}"===i){e++;break}}return this.node(1,a,this.index,e,o)},array:function(){for(var t=this.source,e=this.index+1,n=!1,a=[],o=[];e<t.length;){if(e=this.skip(j,e),"]"===Y(t,e)&&!n){e++;break}var s=this.fork(e).parse();if(_(o,s),_(a,s.value),e=this.until([",","]"],s.end),","===Y(t,e))n=!0,e++;else if("]"===Y(t,e)){e++;break}}return this.node(1,a,this.index,e,o)}
1,string:function(){var t=this.index,e=g(this.source,this.index+1);return this.node(0,e.value,t,e.end)},number:function(){var t=this.source,e=this.index,n=e;if("-"===Y(t,n)&&n++,"0"===Y(t,n))n++;else{if(!M(T,Y(t,n)))throw new w("Failed to parse number at: "+n);n=this.skip(O,n+1)}if(!("."===Y(t,n)&&(n=this.skip(O,n+1)),"e"!==Y(t,n)&&"E"!==Y(t,n)||(n++,"+"!==Y(t,n)&&"-"!==Y(t,n)||n++,n!==(n=this.skip(O,n)))))throw new w("Failed to parse number's exponent value at: "+n);return this.node(0,k($(t,e,n)),e,n)},keyword:function(t){var e=""+t,n=this.index,a=n+e.length;if($(this.source,n,a)!==e)throw new w("Failed to parse value at: "+n);return this.node(0,t,n,a)},skip:function(t,e){for(var n=this.source;e<n.length&&M(t,Y(n,e));e++);return e},until:function(t,e){e=this.skip(j,e);for(var n=Y(this.source,e),a=0;a<t.length;a++)if(t[a]===n)return e;throw new w('Unexpected character: "'+n+'" at: '+e)}};var N=b(function(){var t,e="9007199254740993";return x(e,function(e,n,a){t=a.source}),t!==e}),z=v&&!b(function(){return 1/x("-0 \t")!=-1/0});a({target:"JSON",stat:!0,forced:N},{parse:function(t,e){return z&&!u(e)?x(t):function(t,e){t=h(t);var n=new L(t,0,""),a=n.parse(),o=a.value,s=n.skip(j,a.end);if(s<t.length)throw new w('Unexpected extra character: "'+Y(t,s)+'" after the parsed data at: '+s);return u(e)?A({"":o},"",e,a):o}(t,e)}})}}]); 2//# sourceMappingURL=2314.c0af0.chunk.js.map
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.