1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9418],{42907:function(e,t,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/school/students/activity/[email]",function(){return n(27805)}])},27805:function(e,t,n){"use strict";n.r(t);var r=n(47568),o=n(26042),i=n(69396),a=n(70655),s=n(85893),l=n(38901),c=n(10552),u=n(44541),d=n(67294),f=n(17984),p=n(30381),h=n.n(p),m=n(47767),b=n(9198),y=n.n(b),g=n(13155),v=(n(18698),n(28723)),x=n(3538),j=n(27034),w=n(83461),k=n(11163);t.default=function(){var e=function(e){var t=Number(e),n=Math.floor(t/3600),r=Math.floor(t%3600/60),o=Math.floor(t%3600%60),i=n>0?n+"h, ":"",a=r>0?r+"m, ":"",s=o>0?o+"s":"";return i+a+s==""?"0":i+a+s},t=(0,d.useState)(),n=t[0],p=t[1],b=(0,d.useState)(!0),N=b[0],_=b[1],T=(0,d.useState)(!1),C=T[0],O=T[1],S=(0,d.useState)(""),A=S[0],D=S[1],E=h()().startOf("month").format("YYYY-MM-DD"),P=(0,d.useState)(""),R=P[0],F=P[1],M=(0,d.useState)(!1),Z=M[0],q=M[1],U=(0,d.useState)(""),I=U[0],L=U[1],B=(0,d.useState)(!1),V=B[0],Y=B[1],W=(0,d.useState)(),H=W[0],X=W[1],G=(0,d.useState)("desc"),J=G[0],$=G[1],z=(0,d.useState)(),K=z[0],Q=z[1],ee=(0,d.useState)(!0),te=ee[0],ne=ee[1],re=(0,d.useState)([]),oe=re[0],ie=re[1],ae=(0,d.useState)([]),se=ae[0],le=ae[1],ce=(0,d.useState)(!0),ue=ce[0],de=ce[1],fe=(0,d.useState)(!1),pe=fe[0],he=fe[1];(E=new Date(E)).setHours(0,0,0,0);var me=new Date;me.setHours(23,59,59,59);var be=(0,d.useState)(E),ye=be[0],ge=be[1],ve=(0,d.useState)(me),xe=ve[0],je=ve[1],we=(0,d.useState)({readCount:0,totalReadTime:0,videoWatched:0}),ke=we[0],Ne=we[1],_e=(0,k.useRouter)().query.email;(0,d.useEffect)((function(){var e=!1,t=function(){var t=(0,r.Z)((function(){var t,n,r,o,i,s,d,f;return(0,a.__generator)(this,(function(a){switch(a.label){case 0:if(!(t=_e))return[2];O(!1),a.label=1;case 1:return a.trys.push([1,4,,5]),[4,l.g.currentAuthenticatedUser()];case 2:return a.sent(),(o=l.g.user.attributes["custom:code"])?(D(o),[4,c.b.graphql((0,u.wT)(v.sC,{email:t,filter:{code:{eq:o}},limit:1}))]):(e||(O(!0),_(!1)),[2]);case 3:return i=a.sent(),s=(null===i||void 0===i||null===(n=i.data)||void 0===n||null===(r=n.userByemail)||void 0===r?void 0:r.items)||[],e?[2]:0===s.length?(O(!0),_(!1),[2]):(X(d={email:{eq:t},schoolCode:{eq:o},totalTime:{ne:0},createdAt:{lte:me,gt:E}}),Oe(d,"desc"),Te(),Ce(),[3,5]);case 4:return f=a.sent(),console.error("Failed to verify school student access:",f),e||(O(!0),_(!1)),[3,5];case 5:return[2]}}
1))}));return function(){return t.apply(this,arguments)}}();return t(),function(){e=!0}}),[_e]);var Te=function(){var e=(0,r.Z)((function(){var e,t,n,r,s;return(0,a.__generator)(this,(function(a){switch(a.label){case 0:return e={filter:{isDeleted:{eq:g.isDeleted.no}}},[4,c.b.graphql((0,u.wT)(v.Nf,(0,o.Z)({sort:{direction:"desc",field:"createdAt"}},e)))];case 1:t=a.sent(),n=t.data.searchBooks.nextToken,r=t.data.searchBooks.items,a.label=2;case 2:return null===n?[3,4]:[4,c.b.graphql((0,u.wT)(v.Nf,(0,i.Z)((0,o.Z)({sort:{direction:"desc",field:"createdAt"}},e),{nextToken:n})))];case 3:return s=a.sent(),r=r.concat(s.data.searchBooks.items),n=s.data.searchBooks.nextToken,[3,2];case 4:return r=r.map((function(e){return{value:e.id,label:e.title}})),q(r),[2]}}))}));return function(){return e.apply(this,arguments)}}(),Ce=function(){var e=(0,r.Z)((function(){var e,t,n,r,s;return(0,a.__generator)(this,(function(a){switch(a.label){case 0:return e={filter:{isDeleted:{eq:g.isDeleted.no}}},[4,c.b.graphql((0,u.wT)(v.oo,(0,o.Z)({sort:{direction:"desc",field:"createdAt"}},e)))];case 1:t=a.sent(),n=t.data.searchVideos.nextToken,r=t.data.searchVideos.items,a.label=2;case 2:return null===n?[3,4]:[4,c.b.graphql((0,u.wT)(v.oo,(0,i.Z)((0,o.Z)({sort:{direction:"desc",field:"createdAt"}},e),{nextToken:n})))];case 3:return s=a.sent(),r=r.concat(s.data.searchVideos.items),n=s.data.searchVideos.nextToken,[3,2];case 4:return r=r.map((function(e){return{value:e.id,label:e.title}})),Y(r),[2]}}))}));return function(){return e.apply(this,arguments)}}(),Oe=function(){var e=(0,r.Z)((function(e,t){var n,r,o,i,s;return(0,a.__generator)(this,(function(a){switch(a.label){case 0:return ne(!0),_(!0),[4,(0,x.rL)(e,{sortField:"createdAt",sortDirection:t})];case 1:return n=a.sent(),r={readCount:0,totalReadTime:0,videoWatched:0},n.forEach((function(e){"null"===e.videoId?null!==e.activity&&(r.readCount=r.readCount+1,r.totalReadTime=r.totalReadTime+e.totalTime):null!==e.activity&&(r.videoWatched=r.videoWatched+1,r.totalReadTime=r.totalReadTime+e.totalTime)})),Ne(r),p(n),_(!1),s=0,(o=[])[i=0]=["Date open","Type","Title","User email","Publisher","Start","End","Time"],i=1,n.forEach((function(e,t){e.activity.forEach((function(t,n){o[i]=[],o[i][s]=h()(e.createdAt).format("MM/DD/YY"),"null"!==e.videoId?(o[i][s+1]="video",o[i][s+2]=e.videos.title,o[i][s+4]=e.videos.publisher?e.videos.publisher:""):(e.books.bookType==g.bookType.AUDIO?o[i][s+1]="audio":o[i][s+1]="epub",o[i][s+2]=e.books.title,o[i][s+4]=e.books.publisher?e.books.publisher:""),o[i][s+3]=e.email,o[i][s+5]=h()(t.startTime).format("hh:mm:ss a"),o[i][s+6]=h()(t.endTime).format("hh:mm:ss a"),o[i][s+7]=function(e){var t=Number(e),n=Math.floor(t/3600),r=Math.floor(t%3600/60),o=Math.floor(t%3600%60);return(n>0?n<10?"0"+n+":":n+":":"00:")+(r>0?r<10?"0"+r+":":r+":":"00:")+(o>0?o<10?"0"+o:o:"00")}(t.totalTime),i++,s=0}))})),Q(o),ne(!1),[2]}}))}));return function(t,n){return e.apply(this,arguments)}}(),Se=function(){var e=(0,r.Z)((function(e){var t;return(0,a.__generator)(this,(function(n){return t=[],e.forEach((function(e,n){t[n]={bookId:{eq:e.value}}})),ie(t),F(e),[2]}))}));return function(t){return e.apply(this,arguments)}}(),Ae=function(){var e=(0,r.Z)((function(e){var t;return(0,a.__generator)(this,(function(n){return t=[],e.forEach((function(e,n){t[n]={videoId:{eq:e.value}}})),le(t),L(e),[2]}))}));return function(t){return e.apply(this,arguments)}}(),De=function(){var e=(0,r.Z)((function(e){return(0,a.__generator)(this,(function(t){return $(e.target.value),Oe(H,e.target.value),[2]}))}));return function(t){return e.apply(this,arguments)}}(),Ee=function(){var e=(0,r.Z)((function(){var e,t;return(0,a.__generator)(this,(function(n){return F([]),ie([]),L([]),le([]),e=[],(t=H).or=e,0===t.or.length&&delete t.or,de(!0),Oe(t,J),[2]}))}));return function(){return e.apply(this,arguments)}}();return C?(0,s.jsx)(f.Z,{children:(0,s.jsx)("div",{className:"p-6 text-center text-red-600 font-semibold",children:"You do not have permission to view this student's activity."})}):(0,s.jsxs)(f.Z,{children:[te?(0,s.jsx)("button",{className:"inline-flex justify-center py-2 px-4 border border-transparent shadow-sm text-sm font-medium rounded-md text-white bg-gray-500 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500",children:"Generating Report..."}):(0,s.jsx)(w.CSVLink,{className:"inline-flex justify-center py-2 px-4 border border-transparent shadow-sm text-sm font-medium rounded-md text-white bg-indigo-600 hover:bg-indigo-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500",data:K,children:"Download Report"}),(0,s.jsx)("button",{className:"inline-flex justify-center py-2 px-4 ml-2 border border-transparent shadow-sm text-sm font-medium rounded-md text-white bg-indigo-600 hover:bg-indigo-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500",onClick:function(){F([]),ie([]),L([]),le([]),ge(null),je(null),de(!0),he(!0);var e=H;delete e.or,delete e.createdAt,A&&(e.schoolCode={eq:A}),Oe(e,J)},children:"Clear Filter and Show All"}),(0,s.jsx)("div",{className:"flex flex-wrap -mx-3 mb-6",children:(0,s.jsx)("div",{className:"w-full px-3 mb-6 md:mb-0 mt-5 pt-5 border-solid border-gray-300 border",children:(0,s.jsx)("div",{className:"grid row-auto ",children:(0,s.jsx)("div",{className:"grid grid-cols-1 gap-4 px-4 py-2 items-end",children:(0,s.jsxs)("div",{children:[(0,s.jsx)("p",{className:"text-gray-700 font-bold flex mb-1 text-sm ml-1",children:"Select Books"}),(0,s.jsx)(j.ZP,{onChange:Se,value:R,isMulti:!0,name:"books",options:Z,className:"basic-multi-select",classNamePrefix:"select book"}),(0,s.jsx)("p",{className:"mt-2 text-gray-700 font-bold flex mb-1 text-sm ml-1",children:"Select Videos"}),(0,s.jsx)(j.ZP,{onChange:Ae,value:I,isMulti:!0,name:"videos",options:V,className:"basic-multi-select",classNamePrefix:"select video"}),(0,s.jsxs)("div",{className:"align-bottom mt-2",children:[(0,s.jsx)("button",{onClick:function(){if(0===oe.length&&0===se.length)alert("please select books or videos.");else{var e=oe.concat(se),t=H;t.or=e,0===t.or.length&&delete t.or,console.log(t),de(!1),Oe(t,J)}},type:"button",className:"inline-flex justify-center py-2 px-4 border border-transparent shadow-sm text-sm font-medium rounded-md text-white bg-indigo-600 hover:bg-indigo-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500",children:"Apply Filter"}),ue?null:(0,s.jsx)("button",{onClick:Ee,type:"button",className:"ml-5 inline-flex justify-center py-2 px-4 border border-transparent shadow-sm text-sm font-medium rounded-md text-white bg-indigo-600 hover:bg-indigo-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500",children:"Remove Filter"})]})]})})})})}),(0,s.jsx)("div",{className:"grid row-auto mt-5 border-solid border-gray-300 border",children:(0,s.jsxs)("div",{className:"grid grid-cols-5 ga
1p-4 px-4 py-2 items-end",children:[(0,s.jsxs)("div",{className:"inline-block text-left dropdown",children:[(0,s.jsx)("p",{className:"text-gray-700 font-bold flex mb-1 text-sm ml-1",children:"Order"}),(0,s.jsxs)("select",{name:"language",value:J,onChange:De,id:"book",className:"w-48 inline-flex justify-center text-left rounded-md border border-gray-300 shadow-sm px-2 py-2 bg-white text-sm font-medium text-gray-700 hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-offset-gray-100 focus:ring-blue-800",children:[(0,s.jsx)("option",{value:"desc",children:"Descending"}),(0,s.jsx)("option",{value:"asc",children:"Ascending"})]})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)("p",{className:"text-gray-700 font-bold flex mb-1 text-sm ml-1",children:"Start Date"}),(0,s.jsx)(y(),{className:"w-full inline-flex justify-center text-left rounded-md border border-gray-300 shadow-sm px-2 py-2 bg-white text-sm font-medium text-gray-700 hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-offset-gray-100 focus:ring-blue-800",selected:ye,onChange:function(e){return ge(e)},maxDate:new Date})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)("p",{className:"text-gray-700 font-bold flex mb-1 text-sm ml-1",children:"End Date"}),(0,s.jsx)(y(),{className:"w-full inline-flex justify-center text-left rounded-md border border-gray-300 shadow-sm px-2 py-2 bg-white text-sm font-medium text-gray-700 hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-offset-gray-100 focus:ring-blue-800",selected:xe,onChange:function(e){return je(e)},maxDate:new Date})]}),(0,s.jsx)("div",{className:"align-bottom",children:(0,s.jsx)("button",{onClick:function(){if(ye>xe)alert("start date must be less or equal to end date.");else if(null===ye||null===xe)alert("Please select dates.");else{var e=H;e.createdAt={lte:xe,gt:ye},he(!1),X(e),Oe(e,J)}},type:"button",className:"w-full inline-flex justify-center py-2 px-4 border border-transparent shadow-sm text-sm font-medium rounded-md text-white bg-indigo-600 hover:bg-indigo-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500",children:"Apply Date Filter"})}),pe?null:(0,s.jsx)("div",{className:"align-bottom",children:(0,s.jsx)("button",{onClick:function(){var e=H;delete e.createdAt,ge(null),je(null),X(e),he(!0),Oe(e,J)},type:"button",className:"w-full inline-flex justify-center py-2 px-4 border border-transparent shadow-sm text-sm font-medium rounded-md text-white bg-indigo-600 hover:bg-indigo-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500",children:"Remove Date Filter"})})]})}),(0,s.jsxs)("div",{className:"py-10 ",children:[(0,s.jsx)("h3",{className:"text-purple-light font-sans font-semibold mb-6 text-center md:px-4",children:"Activity"}),(0,s.jsx)("div",{className:"flex justify-center mb-6",children:(0,s.jsxs)("div",{className:"px-4",children:[(0,s.jsx)("h4",{className:"text-purple-light font-sans font-semibold mb-2 text-center",children:e(ke.totalReadTime)}),(0,s.jsx)("p",{className:"text-body2 text-gray-light font-serif text-center",children:"Total Time"})]})}),N?(0,s.jsx)(m.Z,{}):n.map((function(t){return(0,s.jsxs)("div",{className:"grid row-auto mt-5 border-solid border-gray-300 border",children:[(0,s.jsxs)("div",{className:"grid grid-cols-3 gap-4 px-4 py-2",children:["null"!==t.videoId?(0,s.jsxs)("div",{children:[(0,s.jsx)("b",{children:"Video : "}),t.videos.title]}):(0,s.jsxs)("div",{children:[(0,s.jsx)("b",{children:"Book : "}),t.books.title]}),(0,s.jsxs)("div",{children:[(0,s.jsx)("b",{children:"Date : "}),h()(t.createdAt).format("MMMM Do YYYY")]}),(0,s.jsxs)("div",{children:[(0,s.jsx)("b",{children:"Time : "}),e(t.totalTime)]})]}),(0,s.jsxs)("div",{className:"grid grid-cols-3 gap-4 px-4 py-2",children:[(0,s.jsxs)("div",{children:[(0,s.jsx)("b",{children:"First Name : "}),t.firstName]}),(0,s.jsxs)("div",{children:[(0,s.jsx)("b",{children:"Last Name : "}),t.lastName]}),(0,s.jsxs)("div",{children:[(0,s.jsx)("b",{children:"Email : "}),t.email]})]}),null!==t.activity?(0,s.jsxs)("div",{className:"grid grid-cols-1 px-4 py-2",children:[(0,s.jsx)("b",{children:"Activity :"}),(0,s.jsxs)("table",{className:"w-full rounded",children:[(0,s.jsx)("thead",{children:(0,s.jsxs)("tr",{children:[(0,s.jsx)("th",{className:"border px-4 py-2",children:"Start Time"}),(0,s.jsx)("th",{className:"border px-4 py-2",children:"End Time"}),(0,s.jsx)("th",{className:"border px-4 py-2",children:"Total Time"})]})}),(0,s.jsx)("tbody",{children:t.activity.map((function(t){return(0,s.jsxs)("tr",{className:"text-center",children:[(0,s.jsx)("td",{className:"border px-4 py-2",children:h()(t.startTime).format("hh:mm:ss a")}),(0,s.jsx)("td",{className:"border px-4 py-2",children:h()(t.endTime).format("hh:mm:ss a")}),(0,s.jsx)("td",{className:"border px-4 py-2",children:e(t.totalTime)})]},t.id)}))})]})]}):null]},t.id)}))]})]})}},83461:function(e,t,n){e.exports=n(5090)}
1,89469:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,o=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),i=n(67294),a=(r=i)&&r.__esModule?r:{default:r},s=n(99182),l=n(69695);var c=function(e){function t(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var n=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.state={},n}return function(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),o(t,[{key:"buildURI",value:function(){return s.buildURI.apply(void 0,arguments)}},{key:"componentDidMount",value:function(){var e=this.props,t=e.data,n=e.headers,r=e.separator,o=e.enclosingCharacter,i=e.uFEFF,a=e.target,s=e.specs,l=e.replace;this.state.page=window.open(this.buildURI(t,i,n,r,o),a,s,l)}},{key:"getWindow",value:function(){return this.state.page}},{key:"render",value:function(){return null}}]),t}(a.default.Component);c.defaultProps=Object.assign(l.defaultProps,{target:"_blank"}),c.propTypes=l.propTypes,t.default=c},26425:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,o=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},i=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),a=n(67294),s=(r=a)&&r.__esModule?r:{default:r},l=n(99182),c=n(69695);var u=function(e){function t(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var n=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.buildURI=n.buildURI.bind(n),n}return function(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),i(t,[{key:"buildURI",value:function(){return l.buildURI.apply(void 0,arguments)}},{key:"handleLegacy",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(window.navigator.msSaveOrOpenBlob){e.preventDefault();var n=this.props,r=n.data,o=n.headers,i=n.separator,a=n.filename,s=n.enclosingCharacter,c=n.uFEFF,u=t&&"function"===typeof r?r():r,d=new Blob([c?"\ufeff":"",(0,l.toCSV)(u,o,i,s)]);return window.navigator.msSaveBlob(d,a),!1}}},{key:"handleAsyncClick",value:function(e){var t=this;this.props.onClick(e,(function(n){!1!==n?t.handleLegacy(e,!0):e.preventDefault()}))}},{key:"handleSyncClick",value:function(e){!1===this.props.onClick(e)?e.preventDefault():this.handleLegacy(e)}},{key:"handleClick",value:function(){var e=this;return function(t){if("function"===typeof e.props.onClick)return e.props.asyncOnClick?e.handleAsyncClick(t):e.handleSyncClick(t);e.handleLegacy(t)}}},{key:"render",value:function(){var e=this,t=this.props,n=t.data,r=t.headers,i=t.separator,a=t.filename,l=t.uFEFF,c=t.children,u=(t.onClick,t.asyncOnClick,t.enclosingCharacter),d=function(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}(t,["data","headers","separator","filename","uFEFF","children","onClick","asyncOnClick","enclosingCharacter"]),f="undefined"===typeof window?"":this.buildURI(n,l,r,i,u);return s.default.createElement("a",o({download:a},d,{ref:function(t){return e.link=t},target:"_self",href:f,onClick:this.handleClick()}),c)}}]),t}(s.default.Component);u.defaultProps=c.defaultProps,u.propTypes=c.propTypes,t.default=u},99182:function(e,t){"use strict";
1Object.defineProperty(t,"__esModule",{value:!0});var n="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};function r(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}return Array.from(e)}var o=t.isSafari=function(){return/^((?!chrome|android).)*safari/i.test(navigator.userAgent)},i=t.isJsons=function(e){return Array.isArray(e)&&e.every((function(e){return"object"===("undefined"===typeof e?"undefined":n(e))&&!(e instanceof Array)}))},a=t.isArrays=function(e){return Array.isArray(e)&&e.every((function(e){return Array.isArray(e)}))},s=t.jsonsHeaders=function(e){return Array.from(e.map((function(e){return Object.keys(e)})).reduce((function(e,t){return new Set([].concat(r(e),r(t)))}),[]))},l=t.jsons2arrays=function(e,t){var n=t=t||s(e),o=t;i(t)&&(n=t.map((function(e){return e.label})),o=t.map((function(e){return e.key})));var a=e.map((function(e){return o.map((function(t){return c(t,e)}))}));return[n].concat(r(a))},c=t.getHeaderValue=function(e,t){var n=e.replace(/\[([^\]]+)]/g,".$1").split(".").reduce((function(e,t,n,r){var o=e[t];if(void 0!==o&&null!==o)return o;r.splice(1)}),t);return void 0===n?e in t?t[e]:"":n},u=t.elementOrEmpty=function(e){return"undefined"===typeof e||null===e?"":e},d=t.joiner=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:",",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:'"';return e.filter((function(e){return e})).map((function(e){return e.map((function(e){return u(e)})).map((function(e){return""+n+e+n})).join(t)})).join("\n")},f=t.arrays2csv=function(e,t,n,o){return d(t?[t].concat(r(e)):e,n,o)},p=t.jsons2csv=function(e,t,n,r){return d(l(e,t),n,r)},h=t.string2csv=function(e,t,n,r){return t?t.join(n)+"\n"+e:e.replace(/"/g,'""')},m=t.toCSV=function(e,t,n,r){if(i(e))return p(e,t,n,r);if(a(e))return f(e,t,n,r);if("string"===typeof e)return h(e,t,n);throw new TypeError('Data should be a "String", "Array of arrays" OR "Array of objects" ')};t.buildURI=function(e,t,n,r,i){var a=m(e,n,r,i),s=o()?"application/csv":"text/csv",l=new Blob([t?"\ufeff":"",a],{type:s}),c="data:"+s+";charset=utf-8,"+(t?"\ufeff":"")+a,u=window.URL||window.webkitURL;return"undefined"===typeof u.createObjectURL?c:u.createObjectURL(l)}},5090:function(e,t,n){"use strict";t.CSVLink=void 0;var r=i(n(89469)),o=i(n(26425));function i(e){return e&&e.__esModule?e:{default:e}}r.default,t.CSVLink=o.default},69695:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PropsNotForwarded=t.defaultProps=t.propTypes=void 0;var r,o=n(67294),i=((r=o)&&r.__esModule,n(45697));t.propTypes={data:(0,i.oneOfType)([i.string,i.array,i.func]).isRequired,headers:i.array,target:i.string,separator:i.string,filename:i.string,uFEFF:i.bool,onClick:i.func,asyncOnClick:i.bool,enclosingCharacter:i.string},t.defaultProps={separator:",",filename:"generatedBy_react-csv.csv",uFEFF:!0,asyncOnClick:!1,enclosingCharacter:'"'},t.PropsNotForwarded=["data","headers"]}},function(e){e.O(0,[1664,3654,1644,4544,7034,3616,9424,9356,5558,7984,9774,2888,179],(function(){return t=42907,e(e.s=t);var t}));var t=e.O();_N_E=t}]);
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.