UNPKG

49.2 kBSource Map (JSON)View Raw
1{"version":3,"sources":["webpack://object-exporter/./src/index.js","webpack://object-exporter/./src/js/csv.js","webpack://object-exporter/./src/js/doc.js","webpack://object-exporter/./src/js/el.js","webpack://object-exporter/./src/js/html.js","webpack://object-exporter/./src/js/init.js","webpack://object-exporter/./src/js/pdf.js","webpack://object-exporter/./src/js/placeholder.js","webpack://object-exporter/./src/js/xls.js","webpack://object-exporter/./node_modules/detect-browser/es/index.js","webpack://object-exporter/./node_modules/file-saver/dist/FileSaver.min.js","webpack://object-exporter/webpack/bootstrap","webpack://object-exporter/webpack/runtime/compat get default export","webpack://object-exporter/webpack/runtime/define property getters","webpack://object-exporter/webpack/runtime/global","webpack://object-exporter/webpack/runtime/hasOwnProperty shorthand","webpack://object-exporter/webpack/runtime/make namespace object","webpack://object-exporter/webpack/startup"],"names":["objectExporter","exporter","window","params","exportObject2CSV","headers","exportable","fileName","columnSeparator","unshift","headerDataset","i","length","name","alias","jsonObject","JSON","stringify","csv","convert2csv","exportFileName","blob","Blob","type","navigator","msSaveBlob","link","document","createElement","download","undefined","url","URL","createObjectURL","setAttribute","style","visibility","body","appendChild","click","removeChild","objArray","array","parse","str","line","index","substring","exportObject2Doc","headerStyle","cellStyle","repeatHeader","dataset","htmlTblCreater","htmlString","bytes","Uint8Array","charCodeAt","saveAs","columnFlex","j","k","cellContents","Object","keys","test","toLowerCase","flex","require","detect","browser","elementDom","getElementById","Error","exportableFrame","placeholder","innerHTML","remove","getElementsByTagName","iframeElement","onload","focus","contentWindow","execCommand","print","init","sheetName","documentTitle","documentTitleStyle","args","arguments","indexOf","xls","pdf","doc","html","exportObject2PDF","printableBody","srcdoc","printableElements","printableDocument","contentDocument","printableDocumentContents","head","generateFrame","printFrame","exportObject2XLS","base64","s","btoa","unescape","encodeURIComponent","format","c","replace","m","p","uri","template","ctx","worksheet","table"],"mappings":";;;;;;;;;;;;;;;;;;;AAAA;AAEA,IAAMA,cAAc,GAAGC,kDAAvB;;AAE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AArB,EAAiC;AAC/B,UAAMJ,IAAI,GAAG,IAAIC,IAAJ,CAAS,CAAC8B,OAAD,CAAT,EAAoB;AAC/B7B,YAAI,EAAE;AADyB,OAApB,CAAb;AAGAC,eAAS,CAACC,UAAV,CAAqBJ,IAArB,EAA2BD,cAA3B;AACD;AACF,GAPD,MAOO;AACL;AACAO,YAAQ,CAACU,IAAT,CAAcC,WAAd,CAA0BZ,IAA1B;AACAA,QAAI,CAACa,KAAL;AACAZ,YAAQ,CAACU,IAAT,CAAcG,WAAd,CAA0Bd,IAA1B;AACD;AACF,C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AC5DD,sBAAsB,SAAI,IAAI,SAAI;AAClC,iDAAiD,QAAQ;AACzD,wCAAwC,QAAQ;AAChD,wDAAwD,QAAQ;AAChE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACmB;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AAC8B;AAC/B;AACA;AACA;AACA,wBAAwB;AACxB;AACA;AACA;AACA;AACA;AACA,CAAC;AACkB;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AAC0B;AAC3B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6BAA6B;AAC7B;AACA,mBAAmB;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA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ACA,E;;;;;WCPA;WACA;WACA;WACA;WACA,wCAAwC,yCAAyC;WACjF;WACA;WACA,E;;;;;WCPA;WACA;WACA;WACA;WACA,EAAE;WACF;WACA;WACA,CAAC,I;;;;;WCPD,sF;;;;;WCAA;WACA;WACA;WACA,sDAAsD,kBAAkB;WACxE;WACA,+CAA+C,cAAc;WAC7D,E;;;;UCNA;UACA;UACA;UACA","file":"objectexporter.min.js","sourcesContent":["import exporter from './js/init'\n\nconst objectExporter = exporter.init\n\nif (typeof window !== 'undefined') {\n window.objectExporter = objectExporter\n}\n\nexport default objectExporter\n","export default {\n export: (params) => {\n exportObject2CSV(params.headers, params.exportable, params.fileName, params.columnSeparator)\n }\n}\n\n/**\n * Function to export the object as csv.\n * @param {array} headers the columns of the csv file.\n * @param {object} exportable the records of csv file.\n * @param {string} fileName the title of the file which needs to be exported.\n * @param {char} columnSeparator the character that separates one colum from another.\n */\nfunction exportObject2CSV (headers, exportable, fileName, columnSeparator) {\n // Check if there is headers provided\n if (headers) {\n // Check if the provided header is an arry (backward-compatibility for version below 3.3.0 - more info at: https://github.com/gharibi/JsObjExporter/issues/4)\n if (typeof headers[0] !== 'object') {\n exportable.unshift(headers)\n } else {\n const headerDataset = {}\n for (let i = 0; i < headers.length; i++) {\n headerDataset[headers[i].name] = headers[i].alias\n }\n exportable.unshift(headerDataset)\n }\n }\n\n // Convert Object to JSON\n const jsonObject = JSON.stringify(exportable)\n const csv = convert2csv(jsonObject, columnSeparator)\n const exportFileName = fileName + '.csv'\n const blob = new Blob([csv], {\n type: 'text/csv;charset=utf-8;'\n })\n if (navigator.msSaveBlob) { // IE 10+\n navigator.msSaveBlob(blob, exportFileName)\n } else {\n const link = document.createElement('a')\n if (link.download !== undefined) {\n // Browsers that support HTML5 download attribute\n const url = URL.createObjectURL(blob)\n link.setAttribute('href', url)\n link.setAttribute('download', exportFileName)\n link.style.visibility = 'hidden'\n document.body.appendChild(link)\n link.click()\n document.body.removeChild(link)\n }\n }\n}\n\n/**\n * Function to create an object of arrays to csv.\n * @param {object} objArray the json data which needs to be converted to an array.\n * @param {char} columnSeparator the character that separates one column from another.\n */\nfunction convert2csv (objArray, columnSeparator) {\n const array = typeof objArray !== 'object' ? JSON.parse(objArray) : objArray\n let str = ''\n for (let i = 0; i < array.length; i++) {\n let line = ''\n for (const index in array[i]) {\n line += array[i][index] + columnSeparator\n }\n line = line.substring(0, line.length - 1)\n str += line + '\\r\\n'\n }\n return str\n}\n","import { saveAs } from 'file-saver'\nimport { htmlTblCreater } from './el'\n\nexport default {\n export: (params) => {\n exportObject2Doc(params.headers, params.exportable, params.fileName, params.headerStyle, params.cellStyle, params.repeatHeader)\n }\n}\n\n/**\n * Function to export the dataset as doc.\n * @param {array} headers the columns of the csv file.\n * @param {object} exportable the records of csv file.\n * @param {string} fileName the title of the file which needs to be exported.\n * @param {string} headerStyle the style which can be applied to the headers.\n * @param {string} cellStyle the style which can be applied to the cells.\n * @param {boolean} repeatHeader determines whether there should be a repeated header on each page.\n */\nfunction exportObject2Doc (headers, exportable, fileName, headerStyle, cellStyle, repeatHeader) {\n // Create the html structured dataset\n const dataset = htmlTblCreater('doc', headers, exportable, headerStyle, cellStyle, repeatHeader)\n const htmlString = '<html><body>' + dataset + '</body></html>'\n\n // Create the bytes\n const bytes = new Uint8Array(htmlString.length)\n for (let i = 0; i < htmlString.length; i++) {\n bytes[i] = htmlString.charCodeAt(i)\n }\n\n // Convert the contents to blob\n const blob = new Blob([bytes], { type: 'text/html' })\n\n // Save the file as doc\n saveAs(blob, fileName + '.doc')\n}\n","export function htmlTblCreater (type, headers, exportable, headerStyle, cellStyle, repeatHeader) {\n // Construct the html structure for the provided exportable\n let dataset = '<table style=\"border-collapse: collapse;\" width=\"100%;\">'\n\n // Check if the headers should be repeated\n if (repeatHeader === true) {\n dataset += '<thead>'\n }\n\n // Check if the provided header is an arry (backward-compatibility for version below 3.3.0 - more info at: https://github.com/gharibi/JsObjExporter/issues/4)\n let columnFlex = 0\n if (typeof headers[0] !== 'object') {\n // Construct the table headers\n dataset += '<tr>'\n for (let j = 0; j < headers.length; j++) {\n dataset += '<th style=\"' + headerStyle + '\" >' + headers[j] + '</th>'\n }\n dataset += '</tr>'\n\n // Check if the headers should be repeated\n if (repeatHeader === true) {\n dataset += '</thead>'\n }\n\n // Construct the body elements\n for (let j = 0; j < exportable.length; j++) {\n dataset += '<tr style=\"' + cellStyle + '\">'\n for (let k = 0; k < Object.keys(exportable[j]).length - 1; k++) {\n // Check if the input string is HTML, if so, do not add the cell tags\n const cellContents = exportable[j][Object.keys(exportable[j])[k]]\n if (/<[a-z][\\s\\S]*>/i.test(cellContents) === true) {\n dataset += cellContents\n } else {\n dataset += '<td style=\"' + cellStyle + '\" ' + (function () {\n return (type.toLowerCase() === 'csv') ? 'width=\"' + (headers[k].flex / columnFlex) * 100 + '%;\"' : ''\n })() + ' >' + cellContents + '</td>'\n }\n }\n dataset += '</tr>'\n }\n dataset += '</table>'\n } else {\n for (let i = 0; i < headers.length; i++) {\n // Check if the header contains a flex, otherwise consider flex=1 to have equal sized columns\n columnFlex += (function () {\n return ('flex' in headers[i]) ? headers[i].flex : 1\n })()\n }\n\n // Construct the table headers\n dataset += '<tr>'\n for (let j = 0; j < headers.length; j++) {\n dataset += '<th style=\"' + headerStyle + '\" width=\"' + (headers[j].flex / columnFlex) * 100 + '%;\" >' + headers[j].alias + '</th>'\n }\n dataset += '</tr>'\n\n // Check if the headers should be repeated\n if (repeatHeader === true) {\n dataset += '</thead>'\n }\n\n // Construct the body elements\n for (let j = 0; j < exportable.length; j++) {\n dataset += '<tr style=\"' + cellStyle + '\">'\n // Loop through the header items to show only the items associated with a header\n for (let k = 0; k < headers.length; k++) {\n // Check if the input string is HTML, if so, do not add the cell tags\n const cellContents = exportable[j][headers[k].name]\n if (/<[a-z][\\s\\S]*>/i.test(cellContents) === true) {\n dataset += cellContents\n } else {\n dataset += '<td style=\"' + cellStyle + '\" ' + (function () {\n return (type.toLowerCase() === 'csv') ? 'width=\"' + (headers[k].flex / columnFlex) * 100 + '%;\"' : ''\n })() + ' >' + cellContents + '</td>'\n }\n }\n dataset += '</tr>'\n }\n }\n\n // Return the dataset\n return dataset\n}\n","import placeholder from './placeholder'\nconst { detect } = require('detect-browser')\n\nexport default {\n export: (params) => {\n // Detect the browser information\n const browser = detect()\n\n // Retrieve the DOM for the requested exportable\n const elementDom = document.getElementById(params.exportable)\n\n // Check if the DOM is available\n if (typeof elementDom === 'undefined') {\n throw new Error('There is no DOM object available for the requested id.')\n }\n\n // Construct the exportable for the print\n const exportableFrame = placeholder.generateFrame(params, elementDom.innerHTML)\n\n // Cleanup the DOM from the exportable frame\n if (document.getElementById('jsObjExporterFrameId')) document.getElementById('jsObjExporterFrameId').remove()\n\n // Attach the exportable frame to the document body\n document.getElementsByTagName('body')[0].appendChild(exportableFrame)\n\n // Get the iframe element\n const iframeElement = document.getElementById('jsObjExporterFrameId')\n\n // Set the onload method\n exportableFrame.onload = () => {\n // Focus on the frame for priting\n iframeElement.focus()\n\n // Check the if the browser is Edge or Internet Explorer\n if (browser.name === 'edge' || browser.name === 'ie') {\n iframeElement.contentWindow.document.execCommand('print', false, null)\n } else {\n // All other browsers\n iframeElement.contentWindow.print()\n }\n }\n }\n}\n","'use strict'\n\nimport csv from './csv'\nimport xls from './xls'\nimport pdf from './pdf'\nimport doc from './doc'\nimport html from './html'\n\nexport default {\n init () {\n const params = {\n type: 'object',\n headers: null,\n exportable: null,\n fileName: 'export',\n headerStyle: 'font-size:16px; font-weight:bold;',\n cellStyle: 'font-size:14px;',\n sheetName: 'worksheet',\n documentTitle: 'test document title',\n documentTitleStyle: 'color:red;',\n repeatHeader: true,\n columnSeparator: ','\n }\n\n // Check if an exportable document or object was supplied\n const args = arguments[0]\n if (args === undefined) throw new Error('obj2csv expects at least 1 exportable!')\n\n // Process parameters\n switch (typeof args) {\n case 'object':\n params.exportable = args.exportable\n params.type = typeof args.type !== 'undefined' ? args.type : params.type\n params.headers = typeof args.headers !== 'undefined' ? args.headers : params.headers\n params.fileName = typeof args.fileName !== 'undefined' ? args.fileName : params.fileName\n params.headerStyle = typeof args.headerStyle !== 'undefined' ? args.headerStyle : params.headerStyle\n params.cellStyle = typeof args.cellStyle !== 'undefined' ? args.cellStyle : params.cellStyle\n params.sheetName = typeof args.sheetName !== 'undefined' ? args.sheetName : params.sheetName\n params.documentTitle = typeof args.documentTitle !== 'undefined' ? args.documentTitle : params.documentTitle\n params.documentTitleStyle = typeof args.documentTitleStyle !== 'undefined' ? args.documentTitleStyle : params.documentTitleStyle\n params.repeatHeader = typeof args.repeatHeader !== 'undefined' ? args.repeatHeader : params.repeatHeader\n params.columnSeparator = typeof args.columnSeparator !== 'undefined' ? args.columnSeparator : params.columnSeparator\n break\n default:\n throw new Error('Unexpected argument type! Expected \"object\", got ' + typeof args)\n }\n\n // Validate type\n if (!params.exportable) {\n throw new Error('Invalid exportable!')\n }\n if (!params.type || typeof params.type !== 'string') {\n throw new Error('Invalid exportable type! only string type is acceptable!')\n }\n if (['csv', 'xls', 'pdf', 'doc', 'html'].indexOf(params.type.toLowerCase()) === -1) {\n throw new Error('Invalid exportable type. Available types are \"CSV\", \"XLS\", \"pdf\" and \"DOC\".')\n }\n if (typeof params.repeatHeader !== 'boolean' && typeof params.repeatHeader !== 'undefined') {\n throw new Error('Invalid value for the repeat header parameter. Available types are \"true\" and \"false\".')\n }\n\n // Check exportable type\n switch (params.type) {\n case 'csv':\n csv.export(params)\n break\n case 'xls':\n xls.export(params)\n break\n case 'pdf':\n pdf.export(params)\n break\n case 'doc':\n doc.export(params)\n break\n case 'html':\n html.export(params)\n break\n }\n }\n}\n","import { htmlTblCreater } from './el'\nconst { detect } = require('detect-browser')\n\nexport default {\n export: (params) => {\n exportObject2PDF(params.documentTitle, params.documentTitleStyle, params.headers, params.exportable, params.headerStyle, params.cellStyle, params.repeatHeader)\n }\n}\n\nfunction exportObject2PDF (documentTitle, documentTitleStyle, headers, exportable, headerStyle, cellStyle, repeatHeader) {\n // Define a printable body element\n const printableBody = document.createElement('iframe')\n\n // Set the prontableBody to hidden\n printableBody.setAttribute('style', 'visibility: hidden; height: 0; width: 0; position: absolute;')\n printableBody.setAttribute('id', 'objectExporterPrintableBodyId')\n\n // Construct the document title\n printableBody.srcdoc = '<html></html>'\n\n // Append the printableBody to the current document\n document.getElementsByTagName('body')[0].appendChild(printableBody)\n\n // Get the printable elements\n const printableElements = document.getElementById('objectExporterPrintableBodyId')\n\n // Check when the printableBody is loaded successfully\n printableBody.onload = () => {\n // Detect the browser information\n const browser = detect()\n\n // Define a printable document\n let printableDocument = (printableElements.contentWindow || printableElements.contentDocument)\n\n // Check if there is document element\n if (printableDocument.document) printableDocument = printableDocument.document\n let printableDocumentContents = '<span style=\"' + documentTitleStyle + '\">' + documentTitle + '</span><br>'\n printableDocumentContents += htmlTblCreater('pdf', headers, exportable, headerStyle, cellStyle, repeatHeader)\n printableDocument.body.innerHTML = printableDocumentContents\n\n // Assign style to the printable\n const style = document.createElement('style')\n style.innerHTML = ''\n printableDocument.head.appendChild(style)\n\n // Prepare the printable for the print\n printableElements.focus()\n\n // Check the if the browser is Edge or Internet Explorer\n if (browser.name === 'edge' || browser.name === 'ie') {\n printableElements.contentWindow.document.execCommand('print', false, null)\n } else {\n // All other browsers\n printableElements.contentWindow.print()\n }\n }\n}\n","const placeholder = {\n /**\n * Method to generate the frame for opening the print/export dialog.\n * @param {object} params parameters which will are provided at the API level.\n * @param {string} body the body of the element which needs to be exported.\n */\n generateFrame: (params, body) => {\n const printFrame = document.createElement('iframe')\n printFrame.setAttribute('style', 'visibility: hidden; height: 0; width: 0; position: absolute;')\n printFrame.setAttribute('id', 'jsObjExporterFrameId')\n printFrame.srcdoc = '</head><body>' + body + '</body></html>'\n return printFrame\n }\n}\n\n// Export the module\nexport default placeholder\n","import { htmlTblCreater } from './el'\nconst { detect } = require('detect-browser')\n\nexport default {\n export: (params) => {\n exportObject2XLS(params.headers, params.exportable, params.fileName, params.headerStyle, params.cellStyle, params.sheetName, params.documentTitle, params.documentTitleStyle)\n }\n}\n\n// Defining the required functions\nconst base64 = s => {\n return window.btoa(unescape(encodeURIComponent(s)))\n}\nconst format = (s, c) => {\n return s.replace(/{(\\w+)}/g, function (m, p) { return c[p] })\n}\nconst uri = 'data:application/vnd.ms-excel;base64,'\nconst template = '<html xmlns:o=\"urn:schemas-microsoft-com:office:office\" xmlns:x=\"urn:schemas-microsoft-com:office:excel\" xmlns=\"http://www.w3.org/TR/REC-html40\"><head><!--[if gte mso 9]><xml><x:ExcelWorkbook><x:ExcelWorksheets><x:ExcelWorksheet><x:Name>{worksheet}</x:Name><x:WorksheetOptions><x:DisplayGridlines/></x:WorksheetOptions></x:ExcelWorksheet></x:ExcelWorksheets></x:ExcelWorkbook></xml><![endif]--><meta http-equiv=\"content-type\" content=\"text/plain; charset=UTF-8\"/></head><body><table>{table}</table></body></html>'\n\n/**\n * Function to export the dataset as xls.\n * @param {array} headers the columns of the csv file.\n * @param {object} exportable the records of csv file.\n * @param {string} fileName the title of the file which needs to be exported.\n * @param {string} headerStyle the style which can be applied to the headers.\n * @param {string} cellStyle the style which can be applied to the cells.\n * @param {string} sheetName the excel sheet name which needs to be applied to the exported xls file.\n * @param {string} documentTitle the document title which needs to be written as a header on the excel sheet.\n * @param {string} documentTitleStyle the style of the document title.\n */\nfunction exportObject2XLS (headers, exportable, fileName, headerStyle, cellStyle, sheetName, documentTitle, documentTitleStyle) {\n // Construct the html structure for the provided exportable\n let dataset = '<span style=\"' + documentTitleStyle + '\">' + documentTitle + '</span><br>'\n dataset += htmlTblCreater('xls', headers, exportable, headerStyle, cellStyle, false)\n\n // Push the file for being downloaded\n const ctx = { worksheet: sheetName, table: dataset }\n const link = document.createElement('a')\n const exportFileName = fileName + '.xls'\n link.setAttribute('href', uri + base64(format(template, ctx)))\n link.setAttribute('download', exportFileName)\n link.style.visibility = 'hidden'\n\n // Detect the browser information\n const browser = detect()\n\n // Check the if the browser is Edge or Internet Explorer\n if (browser.name === 'edge' || browser.name === 'ie') {\n if (window.navigator.msSaveBlob) {\n const blob = new Blob([dataset], {\n type: 'data:application/vnd.ms-excel;'\n })\n navigator.msSaveBlob(blob, exportFileName)\n }\n } else {\n // All other browsers\n document.body.appendChild(link)\n link.click()\n document.body.removeChild(link)\n }\n}\n","var __spreadArrays = (this && this.__spreadArrays) || function () {\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\n for (var r = Array(s), k = 0, i = 0; i < il; i++)\n for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\n r[k] = a[j];\n return r;\n};\nvar BrowserInfo = /** @class */ (function () {\n function BrowserInfo(name, version, os) {\n this.name = name;\n this.version = version;\n this.os = os;\n this.type = 'browser';\n }\n return BrowserInfo;\n}());\nexport { BrowserInfo };\nvar NodeInfo = /** @class */ (function () {\n function NodeInfo(version) {\n this.version = version;\n this.type = 'node';\n this.name = 'node';\n this.os = process.platform;\n }\n return NodeInfo;\n}());\nexport { NodeInfo };\nvar SearchBotDeviceInfo = /** @class */ (function () {\n function SearchBotDeviceInfo(name, version, os, bot) {\n this.name = name;\n this.version = version;\n this.os = os;\n this.bot = bot;\n this.type = 'bot-device';\n }\n return SearchBotDeviceInfo;\n}());\nexport { SearchBotDeviceInfo };\nvar BotInfo = /** @class */ (function () {\n function BotInfo() {\n this.type = 'bot';\n this.bot = true; // NOTE: deprecated test name instead\n this.name = 'bot';\n this.version = null;\n this.os = null;\n }\n return BotInfo;\n}());\nexport { BotInfo };\nvar ReactNativeInfo = /** @class */ (function () {\n function ReactNativeInfo() {\n this.type = 'react-native';\n this.name = 'react-native';\n this.version = null;\n this.os = null;\n }\n return ReactNativeInfo;\n}());\nexport { ReactNativeInfo };\n// tslint:disable-next-line:max-line-length\nvar SEARCHBOX_UA_REGEX = /alexa|bot|crawl(er|ing)|facebookexternalhit|feedburner|google web preview|nagios|postrank|pingdom|slurp|spider|yahoo!|yandex/;\nvar SEARCHBOT_OS_REGEX = /(nuhk|Googlebot|Yammybot|Openbot|Slurp|MSNBot|Ask\\ Jeeves\\/Teoma|ia_archiver)/;\nvar REQUIRED_VERSION_PARTS = 3;\nvar userAgentRules = [\n ['aol', /AOLShield\\/([0-9\\._]+)/],\n ['edge', /Edge\\/([0-9\\._]+)/],\n ['edge-ios', /EdgiOS\\/([0-9\\._]+)/],\n ['yandexbrowser', /YaBrowser\\/([0-9\\._]+)/],\n ['kakaotalk', /KAKAOTALK\\s([0-9\\.]+)/],\n ['samsung', /SamsungBrowser\\/([0-9\\.]+)/],\n ['silk', /\\bSilk\\/([0-9._-]+)\\b/],\n ['miui', /MiuiBrowser\\/([0-9\\.]+)$/],\n ['beaker', /BeakerBrowser\\/([0-9\\.]+)/],\n ['edge-chromium', /EdgA?\\/([0-9\\.]+)/],\n [\n 'chromium-webview',\n /(?!Chrom.*OPR)wv\\).*Chrom(?:e|ium)\\/([0-9\\.]+)(:?\\s|$)/,\n ],\n ['chrome', /(?!Chrom.*OPR)Chrom(?:e|ium)\\/([0-9\\.]+)(:?\\s|$)/],\n ['phantomjs', /PhantomJS\\/([0-9\\.]+)(:?\\s|$)/],\n ['crios', /CriOS\\/([0-9\\.]+)(:?\\s|$)/],\n ['firefox', /Firefox\\/([0-9\\.]+)(?:\\s|$)/],\n ['fxios', /FxiOS\\/([0-9\\.]+)/],\n ['opera-mini', /Opera Mini.*Version\\/([0-9\\.]+)/],\n ['opera', /Opera\\/([0-9\\.]+)(?:\\s|$)/],\n ['opera', /OPR\\/([0-9\\.]+)(:?\\s|$)/],\n ['ie', /Trident\\/7\\.0.*rv\\:([0-9\\.]+).*\\).*Gecko$/],\n ['ie', /MSIE\\s([0-9\\.]+);.*Trident\\/[4-7].0/],\n ['ie', /MSIE\\s(7\\.0)/],\n ['bb10', /BB10;\\sTouch.*Version\\/([0-9\\.]+)/],\n ['android', /Android\\s([0-9\\.]+)/],\n ['ios', /Version\\/([0-9\\._]+).*Mobile.*Safari.*/],\n ['safari', /Version\\/([0-9\\._]+).*Safari/],\n ['facebook', /FBAV\\/([0-9\\.]+)/],\n ['instagram', /Instagram\\s([0-9\\.]+)/],\n ['ios-webview', /AppleWebKit\\/([0-9\\.]+).*Mobile/],\n ['ios-webview', /AppleWebKit\\/([0-9\\.]+).*Gecko\\)$/],\n ['searchbot', SEARCHBOX_UA_REGEX],\n];\nvar operatingSystemRules = [\n ['iOS', /iP(hone|od|ad)/],\n ['Android OS', /Android/],\n ['BlackBerry OS', /BlackBerry|BB10/],\n ['Windows Mobile', /IEMobile/],\n ['Amazon OS', /Kindle/],\n ['Windows 3.11', /Win16/],\n ['Windows 95', /(Windows 95)|(Win95)|(Windows_95)/],\n ['Windows 98', /(Windows 98)|(Win98)/],\n ['Windows 2000', /(Windows NT 5.0)|(Windows 2000)/],\n ['Windows XP', /(Windows NT 5.1)|(Windows XP)/],\n ['Windows Server 2003', /(Windows NT 5.2)/],\n ['Windows Vista', /(Windows NT 6.0)/],\n ['Windows 7', /(Windows NT 6.1)/],\n ['Windows 8', /(Windows NT 6.2)/],\n ['Windows 8.1', /(Windows NT 6.3)/],\n ['Windows 10', /(Windows NT 10.0)/],\n ['Windows ME', /Windows ME/],\n ['Open BSD', /OpenBSD/],\n ['Sun OS', /SunOS/],\n ['Chrome OS', /CrOS/],\n ['Linux', /(Linux)|(X11)/],\n ['Mac OS', /(Mac_PowerPC)|(Macintosh)/],\n ['QNX', /QNX/],\n ['BeOS', /BeOS/],\n ['OS/2', /OS\\/2/],\n];\nexport function detect(userAgent) {\n if (!!userAgent) {\n return parseUserAgent(userAgent);\n }\n if (typeof document === 'undefined' &&\n typeof navigator !== 'undefined' &&\n navigator.product === 'ReactNative') {\n return new ReactNativeInfo();\n }\n if (typeof navigator !== 'undefined') {\n return parseUserAgent(navigator.userAgent);\n }\n return getNodeVersion();\n}\nfunction matchUserAgent(ua) {\n // opted for using reduce here rather than Array#first with a regex.test call\n // this is primarily because using the reduce we only perform the regex\n // execution once rather than once for the test and for the exec again below\n // probably something that needs to be benchmarked though\n return (ua !== '' &&\n userAgentRules.reduce(function (matched, _a) {\n var browser = _a[0], regex = _a[1];\n if (matched) {\n return matched;\n }\n var uaMatch = regex.exec(ua);\n return !!uaMatch && [browser, uaMatch];\n }, false));\n}\nexport function browserName(ua) {\n var data = matchUserAgent(ua);\n return data ? data[0] : null;\n}\nexport function parseUserAgent(ua) {\n var matchedRule = matchUserAgent(ua);\n if (!matchedRule) {\n return null;\n }\n var name = matchedRule[0], match = matchedRule[1];\n if (name === 'searchbot') {\n return new BotInfo();\n }\n var versionParts = match[1] && match[1].split(/[._]/).slice(0, 3);\n if (versionParts) {\n if (versionParts.length < REQUIRED_VERSION_PARTS) {\n versionParts = __spreadArrays(versionParts, createVersionParts(REQUIRED_VERSION_PARTS - versionParts.length));\n }\n }\n else {\n versionParts = [];\n }\n var version = versionParts.join('.');\n var os = detectOS(ua);\n var searchBotMatch = SEARCHBOT_OS_REGEX.exec(ua);\n if (searchBotMatch && searchBotMatch[1]) {\n return new SearchBotDeviceInfo(name, version, os, searchBotMatch[1]);\n }\n return new BrowserInfo(name, version, os);\n}\nexport function detectOS(ua) {\n for (var ii = 0, count = operatingSystemRules.length; ii < count; ii++) {\n var _a = operatingSystemRules[ii], os = _a[0], regex = _a[1];\n var match = regex.exec(ua);\n if (match) {\n return os;\n }\n }\n return null;\n}\nexport function getNodeVersion() {\n var isNode = typeof process !== 'undefined' && process.version;\n return isNode ? new NodeInfo(process.version.slice(1)) : null;\n}\nfunction createVersionParts(count) {\n var output = [];\n for (var ii = 0; ii < count; ii++) {\n output.push('0');\n }\n return output;\n}\n","(function(a,b){if(\"function\"==typeof define&&define.amd)define([],b);else if(\"undefined\"!=typeof exports)b();else{b(),a.FileSaver={exports:{}}.exports}})(this,function(){\"use strict\";function b(a,b){return\"undefined\"==typeof b?b={autoBom:!1}:\"object\"!=typeof b&&(console.warn(\"Deprecated: Expected third argument to be a object\"),b={autoBom:!b}),b.autoBom&&/^\\s*(?:text\\/\\S*|application\\/xml|\\S*\\/\\S*\\+xml)\\s*;.*charset\\s*=\\s*utf-8/i.test(a.type)?new Blob([\"\\uFEFF\",a],{type:a.type}):a}function c(b,c,d){var e=new XMLHttpRequest;e.open(\"GET\",b),e.responseType=\"blob\",e.onload=function(){a(e.response,c,d)},e.onerror=function(){console.error(\"could not download file\")},e.send()}function d(a){var b=new XMLHttpRequest;b.open(\"HEAD\",a,!1);try{b.send()}catch(a){}return 200<=b.status&&299>=b.status}function e(a){try{a.dispatchEvent(new MouseEvent(\"click\"))}catch(c){var b=document.createEvent(\"MouseEvents\");b.initMouseEvent(\"click\",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),a.dispatchEvent(b)}}var f=\"object\"==typeof window&&window.window===window?window:\"object\"==typeof self&&self.self===self?self:\"object\"==typeof global&&global.global===global?global:void 0,a=f.saveAs||(\"object\"!=typeof window||window!==f?function(){}:\"download\"in HTMLAnchorElement.prototype?function(b,g,h){var i=f.URL||f.webkitURL,j=document.createElement(\"a\");g=g||b.name||\"download\",j.download=g,j.rel=\"noopener\",\"string\"==typeof b?(j.href=b,j.origin===location.origin?e(j):d(j.href)?c(b,g,h):e(j,j.target=\"_blank\")):(j.href=i.createObjectURL(b),setTimeout(function(){i.revokeObjectURL(j.href)},4E4),setTimeout(function(){e(j)},0))}:\"msSaveOrOpenBlob\"in navigator?function(f,g,h){if(g=g||f.name||\"download\",\"string\"!=typeof f)navigator.msSaveOrOpenBlob(b(f,h),g);else if(d(f))c(f,g,h);else{var i=document.createElement(\"a\");i.href=f,i.target=\"_blank\",setTimeout(function(){e(i)})}}:function(a,b,d,e){if(e=e||open(\"\",\"_blank\"),e&&(e.document.title=e.document.body.innerText=\"downloading...\"),\"string\"==typeof a)return c(a,b,d);var g=\"application/octet-stream\"===a.type,h=/constructor/i.test(f.HTMLElement)||f.safari,i=/CriOS\\/[\\d]+/.test(navigator.userAgent);if((i||g&&h)&&\"object\"==typeof FileReader){var j=new FileReader;j.onloadend=function(){var a=j.result;a=i?a:a.replace(/^data:[^;]*;/,\"data:attachment/file;\"),e?e.location.href=a:location=a,e=null},j.readAsDataURL(a)}else{var k=f.URL||f.webkitURL,l=k.createObjectURL(a);e?e.location=l:location.href=l,e=null,setTimeout(function(){k.revokeObjectURL(l)},4E4)}});f.saveAs=a.saveAs=a,\"undefined\"!=typeof module&&(module.exports=a)});\n\n//# sourceMappingURL=FileSaver.min.js.map","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tif(__webpack_module_cache__[moduleId]) {\n\t\treturn __webpack_module_cache__[moduleId].exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => module['default'] :\n\t\t() => module;\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.g = (function() {\n\tif (typeof globalThis === 'object') return globalThis;\n\ttry {\n\t\treturn this || new Function('return this')();\n\t} catch (e) {\n\t\tif (typeof window === 'object') return window;\n\t}\n})();","__webpack_require__.o = (obj, prop) => Object.prototype.hasOwnProperty.call(obj, prop)","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","// startup\n// Load entry module\n__webpack_require__(\"./src/index.js\");\n// This entry module used 'exports' so it can't be inlined\n"],"sourceRoot":""}
\No newline at end of file