PageSourceSearch

https://storyloop.com/_next/static/chunks/5112-5f69d513fc6a1b86.js

js storyloop.com collected 2026-10-08 07:23:15 UTC 16,574 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5112],{91312:function(e,s,t){t.d(s,{h:function(){return c}});var a=t(85893);t(67294);var o=t(50549);t(58862);let c=()=>(0,a.jsxs)("div",{className:"tr",children:[(0,a.jsx)("div",{className:"td date",children:(0,a.jsx)(o.Z,{width:80,height:20,baseColor:"#4a4a4a",highlightColor:"#6a6a6a"})}),(0,a.jsx)("div",{className:"td name",children:(0,a.jsx)(o.Z,{width:200,height:20,baseColor:"#4a4a4a",highlightColor:"#6a6a6a"})}),(0,a.jsx)("div",{className:"td price",children:(0,a.jsx)(o.Z,{width:60,height:20,baseColor:"#4a4a4a",highlightColor:"#6a6a6a"})}),(0,a.jsx)("div",{className:"td producer",children:(0,a.jsx)(o.Z,{width:100,height:20,baseColor:"#4a4a4a",highlightColor:"#6a6a6a"})}),(0,a.jsx)("div",{className:"td",children:(0,a.jsx)(o.Z,{width:20,height:20,baseColor:"#4a4a4a",highlightColor:"#6a6a6a"})})]})},19706:function(e,s,t){t.r(s);var a=t(85893),o=t(91312),c=t(67294),i=t(26787),l=t(23121);let n="https://storyloop.com/wp-json",r="wp/v2";s.default=()=>{let[e,s]=(0,c.useState)([]),{viewReport:t,blockReport:d}=(0,c.useContext)(i.t),[m,h]=(0,c.useState)(0),[j,x]=(0,c.useState)(!0),[v,u]=(0,c.useState)(!1),[p,w]=(0,c.useState)(!1),[N,g]=(0,c.useState)(1);(0,c.useEffect)(()=>{y()},[]);let b=async e=>{u(!0);let s=localStorage.getItem("token");try{await fetch("".concat(n,"/").concat(r,"/user/commissions/details?commission_id=").concat(e),{method:"GET",headers:{Authorization:"Bearer ".concat(s),"Content-Type":"application/json"}}).then(e=>{if(e.ok)return e.blob();throw u(!1),Error("Failed to download")}).then(s=>{let t=window.URL.createObjectURL(s),a=document.createElement("a");a.style.display="none",a.href=t,a.download="commissions_".concat(e,"_view_details.csv"),document.body.appendChild(a),a.click(),window.URL.revokeObjectURL(t),u(!1)}).catch(e=>{console.error("Error:",e),u(!1)})}catch(e){console.error("Error fetching commissions:",e),u(!1)}u(!1)},y=async()=>{let e=localStorage.getItem("token");try{let a=await fetch("".concat(n,"/").concat(r,"/user/commissions?type=paid"),{method:"GET",headers:{Authorization:"Bearer ".concat(e),"Content-Type":"application/json"}});if(!a.ok)throw Error("Failed to fetch commissions");let o=await a.json();o.commissions.length>0?(s(o.commissions),h(o.total),x(!1),t()):d(),x(!1)}catch(e){console.error("Error fetching commissions:",e),x(!1)}},f=e=>{g(e)},k=e=>e.replace("$",""),C=(N-1)*15,E=e.slice(C,C+15),S=Math.ceil(e.length/15);return(0,a.jsxs)(a.Fragment,{children:[v&&(0,a.jsx)(l.Z,{}),(0,a.jsxs)("div",{className:"receipts-container",style:{marginTop:20},children:[(0,a.jsx)("div",{className:"file-header",children:(0,a.jsx)("h4",{className:"custom-heading",children:"Paid Commissions"})}),j?(0,a.jsx)("div",{className:"table",children:(0,a.jsx)("div",{className:"table-body",children:Array.from({length:7}).map((e,s)=>(0,a.jsx)("div",{className:"mobile-layout-row",children:(0,a.jsx)(o.h,{})},s))})}):(0,a.jsx)("div",{className:"table",children:(0,a.jsxs)("div",{className:"table-body",children:[(0,a.jsx)("div",{className:"mobile-layout-row",children:(0,a.jsxs)("div",{className:"t-head",children:[(0,a.jsx)("div",{className:"td producer",children:"Item"}),(0,a.jsx)("div",{className:"td date",children:"Amount"}),(0,a.jsx)("div",{className:"td name",children:"Date"}),(0,a.jsx)("div",{className:"td price",children:"Rate"})]})}),E.map(e=>(0,a.jsx)("div",{className:"mobile-layout-row",children:(0,a.jsxs)("div",{className:"tr",children:[(0,a.jsxs)("div",{className:"td producer",children:[e.item," ",e.has_details&&(0,a.jsx)("a",{className:"view-details",onClick:()=>b(e.commission_id),children:"(see details) "})]}),(0,a.jsxs)("div",{className:"td date",children:["$",k(e.amount)]}),(0,a.jsx)("div",{className:"td name",children:e.date}),(0,a.jsx)("div",{className:"td price",children:e.rate})]})},e.commission_id)),(0,a.jsx)("div",{className:"mobile-layout-row",children:(0,a.jsxs)("div",{className:"tr",children:[(0,a.jsx)("div",{className:"td name",children:(0,a.jsx)("b",{children:"Total"})}),(0,a.jsx)("div",{className:"td price",children:(0,a.jsxs)("b",{children:["$",m.toFixed(2)]})}),(0,a.jsx)("div",{className:"td"})]})})]})}),e.length>15&&(0,a.jsxs)("div",{className:"pagination",children:[(0,a.jsx)("button",{className:"arrow-btn",onClick:()=>f(N-1),disabled:1===N,children:(0,a.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,a.jsx)("path",{d:"M15.5 19l-7-7 7-7"})})}),Array.from({length:S},(e,s)=>(0,a.jsx)("button",{onClick:()=>f(s+1),disabled:N===s+1,children:s+1},s)),(0,a.jsx)("button",{className:"arrow-btn",onClick:()=>f(N+1),disabled:N===S,children:(0,a.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,a.jsx)("path",{d:"M8.5 5l7 7-7 7"})})})]})]})]})}},71979:function(e,s,t){t.r(s);var a=t(85893),o=t(23121),c=t(91312),i=t(67294);let l="https://storyloop.com/wp-json",n="wp/v2";s.default=()=>{let[e,s]=(0,i.useState)([]),[t,r]=(0,i.useState)(!0),[d,m]=(0,i.useState)(0),[h,j]=(0,i.useState)(!1),[x,v]=(0,i.useState)(1);(0,i.useEffect)(()=>{p()},[]);let u=async e=>{j(!0);let s=localStorage.getItem("token");try{await fetch("".concat(l,"/").concat(n,"/user/commissions/details?commission_id=").concat(e),{method:"GET",headers:{Authorization:"Bearer ".concat(s),"Content-Type":"application/json"}}).then(e=>{if(e.ok)return e.blob();throw j(!1),Error("Failed to download")}).then(s=>{let t=window.URL.createObjectURL(s),a=document.createElement("a");a.style.display="none",a.href=t,a.download="commissions_".concat(e,"_view_details.csv"),document.body.appendChild(a),a.click(),window.URL.revokeObjectURL(t),j(!1)}).catch(e=>{console.error("Error:",e),j(!1)})}catch(e){console.error("Error fetching commissions:",e),j(!1)}j(!1)},p=async()=>{let e=localStorage.getItem("token");try{let t=await fetch("".concat(l,"/").concat(n,"/user/commissions?type=revoked"),{method:"GET",headers:{Authorization:"Bearer ".concat(e),"Content-Type":"application/json"}});if(!t.ok)throw Error("Failed to fetch commissions");let a=await t.json();s(a.commissions),m(a.total),r(!1)}catch(e){console.error("Error fetching commissions:",e)}},w=e=>{v(e)},N=e=>e.replace("$",""),g=(x-1)*15,b=e.slice(g,g+15),y=Math.ceil(e.length/15);return(0,a.jsxs)(a.Fragment,{children:[h&&(0,a.jsx)(o.Z,{}),(0,a.jsxs)("div",{className:"receipts-container",style:{marginTop:20},children:[(0,a.jsx)("div",{className:"file-header",children:(0,a.jsx)("h4",{className:"custom-heading",children:"Revoked Commissions"})}),t?(0,a.jsx)("div",{className:"table",children:(0,a.jsx)("div",{className:"table-body",children:Array.from({length:7}).map((e,s)=>(0,a.jsx)("div",{className:"mobile-layout-row",children:(0,a.jsx)(c.h,{})},s))})}):(0,a.jsx)("div",{className:"table",children:(0,a.jsxs)("div",{className:"table-body",children:[(0,a.jsx)("div",{className:"mobile-layout-row",children:(0,a.jsxs)("div",{className:"t-head",children:[(0,a.jsx)("div",{className:"td producer",children:"Item"}),(0,a.jsx)("div",{className:"td date",children:"Amount"}),(0,a.jsx)("div",{className:"td name",children:"Date"}),(0,a.jsx)("div",{className:"td price",children:"Rate"})]})}),b.map(e=>(0,a.jsx)("div",{className:"mobile-layout-row",children:(0,a.jsxs)("div",{className:"tr",children:[(0,a.jsxs)("div",{className:"td producer",children:[e.item," ",e.has_details&&(0,a.jsx)("a",{className:"view-details",onClick:()=>u(e.commission_id),children:"(see details) "})]}),(0,a.jsxs)("div",{className:"td date",children:["$",N(e.amount)]}),(0,a.jsx)("div",{className:"td name",children:e.date}),(0,a.jsx)("div",{className:"td price",children:e.rate})]})},e.commission_id)),(0,a.jsx)("div",{className:"mobile-layout-row",children:(0,a.jsxs)("div",{className:"tr",children:[(0,a.jsx)("div",{className:"td name",children:(0,a.jsx)("b",{children:"Total"})}),(0,a.jsx)("div",{className:"td price",children:(0,a.jsxs)("b",{children:["$",d.toFixed(2)]})}),(0,a.jsx)("div",{className:"td"})]})})]})}),e.length>15&&(0,a.jsxs)("div",{className:"pagination",children:[(0,a.jsx)("button",{className:"arrow-btn",onClick:()=>w(x-1),disabled:1===x,children:(0,a.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,a.jsx)("path",{d:"M15.5 19l-7-7 7-7"})})}),Array.from({length:y},(e,s)=>(0,a.jsx)("button",{onClick:()=>w(s+1),disabled:x===s+1,children:s+1},s)),(0,a.jsx)("button",{className:"arrow-btn",onClick:()=>w(x+1),disabled:x===y,children:(0,a.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,a.jsx)("path",{d:"M8.5 5l7 7-7 7"})})})]})]})]})}},87513:function(e,s,t){t.r(s);var a=t(85893),o=t(23121),c=t(91312),i=t(67294);let l="https://storyloop.com/wp-json",n="wp/v2";s.default=()=>{let[e,s]=(0,i.useState)([]),[t,r]=(0,i.useState)(!0),[d,m]=(0,i.useState)(!1),[h,j]=(0,i.useState)(1),[x,v]=(0,i.useState)(0);(0,i.useEffect)(()=>{u()},[]);let u=async()=>{let e=localStorage.getItem("token");try{let t=await fetch("".concat(l,"/").concat(n,"/user/commissions?type=unpaid"),{method:"GET",headers:{Authorization:"Bearer ".concat(e),"Content-Type":"application/json"}});if(!t.ok)throw Error("Failed to fetch commissions");let a=await t.json();s(a.commissions),v(a.total),r(!1)}catch(e){console.error("Error fetching commissions:",e),r(!1)}},p=e=>{j(e)},w=e=>e.replace("$",""),N=async e=>{m(!0);let s=localStorage.getItem("token");try{await fetch("".concat(l,"/").concat(n,"/user/commissions/details?commission_id=").concat(e),{method:"GET",headers:{Authorization:"Bearer ".concat(s),"Content-Type":"application/json"}}).then(e=>{if(e.ok)return e.blob();throw m(!1),Error("Failed to download")}).then(s=>{let t=window.URL.createObjectURL(s),a=document.createElement("a");a.style.display="none",a.href=t,a.download="commissions_".concat(e,"_view_details.csv"),document.body.appendChild(a),a.click(),window.URL.revokeObjectURL(t),m(!1)}).catch(e=>{console.error("Error:",e),m(!1)})}catch(e){console.error("Error fetching commissions:",e),m(!1)}m(!1)},g=(h-1)*15,b=e.slice(g,g+15),y=Math.ceil(e.length/15);return(0,a.jsxs)(a.Fragment,{children:[d&&(0,a.jsx)(o.Z,{}),(0,a.jsxs)("div",{className:"receipts-container",style:{marginTop:20},children:[(0,a.jsx)("div",{className:"file-header",children:(0,a.jsx)("h4",{className:"custom-heading",children:"Unpaid Commissions"})}),t?(0,a.jsx)("div",{className:"table",children:(0,a.jsx)("div",{className:"table-body",children:Array.from({length:7}).map((e,s)=>(0,a.jsx)("div",{className:"mobile-layout-row",children:(0,a.jsx)(c.h,{})},s))})}):(0,a.jsx)("div",{className:"table",children:(0,a.jsxs)("div",{className:"table-body",children:[(0,a.jsx)("div",{className:"mobile-layout-row",children:(0,a.jsxs)("div",{className:"t-head",children:[(0,a.jsx)("div",{className:"td producer",children:"Item"}),(0,a.jsx)("div",{className:"td date",children:"Amount"}),(0,a.jsx)("div",{className:"td name",children:"Date"}),(0,a.jsx)("div",{className:"td price",children:"Rate"})]})}),b.map(e=>(0,a.jsx)("div",{className:"mobile-layout-row",children:(0,a.jsxs)("div",{className:"tr",children:[(0,a.jsxs)("div",{className:"td producer",children:[e.item," ",e.has_details&&(0,a.jsx)("a",{className:"view-details",onClick:()=>N(e.commission_id),children:"(see details) "})]}),(0,a.jsxs)("div",{className:"td date",children:["$",w(e.amount)]}),(0,a.jsx)("div",{className:"td name",children:e.date}),(0,a.jsx)("div",{className:"td price",children:e.rate})]})},e.commission_id)),(0,a.jsx)("div",{className:"mobile-layout-row",children:(0,a.jsxs)("div",{className:"tr",children:[(0,a.jsx)("div",{className:"td name",children:(0,a.jsx)("b",{children:"Total"})}),(0,a.jsx)("div",{className:"td price",children:(0,a.jsxs)("b",{children:["$",x.toFixed(2)]})}),(0,a.jsx)("div",{className:"td"})]})})]})}),e.length>15&&(0,a.jsxs)("div",{className:"pagination",children:[(0,a.jsx)("button",{className:"arrow-btn",onClick:()=>p(h-1),disabled:1===h,children:(0,a.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,a.jsx)("path",{d:"M15.5 19l-7-7 7-7"})})}),Array.from({length:y},(e,s)=>(0,a.jsx)("button",{onClick:()=>p(s+1),disabled:h===s+1,children:s+1},s)),(0,a.jsx)("button",{className:"arrow-btn",onClick:()=>p(h+1),disabled:h===y,children:(0,a.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,a.jsx)("path",{d:"M8.5 5l7 7-7 7"})})})]})]})]})}},64066:function(e,s,t){t.r(s);var a=t(85893),o=t(67294),c=t(26787),i=t(23121);s.default=()=>{let[e,s]=(0,o.useState)(!1),[t,l]=(0,o.useState)(!1),[n,r]=(0,o.useState)(!1),{showReport:d}=(0,o.useContext)(c.t),[m,h]=(0,o.useState)(),[j,x]=(0,o.useState)({}),[v,u]=(0,o.useState)(null),[p,w]=(0,o.useState)(null),N="https://storyloop.com/wp-json",g="wp/v2",b=async()=>{r(!0);let e=localStorage.getItem("token");
1try{await fetch("".concat(N,"/").concat(g,"/user/commissions/export"),{method:"POST",headers:{Authorization:"Bearer ".concat(e),"Content-Type":"application/json"},body:JSON.stringify({month:v,year:p})}).then(e=>{if(e.ok)return e.blob();throw Error("Failed to download")}).then(e=>{let s=window.URL.createObjectURL(e),t=document.createElement("a");t.style.display="none",t.href=s,t.download="commissions_".concat(v,"_").concat(m,".csv"),document.body.appendChild(t),t.click(),window.URL.revokeObjectURL(s),r(!1)}).catch(e=>{console.error("Error:",e)})}catch(e){console.error("Error fetching commissions:",e)}},y=async()=>{let e=localStorage.getItem("token");try{let s=await fetch("".concat(N,"/").concat(g,"/user/commissions/export/options"),{method:"GET",headers:{Authorization:"Bearer ".concat(e),"Content-Type":"application/json"}});if(!s.ok)throw Error("Failed to fetch commissions");let t=await s.json();h(t.years),x(t.months)}catch(e){console.error("Error fetching commissions:",e)}};(0,o.useEffect)(()=>{y()},[]);let f=e=>{u(e),s(!1)},k=e=>{w(e),l(!1)},C=Object.entries(j).sort((e,s)=>{let[t]=e,[a]=s;return parseInt(t)-parseInt(a)});return(0,a.jsxs)(a.Fragment,{children:[n&&(0,a.jsx)(i.Z,{}),d&&(0,a.jsxs)("div",{style:{marginTop:20},children:[(0,a.jsx)("div",{className:"file-header",children:(0,a.jsx)("h4",{className:"custom-heading",children:"Report"})}),(0,a.jsx)("div",{className:"checkout-form",children:(0,a.jsxs)("div",{className:"form-row",style:{paddingTop:20,paddingLeft:10,marginTop:20},children:[(0,a.jsx)("div",{className:"form-column third-column",children:(0,a.jsxs)("div",{className:"select",onClick:()=>s(!e),children:[(0,a.jsx)("div",{className:"selectBtn ".concat(e?"active":""),style:{height:"auto"},children:v?j[v]:"Choose Month"}),(0,a.jsx)("div",{className:"selectDropdown ".concat(e?"toggle":""),style:{zIndex:e?"4":""},children:C.map(e=>{let[s,t]=e;return(0,a.jsx)("div",{className:"option ".concat(v===s?"selected":""),"data-type":s,onClick:()=>f(s),children:t},s)})})]})}),(0,a.jsx)("div",{className:"form-column third-column",children:(0,a.jsxs)("div",{className:"select",onClick:()=>l(!t),children:[(0,a.jsx)("div",{className:"selectBtn ".concat(t?"active":""),style:{height:"auto"},children:p||"Choose Year"}),(0,a.jsx)("div",{className:"selectDropdown ".concat(t?"toggle":""),style:{zIndex:t?"4":""},children:null==m?void 0:m.map(e=>(0,a.jsx)("div",{className:"option ".concat(p===e.toString()?"selected":""),"data-type":e.toString(),onClick:()=>k(e.toString()),children:e.toString()},e.toString()))})]})}),(0,a.jsx)("div",{className:"form-column mobile-column",children:(0,a.jsx)("div",{className:"form-wrapper",id:"customer-form",children:v&&p?(0,a.jsx)("button",{type:"button",className:"primary-btn next-btn",onClick:b,children:"Download"}):(0,a.jsx)("button",{type:"button",className:"primary-btn next-btn",children:"Select Month and Year"})})})]})})]})]})}},45112:function(e,s,t){t.r(s);var a=t(85893),o=t(67294),c=t(87513),i=t(64066),l=t(19706),n=t(71979),r=t(38212),d=t(11163),m=t.n(d);s.default=()=>{let[e,s]=(0,o.useState)();(0,o.useEffect)(()=>{t()},[]);let t=async()=>{let e=localStorage.getItem("token");try{let t=await fetch("".concat("https://storyloop.com/wp-json","/").concat("wp/v2","/user/commissions?type=revoked"),{method:"GET",headers:{Authorization:"Bearer ".concat(e),"Content-Type":"application/json"}});if(!t.ok)throw m().replace("/"),Error("Failed to fetch commissions");let a=await t.json();s(a.commissions)}catch(e){console.error("Error fetching commissions:",e)}};return(0,a.jsx)("section",{className:"account-section",children:(0,a.jsxs)("div",{className:"account-container",children:[(0,a.jsx)(r.Z,{}),(0,a.jsxs)("div",{className:"receipts-wrapper",children:[(0,a.jsx)(c.default,{}),(0,a.jsx)(l.default,{}),(0,a.jsx)(n.default,{}),(0,a.jsx)(i.default,{})]})]})})}}}]);

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.