(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7635],{20731:function(e,t,r){var n=r(88668),o=r(47443),a=r(1196),i=r(29932),u=r(7518),c=r(74757);e.exports=function(e,t,r,s){var f=-1,l=o,p=!0,d=e.length,y=[],h=t.length;if(!d)return y;r&&(t=i(t,u(r))),s?(l=a,p=!1):t.length>=200&&(l=c,p=!1,t=new n(t));e:for(;++f<d;){var v=e[f],b=null==r?v:r(v);if(v=s||0!==v?v:0,p&&b==b){for(var C=h;C--;)if(t[C]===b)continue e;y.push(v)}else l(t,b,s)||y.push(v)}return y}},29521:function(e,t,r){var n=r(20731),o=r(21078),a=r(5976),i=r(29246),u=r(10928),c=a(function(e,t){var r=u(t);return i(r)&&(r=void 0),i(e)?n(e,o(t,1,i,!0),void 0,r):[]});e.exports=c},18446:function(e,t,r){var n=r(90939);e.exports=function(e,t){return n(e,t)}},83461:function(e,t,r){e.exports=r(5090)},89469:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n,o=function(){function defineProperties(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(e,t,r){return t&&defineProperties(e.prototype,t),r&&defineProperties(e,r),e}}(),a=(n=r(67294))&&n.__esModule?n:{default:n},i=r(99182),u=r(69695),c=function(e){function CSVDownload(e){!function(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}(this,CSVDownload);var t=function(e,t){if(!e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return t&&("object"==typeof t||"function"==typeof t)?t:e}(this,(CSVDownload.__proto__||Object.getPrototypeOf(CSVDownload)).call(this,e));return t.state={},t}return!function(e,t){if("function"!=typeof t&&null!==t)throw 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)}(CSVDownload,e),o(CSVDownload,[{key:"buildURI",value:function(){return i.buildURI.apply(void 0,arguments)}},{key:"componentDidMount",value:function(){var e=this.props,t=e.data,r=e.headers,n=e.separator,o=e.enclosingCharacter,a=e.uFEFF,i=e.target,u=e.specs,c=e.replace;this.state.page=window.open(this.buildURI(t,a,r,n,o),i,u,c)}},{key:"getWindow",value:function(){return this.state.page}},{key:"render",value:function(){return null}}]),CSVDownload}(a.default.Component);c.defaultProps=Object.assign(u.defaultProps,{target:"_blank"}),c.propTypes=u.propTypes,t.default=c},26425:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n,o=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},a=function(){function defineProperties(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(e,t,r){return t&&defineProperties(e.prototype,t),r&&defineProperties(e,r),e}}(),i=(n=r(67294))&&n.__esModule?n:{default:n},u=r(99182),c=r(69695),s=function(e){function CSVLink(e){!function(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}(this,CSVLink);var t=function(e,t){if(!e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return t&&("object"==typeof t||"function"==typeof t)?t:e}(this,(CSVLink.__proto__||Object.getPrototypeOf(CSVLink)).call(this,e));return t.buildURI=t.buildURI.bind(t),t.state={href:""},t}return!function(e,t){if("function"!=typeof t&&null!==t)throw 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)}(CSVLink,e),a(CSVLink,[{key:"componentDidMount",value:function(){var e=this.props,t=e.data,r=e.headers,n=e.separator,o=e.uFEFF,a=e.enclosingCharacter;this.setState({href:this.buildURI(t,o,r,n,a)})}},{key:"componentDidUpdate",value:function(e){if(this.props!==e){var t=this.props,r=t.data,n=t.headers,o=t.separator,a=t.uFEFF;this.setState({href:this.buildURI(r,a,n,o)})}}},{key:"buildURI",value:function(){return u.buildURI.apply(void 0,arguments)}},{key:"handleLegacy",value:function(e){if(window.navigator.msSaveOrOpenBlob){e.preventDefault();var t=this.props,r=t.data,n=t.headers,o=t.separator,a=t.filename,i=t.enclosingCharacter,c=t.uFEFF,s=new Blob([c?"\uFEFF":"",(0,u.toCSV)(r,n,o,i)]);return window.navigator.msSaveBlob(s,a),!1}}},{key:"handleAsyncClick",value:function(e){var t=this;this.props.onClick(e,function(r){if(!1===r){e.preventDefault();return}t.handleLegacy(e)})}},{key:"handleSyncClick",value:function(e){if(!1===this.props.onClick(e)){e.preventDefault();return}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,r=(t.data,t.headers,t.separator,t.filename),n=(t.uFEFF,t.children),a=(t.onClick,t.asyncOnClick,t.enclosingCharacter,function(e,t){var r={};for(var n in e)!(t.indexOf(n)>=0)&&Object.prototype.hasOwnProperty.call(e,n)&&(r[n]=e[n]);return r}(t,["data","headers","separator","filename","uFEFF","children","onClick","asyncOnClick","enclosingCharacter"]));return i.default.createElement("a",o({download:r},a,{ref:function(t){return e.link=t},target:"_self",href:this.state.href,onClick:this.handleClick()}),n)}}]),CSVLink}(i.default.Component);s.defaultProps=c.defaultProps,s.propTypes=c.propTypes,t.default=s},99182:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r="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 _toConsumableArray(e){if(!Array.isArray(e))return Array.from(e);for(var t=0,r=Array(e.length);t<e.length;t++)r[t]=e[t];return r}var n=t.isSafari=function(){return/^((?!chrome|android).)*safari/i.test(navigator.userAgent)},o=t.isJsons=function(e){return Array.isArray(e)&&e.every(function(e){return(void 0===e?"undefined":r(e))==="object"&&!(e instanceof Array)})},a=t.isArrays=function(e){return Array.isArray(e)&&e.every(function(e){return Array.isArray(e)})},i=t.jsonsHeaders=function(e){return Array.from(e.map(function(e){return Object.keys(e)}).reduce(function(e,t){return new Set([].concat(_toConsumableArray(e),_toConsumableArray(t)))},[]))},u=t.jsons2arrays=function(e,t){var r=t=t||i(e),n=t;return o(t)&&(r=t.map(function(e){return e.label}),n=t.map(function(e){return e.key})),[r].concat(_toConsumableArray(e.map(function(e){return n.map(function(t){return c(t,e)})})))},c=t.getHeaderValue=function(e,t){var r=e.replace(/\[([^\]]+)]/g,".$1").split(".").reduce(function(e,t,r,n){if(void 0!==e[t])return e[t];n.splice(1)},t);return void 0===r?e in t?t[e]:"":r},s=t.elementOrEmpty=function(e){return e||0===e?e:""},f=t.joiner=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:",",r=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 s(e)}).map(function(e){return""+r+e+r}).join(t)}).join("\n")},l=t.arrays2csv=function(e,t,r,n){return f(t?[t].concat(_toConsumableArray(e)):e,r,n)},p=t.jsons2csv=function(e,t,r,n){return f(u(e,t),r,n)},d=t.string2csv=function(e,t,r,n){return t?t.join(r)+"\n"+e:e},y=t.toCSV=function(e,t,r,n){if(o(e))return p(e,t,r,n);if(a(e))return l(e,t,r,n);if("string"==typeof e)return d(e,t,r);throw TypeError('Data should be a "String", "Array of arrays" OR "Array of objects" ')};t.buildURI=function(e,t,r,o,a){var i=y(e,r,o,a),u=n()?"application/csv":"text/csv",c=new Blob([t?"\uFEFF":"",i],{type:u}),s="data:"+u+";charset=utf-8,"+(t?"\uFEFF":"")+i,f=window.URL||window.webkitURL;return void 0===f.createObjectURL?s:f.createObjectURL(c)}},5090:function(e,t,r){"use strict";t.CSVLink=void 0;var n=_interopRequireDefault(r(89469)),o=_interopRequireDefault(r(26425));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}n.default,t.CSVLink=o.default},69695:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PropsNotForwarded=t.defaultProps=t.propTypes=void 0,(n=r(67294))&&n.__esModule;var n,o=r(45697);t.propTypes={data:(0,o.oneOfType)([o.string,o.array]).isRequired,headers:o.array,target:o.string,separator:o.string,filename:o.string,uFEFF:o.bool,onClick:o.func,asyncOnClick:o.bool},t.defaultProps={separator:",",filename:"generatedBy_react-csv.csv",uFEFF:!0,asyncOnClick:!1},t.PropsNotForwarded=["data","headers"]}}]);