!function(t){var e={};function n(s){if(e[s])return e[s].exports;var r=e[s]={i:s,l:!1,exports:{}};return t[s].call(r.exports,r,r.exports,n),r.l=!0,r.exports}n.m=t,n.c=e,n.d=function(t,e,s){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:s})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var s=Object.create(null);if(n.r(s),Object.defineProperty(s,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var r in t)n.d(s,r,function(e){return t[e]}.bind(null,r));return s},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=0)}([function(t,e){const{createElement:n,render:s,useState:r,useEffect:l,Fragment:o}=wp.element,{select:a,dispatch:i}=wp.data,u=t=>{const[e,s]=r(!0),[i,u]=r({}),[d,c]=r(0);l(()=>{fetch(`${window.instructorsimplestats.api}/instructor_simple_stats/`,{method:"post",body:JSON.stringify({type:t.type,token:a("vibebp").getToken(),user_id:window.instructorsimplestats.user_id})}).then(t=>t.json()).then(t=>{t.status&&u(t.data),s(!1)})},[]);return n("div",{className:"instructor_simple_stat"},e?n("div",{class:"widget_loader"},n("div",null),n("div",null),n("div",null),n("div",null)):n(o,null,i.hasOwnProperty("value")&&Array.isArray(i.value)&&"woo_commission"==t.type?n(o,null,n("div",{class:"dash-stats woo_commission"},n("div",{className:"tabs"},i.value.map((t,e)=>n("div",{dangerouslySetInnerHTML:{__html:t.symbol},onClick:()=>{c(e)}}))),n("div",{className:"tab_value"},(()=>{if(console.log(d),i.value.length&&i.value[d])return n("h3",{dangerouslySetInnerHTML:{__html:i.value[d].symbol+" "+i.value[d].value}})})()),n("span",null,i.label))):n(o,null,n("div",{class:"dash-stats"},n("h3",{dangerouslySetInnerHTML:{__html:i.value}}),n("span",null,i.label)))))};document.addEventListener("wplms_instructor_dash_stats",t=>{document.querySelector('.instructor_simple_stats[data-type="'+t.detail.widget.options.stats+'"]')&&s(n(u,{type:t.detail.widget.options.stats}),document.querySelector('.instructor_simple_stats[data-type="'+t.detail.widget.options.stats+'"]'))})}]);