{"version":3,"sources":["options.ts","option-list.tsx","action-creaters.ts","dropzone.tsx","footer.tsx","main.tsx","download.tsx","App.tsx","serviceWorker.ts","store.ts","index.tsx"],"names":["options","name","default","description","default_options","map","g","flat","reduce","a","v","option_descriptions","BigTooltip","withStyles","theme","tooltip","fontSize","Tooltip","mapDispatchToProps","dispatch","toggle_setting","x","option","getState","type","file","file_path","formdata","FormData","append","JSON","stringify","size","axios","method","url","data","headers","then","response","success","path","payload","body","message","catch","Option","connect","state","ownProps","checked","props","title","enterDelay","placement","key","ListItem","button","onClick","dense","Checkbox","color","value","ListItemText","primary","OptionGroup","React","useState","open","setOpen","Collapse","in","timeout","unmountOnExit","List","item","OptionList","option_spec","ol","useStyles","makeStyles","dropzone","height","DropZone","on_drop","endsWith","create_path_action","on_error","drop_error","classes","id","onDrop","ev","stopPropagation","preventDefault","persist","dataTransfer","items","fileItem","i","length","kind","getAsFile","files","onDragOver","event","className","children","createStyles","text","padding","spacing","paper","paddingBottom","list","marginBottom","subheader","backgroundColor","palette","background","appBar","zIndex","drawer","top","bottom","grow","flexGrow","fabButton","position","left","right","margin","search","borderRadius","shape","fade","common","white","marginLeft","width","inputRoot","inputInput","transition","transitions","create","Footer","jmesquery","jmesquery_is_valid","jmesquery_result","jmesquery_error","set_jmespath","is_valid","JmesPath","compile","deactivate_jsmespath","activate_jmespath","file_contents","out","jmespath_error","callback","useEffect","window","addEventListener","removeEventListener","AppBar","Toolbar","InputBase","placeholder","root","input","inputProps","onChange","target","onKeyPress","IconButton","disabled","error","display","justifyContent","alignItems","content","wrapper","fabProgress","contents","error_message","loading","Typography","src","displayObjectSize","displayDataTypes","enableClipboard","Fab","aria-label","CircularProgress","Paper","href","style","textDecoration","filename","element","document","createElement","setAttribute","encodeURIComponent","appendChild","click","removeChild","download","substring","flexShrink","drawerPaper","toolbar","mixins","red","secondary","dark","handle","paddingRight","has_contents","toggleOpen","MyDrawer","Drawer","variant","CssBaseline","noWrap","Boolean","location","hostname","match","composeEnhancers","__REDUX_DEVTOOLS_EXTENSION_COMPOSE__","compose","store","createStore","action","is_invalid","undefined","applyMiddleware","thunkMiddleware","ReactDOM","render","getElementById","navigator","serviceWorker","ready","registration","unregister"],"mappings":"0UAWaA,EAA0B,CACnC,CACI,aAAc,UACdA,QAAS,CACL,CACIC,KAAM,gBACNC,SAAS,EACTC,YACI,+FAER,CACIF,KAAM,yBACNC,SAAS,EACTC,YACI,gKAKhB,CACI,aAAc,4BACdH,QAAS,CACL,CACIC,KAAM,0BACNC,SAAS,EACTC,YACI,oHAGR,CACIF,KAAM,oBACNC,SAAS,EACTC,YACI,iFAGR,CACIF,KAAM,6BACNC,SAAS,EACTC,YACI,6JAGR,CACIF,KAAM,8BACNC,SAAS,EACTC,YACI,+GAGR,CACIF,KAAM,uBACNC,SAAS,EACTC,YACI,uEAGR,CACIF,KAAM,iBACNC,SAAS,EACTC,YACI,8LAKhB,CACI,aAAc,kBACdH,QAAS,CACL,CACIC,KAAM,cACNC,SAAS,EACTC,YAAa,0CAGjB,CACIF,KAAM,eACNC,SAAS,EACTC,YACI,0GAGR,CACIF,KAAM,cACNC,SAAS,EACTC,YACI,sOAGR,CACIF,KAAM,6BACNC,SAAS,EACTC,YAAa,mDAGjB,CACIF,KAAM,iBACNC,SAAS,EACTC,YACI,wOAGR,CACIF,KAAM,gBACNC,SAAS,EACTC,YACI,0MAGR,CACIF,KAAM,4BACNC,SAAS,EACTC,YACI,gFAGR,CACIF,KAAM,4BACNC,SAAS,EACTC,YACI,iFAKhB,CACI,aAAc,kBACdH,QAAS,CACL,CACIC,KAAM,2BACNC,SAAS,EACTC,YACI,mGAGR,CACIF,KAAM,8BACNC,SAAS,EACTC,YACI,gRAIhB,CACI,aAAc,gBACdH,QAAS,CACL,CACIC,KAAM,oBACNC,SAAS,EACTC,YACI,+HAGR,CACIF,KAAM,qBACNC,SAAS,EACTC,YACI,uGAGR,CACIF,KAAM,oBACNC,SAAS,EACTC,YACI,kPAGR,CACIF,KAAM,oBACNC,S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XC,oBAAoB,GAExBkF,GAAiBQ,aAAgBC,QClKrCC,IAASC,OACL,kBAAC,IAAD,CAAUR,MAAOA,IAAO,kBAAC,GAAD,OAEtBhC,SAASyC,eAAe,SF+HxB,kBAAmBC,WACrBA,UAAUC,cAAcC,MAAM9M,MAAK,SAAA+M,GACjCA,EAAaC,iB","file":"static/js/main.b4334828.chunk.js","sourcesContent":["export interface option_descriptor {\n name: string;\n default: boolean;\n description: string;\n}\n\nexport interface option_group {\n \"group-name\": string;\n options: option_descriptor[];\n}\n\nexport const options: option_group[] = [\n {\n \"group-name\": \"General\",\n options: [\n {\n name: \"friendly-name\",\n default: true,\n description:\n 'Use user-friendly type names such as \"table-cell\", over standard element names like \"CT_Tc\"'\n },\n {\n name: \"merge-consecutive-text\",\n default: true,\n description:\n \"Sentences and even single words can be represented by multiple text elements. If `true`, concatenate consecutive text elements into a single text element.\"\n }\n ]\n },\n\n {\n \"group-name\": \"Ignoring Invisible things\",\n options: [\n {\n name: \"ignore-empty-paragraphs\",\n default: true,\n description:\n \"Empty paragraphs are often used for styling purpose and rarely have significance in the meaning of the document.\"\n },\n\n {\n name: \"ignore-empty-text\",\n default: true,\n description:\n \"Empty text runs can make an otherwise empty paragraph appear to contain data.\"\n },\n\n {\n name: \"remove-leading-white-space\",\n default: true,\n description:\n \"Leading white-space at the start of a paragraph is ocassionaly used for styling purposes and rarely has significance in the interpretation of a document.\"\n },\n\n {\n name: \"remove-trailing-white-space\",\n default: true,\n description:\n \"Trailing white-space at the end of a paragraph rarely has significance in the interpretation of a document.\"\n },\n\n {\n name: \"flatten-inner-spaces\",\n default: false,\n description:\n \"Collapse multiple space characters between words to a single space.\"\n },\n\n {\n name: \"ignore-joiners\",\n default: false,\n description:\n \"Zero width joiner and non-joiner characters are special characters used to create ligatures in displayed text and don't typically convey meaning (at least in alphabet based languages).\"\n }\n ]\n },\n\n {\n \"group-name\": \"Special symbols\",\n options: [\n {\n name: \"dumb-quotes\",\n default: true,\n description: \"Replace smart quotes with dumb quotes.\"\n },\n\n {\n name: \"dumb-hyphens\",\n default: true,\n description:\n \"Replace en-dash, em-dash, figure-dash, horizontal bar, and non-breaking hyphens with ordinary hyphens.\"\n },\n\n {\n name: \"dumb-spaces\",\n default: true,\n description:\n \"Replace zero width spaces, hair spaces, thin spaces, punctuation spaces, figure spaces, six per em spaces, four per em spaces, three per em spaces, em spaces, en spaces, em quad spaces, and en quad spaces with ordinary spaces.\"\n },\n\n {\n name: \"special-characters-as-text\",\n default: true,\n description: \"Coerce special characters into text equivalents\"\n },\n\n {\n name: \"symbol-as-text\",\n default: true,\n description:\n \"Special symbols often cary meaning other than the underlying unicode character, especially when the font is a special font such as `Wingdings`. If `true` these are included as ordinary text and their font information is omitted.\"\n },\n\n {\n name: \"empty-as-text\",\n default: false,\n description:\n 'There are a variety of \"Empty\" tags such as the `<\"w:yearLong\">` tag which cause the current year to be inserted into the document text. If `true`, include these as text formatted as `\"[yearLong]\"`.'\n },\n\n {\n name: \"ignore-left-to-right-mark\",\n default: false,\n description:\n \"Ignore the left-to-right mark, which is not writeable by pythons csv writer.\"\n },\n\n {\n name: \"ignore-right-to-left-mark\",\n default: false,\n description:\n \"Ignore the right-to-left mark which is not writeable by pythons csv writer.\"\n }\n ]\n },\n\n {\n \"group-name\": \"Paragraph style\",\n options: [\n {\n name: \"include-paragraph-indent\",\n default: true,\n description:\n \"Include the indentation markup on paragraph (`CT_P`) elements. Indentation is measured in twips\"\n },\n\n {\n name: \"include-paragraph-numbering\",\n default: true,\n description:\n \"Include the numbering styles, which are included in the `CT_P.pPr.numPr` element. The `ilvl` attribute indicates the level of nesting (zero based index) and the `numId` attribute refers to a specific numbering style included in the document's internal styles sheet. \"\n }\n ]\n },\n {\n \"group-name\": \"Form Elements\",\n options: [\n {\n name: \"simplify-dropdown\",\n default: true,\n description:\n \"Include just the selected and default values, the available options, and the name and label attributes in the form element.\"\n },\n\n {\n name: \"simplify-textinput\",\n default: true,\n description:\n \"Include just the current and default values, and the name and label attributes in the form element.\"\n },\n\n {\n name: \"greedy-text-input\",\n default: true,\n description:\n \"Continue consuming run elements when the text-input has not ended at the end of a paragraph, and the next block level element is also a paragraph. This typically occurs when the user preses the return key while editing a text input field.\"\n },\n\n {\n name: \"simplify-checkbox\",\n default: true,\n description:\n \"Include just the current and default values, and the name and label attributes in the form element.\"\n },\n\n {\n name: \"use-checkbox-default\",\n default: true,\n description:\n \"If the checkbox has no `value` attribute (typically because the user has not interacted with it), report the default value as the checkbox value.\"\n },\n\n {\n name: \"checkbox-as-text\",\n default: false,\n description:\n 'Coerce the value of the checkbox to text, represented as either `\"[CheckBox:true]\"` or `\"[CheckBox:false]\"`'\n },\n\n {\n name: \"dropdown-as-text\",\n default: false,\n description:\n 'Coerce the value of the checkbox to text, represented as `\"[DropDown:]\"`'\n },\n\n {\n name: \"trim-dropdown-options\",\n default: true,\n description:\n \"Remove white-space on the left and right of drop down option items.\"\n },\n\n {\n name: \"flatten-generic-field\",\n default: true,\n description:\n \"`generic-fields` are `CT_FldChar` runs which are not marked as a drop-down, text-input, or checkbox. These may include special instructions which apply special formatting to a text run (e.g. a hyper link). If `true`, the contents of generic-fields are included in the normal flow of text\"\n }\n ]\n },\n\n {\n \"group-name\": \"Special content\",\n options: [\n {\n name: \"flatten-hyperlink\",\n default: true,\n description:\n \"Flatten hyperlinks, including their contents in the flow of normal text.\"\n },\n\n {\n name: \"flatten-smartTag\",\n default: true,\n description:\n \"Flatten smartTag elements, including their contents in the flow of normal text.\"\n },\n\n {\n name: \"flatten-customXml\",\n default: true,\n description:\n \"Flatten customXml elements, including their contents in the flow of normal text.\"\n },\n\n {\n name: \"flatten-simpleField\",\n default: true,\n description:\n \"Flatten simpleField elements, including their contents in the flow of normal text.\"\n }\n ]\n }\n];\n\ninterface option_values {\n [option: string]: boolean;\n}\nexport const default_options: option_values = options\n .map(g => g.options)\n .flat()\n .reduce((a: option_values, v: option_descriptor) => {\n a[v.name] = v.default;\n return a;\n }, {});\n\ninterface _option_descriptions {\n [option: string]: string;\n}\nexport const option_descriptions: _option_descriptions = options\n .map(g => g.options)\n .flat()\n .reduce((a: _option_descriptions, v: option_descriptor) => {\n a[v.name] = v.description;\n return a;\n }, {});\n","import React from 'react';\nimport { connect } from \"react-redux\";\nimport { withStyles, Theme } from '@material-ui/core/styles';\n\nimport List from '@material-ui/core/List';\nimport ListItem from '@material-ui/core/ListItem';\n// import ListItemIcon from '@material-ui/core/ListItemIcon';\nimport ListItemText from '@material-ui/core/ListItemText';\n//import Switch from '@material-ui/core/Switch';\nimport Checkbox from '@material-ui/core/Checkbox';\nimport ExpandLess from '@material-ui/icons/ExpandLess';\nimport ExpandMore from '@material-ui/icons/ExpandMore';\nimport Collapse from '@material-ui/core/Collapse';\nimport Tooltip from '@material-ui/core/Tooltip';\nimport { storeState } from \"./store\"\nimport { options as option_spec, option_descriptions, option_group } from \"./options\"\nimport { create_toggle_option_action } from \"./action-creaters\"\n\n// --------------------------------------------------\n// ITEM\n// --------------------------------------------------\n\nconst BigTooltip = withStyles((theme: Theme) => ({\n tooltip: { fontSize: 15, },\n}))(Tooltip);\n\ninterface itemProps {\n name: string,\n checked: boolean,\n toggle_setting: { (x: string): void }\n};\n\nconst _Option: React.FC = props => (\n \n props.toggle_setting(props.name)} dense={true}>\n \n \n \n \n)\n\nfunction mapStateToProps(state: storeState, ownProps: { name: string }) {\n return { checked: state.options[ownProps.name] }\n}\nfunction mapDispatchToProps(dispatch: { (x: any): void }) {\n return {\n toggle_setting: (x: string) => {\n dispatch(create_toggle_option_action(x))\n }\n }\n}\nconst Option = connect(mapStateToProps, mapDispatchToProps)(_Option);\n\n// --------------------------------------------------\n// OPTION GROUP\n// --------------------------------------------------\n\nconst _OptionGroup: React.FC = props => {\n\n const [open, setOpen] = React.useState(false);\n const handleClick = () => { setOpen(!open); };\n\n return (\n <>\n \n \n {open ? : }\n \n \n \n {\n props.options.map(item => (\n \n \n )\n};\n\nconst OptionGroup = connect(null, mapDispatchToProps)(_OptionGroup);\n\n// --------------------------------------------------\n// OPTION LIST\n// --------------------------------------------------\n\n// interface ol_props { open_state: {[x:string]:boolean} }\n\nconst OptionList: React.FC = props => (\n \n {\n option_spec.map((ol: option_group) => )\n }\n \n)\nexport default OptionList","import axios from \"axios\";\nimport JmesPath from \"jmespath\";\nimport { ThunkResult, action, storeState, set_contents_action } from \"./store\";\n\ninterface actionCreator {\n (...args: any[]): action;\n}\n\nexport const set_jmespath: actionCreator = (x: string) => {\n var is_valid: boolean;\n try {\n (JmesPath as any).compile(x);\n is_valid = true;\n } catch {\n is_valid = false;\n }\n return {\n type: \"SET_JMESPATH\",\n payload: x,\n is_valid: is_valid\n };\n};\n\nexport const deactivate_jsmespath: actionCreator = () => ({\n type: \"DEACTIVATE_JSMESPATH\"\n});\n\nexport const jmespath_error: actionCreator = (x: string) => ({\n type: \"JMESPATH_ERROR\",\n message: x\n});\n\nexport function activate_jmespath(): ThunkResult {\n return (dispatch: { (x: action): void }, getState: { (): storeState }) => {\n const { file_contents, jmesquery } = getState();\n try {\n var out = JmesPath.search(file_contents, jmesquery);\n } catch {\n dispatch({\n type: \"JMESPATH_ERROR\",\n message: \"something went wrong\"\n });\n }\n dispatch({\n type: \"ACTIVATE_JMESPATH\",\n payload: out\n });\n };\n}\n\nexport function create_path_action(\n path: string,\n file: File\n): ThunkResult {\n return (dispatch: { (x: action): void }, getState: { (): storeState }) => {\n if (!path.endsWith(\".docx\")) {\n dispatch({\n type: \"INVALID_FILE\",\n path: path,\n message: \"Not a docx file\"\n });\n return;\n }\n dispatch({\n type: \"SET_PATH\",\n path: path,\n file: file\n });\n var formdata = new FormData();\n const { options } = getState();\n formdata.append(\"options\", JSON.stringify(options));\n //console.log(\"file type\", typeof file, file);\n if (!file.size) {\n dispatch({\n type: \"INVALID_FILE\",\n path: path,\n message: \"Empty file (Zero bytes received)\"\n });\n return;\n }\n formdata.append(\"file\", file, \"contents.docx\");\n axios({\n method: \"post\",\n url: \"/service\",\n data: formdata,\n headers: { \"Content-Type\": \"multipart/form-data\" }\n })\n .then(response => {\n //console.log(\"handling resopnse...:\", typeof response.data);\n if (response.data.success) {\n //console.log(\"SET_CONTENTS\");\n dispatch({\n type: \"SET_CONTENTS\",\n path: path,\n payload: response.data.body\n });\n } else {\n //console.log(\"response.success:\", response.data.success);\n //console.log(\"response.data:\", response.data);\n dispatch({\n type: \"INVALID_FILE\",\n path: path,\n message: response.data.message\n });\n }\n })\n .catch(response => {\n //console.log(\"failed response\", response);\n dispatch({\n type: \"INVALID_FILE\",\n path: path,\n message: \"something went wrong with the request\"\n });\n });\n };\n}\n\nexport function create_contents_action(\n path: string,\n payload: any\n): set_contents_action {\n return {\n type: \"SET_CONTENTS\",\n path: path,\n payload: payload\n };\n}\n\nexport const drop_error: actionCreator = (message: string) => ({\n type: \"INVALID_FILE\",\n path: \"[Drop Error]\",\n message: message\n});\n\nexport function create_toggle_option_action(option: string): ThunkResult {\n return (dispatch: { (x: action): void }, getState: { (): storeState }) => {\n dispatch({\n type: \"TOGGLE_OPTION\",\n name: option\n });\n\n const { file, options, file_path } = getState();\n if (!file_path || !file) {\n //console.log(\"adfadfsafdafsafdasfdafadfafa\", file_path, file);\n return;\n }\n\n var formdata = new FormData();\n formdata.append(\"options\", JSON.stringify(options));\n //console.log(\"file type\", typeof file, file);\n if (!file.size) {\n dispatch({\n type: \"INVALID_FILE\",\n path: file_path,\n message: \"Empty file (Zero bytes received)\"\n });\n return;\n }\n formdata.append(\"file\", file, \"contents.docx\");\n axios({\n method: \"post\",\n url: \"/service\",\n data: formdata,\n headers: { \"Content-Type\": \"multipart/form-data\" }\n })\n .then(response => {\n //console.log(\"response.data:\", response.data);\n if (response.data.success) {\n dispatch({\n type: \"SET_CONTENTS\",\n path: file_path,\n payload: response.data.body\n });\n } else {\n dispatch({\n type: \"INVALID_FILE\",\n path: file_path,\n message: response.data.message\n });\n }\n })\n .catch(response => {\n //console.log(\"failed response\", response);\n dispatch({\n type: \"INVALID_FILE\",\n path: file_path,\n message: \"something went wrong with the request\"\n });\n });\n };\n}\n","import React from 'react';\nimport { connect } from \"react-redux\";\nimport { create_path_action, drop_error } from \"./action-creaters\"\nimport { makeStyles } from '@material-ui/core/styles';\n\nconst useStyles = makeStyles(theme => ({\n dropzone: {\n height: '100vh'\n },\n}));\n\n\ninterface dzProps { \n on_drop: { (path: string, file: File): void } \n on_error: { (message: string): void } \n}\nconst _DropZone: React.FC = (props) => {\n\n const classes = useStyles();\n const onDrop = (ev: React.DragEvent) => {\n ev.stopPropagation();\n ev.preventDefault();\n\n ev.persist()\n\n var file: File\n if (ev.dataTransfer.items) {\n // Use DataTransferItemList interface to access the file(s)\n let fileItem: DataTransferItem\n for (var i = 0; i < ev.dataTransfer.items.length; i++) {\n if (ev.dataTransfer.items[i].kind === 'file') {\n if (typeof fileItem! !== 'undefined') {\n props.on_error(\"please drop a single file\")\n return;\n\n }\n fileItem = ev.dataTransfer.items[i]\n }\n }\n if (typeof fileItem! === 'undefined') {\n props.on_error(\"no file recieved\")\n return;\n }\n file = fileItem.getAsFile()!;\n } else {\n // Use DataTransfer interface to access the file(s)\n if (ev.dataTransfer.files.length > 1) {\n props.on_error(\"please drop a single file\")\n return;\n }\n if (ev.dataTransfer.files.length === 0) {\n props.on_error(\"no file recieved\")\n return;\n }\n file = ev.dataTransfer.files[0]\n }\n\n\n // var reader = new FileReader();\n // reader.onload = function (event) {\n props.on_drop(file!.name, file)\n // };\n // reader.readAsArrayBuffer(file!);\n // reader.readAsText(file);\n\n }\n const onDragOver = (event: React.DragEvent) => {\n event.stopPropagation();\n event.preventDefault();\n }\n\n return (\n\n
\n {props.children}\n
\n )\n}\n\nfunction mapDispatchToProps(dispatch: { (x: any): void }) {\n return {\n on_drop: (path: string, file: File) => {\n dispatch(create_path_action(path, file))\n },\n on_error: (message: string) => {\n dispatch(drop_error(message))\n }\n }\n}\n\nconst DropZone = connect(null, mapDispatchToProps)(_DropZone);\nexport default DropZone\n","import React, { useEffect, } from 'react';\nimport { connect } from \"react-redux\";\nimport AppBar from '@material-ui/core/AppBar';\nimport Toolbar from '@material-ui/core/Toolbar';\nimport IconButton from '@material-ui/core/IconButton';\nimport DoneIcon from '@material-ui/icons/Done';\nimport { createStyles, fade, Theme, makeStyles } from '@material-ui/core/styles';\nimport InputBase from '@material-ui/core/InputBase';\nimport ClearIcon from '@material-ui/icons/Clear';\nimport { set_jmespath, deactivate_jsmespath, jmespath_error, activate_jmespath } from \"./action-creaters\"\nimport { storeState } from \"./store\";\n\nconst useStyles = makeStyles((theme: Theme) =>\n createStyles({\n text: {\n padding: theme.spacing(2, 2, 0),\n },\n paper: {\n paddingBottom: 50,\n },\n list: {\n marginBottom: theme.spacing(2),\n },\n subheader: {\n backgroundColor: theme.palette.background.paper,\n },\n appBar: {\n zIndex: theme.zIndex.drawer + 1,\n top: 'auto',\n bottom: 0,\n },\n grow: {\n flexGrow: 1,\n },\n fabButton: {\n position: 'absolute',\n zIndex: 1,\n top: -30,\n left: 0,\n right: 0,\n margin: '0 auto',\n },\n\n\n\n search: {\n position: 'relative',\n borderRadius: theme.shape.borderRadius,\n backgroundColor: fade(theme.palette.common.white, 0.15),\n '&:hover': {\n backgroundColor: fade(theme.palette.common.white, 0.25),\n },\n marginLeft: 0,\n width: '100%',\n },\n inputRoot: {\n color: 'inherit',\n width: '100%',\n },\n inputInput: {\n padding: theme.spacing(1, 1, 1, 1),\n transition: theme.transitions.create('width'),\n width: '100%',\n },\n\n\n }),\n);\n\nexport const BottomAppBar: React.FC = props => {\n const classes = useStyles();\n\n const callback = (event: KeyboardEvent) => {\n if (event.key === \"Escape\") {\n event.stopPropagation();\n event.preventDefault();\n if (props.jmesquery_result || (props.jmesquery_result === null)) {\n props.deactivate_jsmespath()\n }\n }\n }\n\n useEffect(() => {\n window.addEventListener('keydown', callback);\n return () => { window.removeEventListener('keydown', callback) };\n }, [!(props.jmesquery_result || (props.jmesquery_result === null))])\n\n return (\n \n \n
\n { props.set_jmespath(ev.target.value) }}\n onKeyPress={(event) => {\n if (event.key === \"Enter\") { props.activate_jmespath(); return }\n }}\n />\n
\n { props.activate_jmespath() }}>\n \n \n \n \n \n
\n
\n );\n}\n\n\ninterface toolbarProps {\n jmesquery: string;\n jmesquery_is_valid: boolean;\n jmesquery_result?: any;\n jmesquery_error?: any;\n}\n\ninterface toolbarSetters {\n set_jmespath: { (x: string): void };\n deactivate_jsmespath: { (): void };\n activate_jmespath: { (): void };\n jmespath_error: { (x: string): void };\n}\n\nfunction mapStateToProps(state: storeState): toolbarProps {\n const { jmesquery, jmesquery_is_valid, jmesquery_result, jmesquery_error, } = state;\n return { jmesquery, jmesquery_is_valid, jmesquery_result, jmesquery_error, }\n}\n\nfunction mapDispatchToProps(dispatch: { (x: any): void }): toolbarSetters {\n return {\n set_jmespath: (x: string) => { dispatch(set_jmespath(x)) },\n deactivate_jsmespath: () => dispatch(deactivate_jsmespath()),\n activate_jmespath: () => dispatch(activate_jmespath()),\n jmespath_error: (x: string) => dispatch(jmespath_error(x))\n }\n}\n\nexport const Footer = connect(mapStateToProps, mapDispatchToProps)(BottomAppBar);\nexport default Footer\n\n\n","import React from 'react';\nimport { connect } from \"react-redux\";\nimport { storeState } from \"./store\"\nimport { makeStyles } from '@material-ui/core/styles';\nimport Fab from '@material-ui/core/Fab';\nimport Typography from '@material-ui/core/Typography';\nimport Paper from '@material-ui/core/Paper';\nimport ReactJson from 'react-json-view'\nimport CircularProgress from '@material-ui/core/CircularProgress'\nimport SaveIcon from '@material-ui/icons/Save';\n\n\nconst useStyles = makeStyles(theme => ({\n error: {\n paddingBottom: \"1rem\",\n },\n paper: {\n margin: theme.spacing(1),\n display: 'flex',\n justifyContent: 'center',\n alignItems: 'center',\n },\n content: {\n margin: \"3em\"\n },\n root: {\n display: 'flex',\n justifyContent: 'center',\n alignItems: 'center',\n },\n wrapper: {\n margin: theme.spacing(1),\n position: (\"relative\" as \"relative\"), // obsurd code to satisfy tsc\n },\n fabProgress: {\n position: (\"absolute\" as \"absolute\"), // obsurd code to satisfy tsc\n top: -6,\n left: -6,\n zIndex: 1,\n },\n}));\n\nconst Main: React.FC = (props) => {\n\n const classes = useStyles();\n\n if (props.error_message) {\n return ({props.error_message})\n }\n if (props.contents) {\n return (\n <>\n {props.jmesquery_result === null &&\n
\n [Jmespath returned null]\n
\n }\n \n \n )\n }\n\n return (\n <>\n
\n
\n \n \n \n {props.loading && }\n\n
\n
\n
\n \n
\n

Why

\n DOCX files are complex, and their complexity makes scraping documents for their content difficult. If you have a corpus of documents that you need to get information out of, you probably are less intersted in understanding the guts of the Docx format and more interested in simply getting data out of your documents.\n\n

How

\n Converting .docx files to greatly simplified and human readable json docuemnts allows docx files to be processed with battle tested tools such as JSON Schema and JMES path. The goal of the underlying python package is therefor to simplify documents to their meaningful parts, and no simpler -- allowing you to specify which parts are meaninful and which parts aren't. To try it out, drop a document onto the page and play with options in the menu. Then install the Python pacakage to automate your data flow and away you go.\n\n

About this Site

\n This site sends docuemnts to a backend server and the simplified JSON is returned. Nothing is ever stored on the server, but if you're docuemnts are precious and you don't trust the internets, then install the Python package and explore your docuemnts on your own machine in just 4 lines of code.\n
\n
\n
\n \n )\n\n}\n\ninterface mainProps {\n contents?: any;\n jmesquery_result?: any;\n error_message?: string;\n loading: boolean;\n}\n\nfunction mapStateToProps(state: storeState): mainProps {\n return {\n contents: state.file_contents,\n error_message: state.error_message,\n loading: state.loading,\n jmesquery_result: state.jmesquery_result,\n };\n}\n\nexport default connect(mapStateToProps)(Main);\n","import React from 'react';\nimport { storeState } from \"./store\"\nimport GetAppIcon from '@material-ui/icons/GetApp';\nimport IconButton from '@material-ui/core/IconButton';\nimport { connect } from \"react-redux\";\n\ninterface downloadProps {\n contents?: any;\n filename?: string;\n}\n\nfunction download(filename: string, text: string) {\n var element = document.createElement('a');\n element.setAttribute('href', 'data:text/plain;charset=utf-8,' + encodeURIComponent(text));\n element.setAttribute('download', filename);\n element.style.display = 'none';\n document.body.appendChild(element);\n element.click();\n document.body.removeChild(element);\n}\n\nconst Download: React.FC = (props) => {\n return (\n {\n download(\n props.filename!.substring(0, props.filename!.length - 5) + \".json\",\n JSON.stringify(props.contents, null, 4),\n )\n }}>\n \n \n )\n}\n\nfunction mapStateToProps(state: storeState): downloadProps {\n return {\n contents: state.file_contents,\n filename: state.file_path,\n };\n}\n\nexport default connect(mapStateToProps)(Download);\n","/// \n\nimport React, { FC } from 'react';\nimport { connect } from \"react-redux\";\nimport { storeState } from \"./store\"\nimport { makeStyles } from '@material-ui/core/styles';\nimport Drawer from '@material-ui/core/Drawer';\nimport AppBar from '@material-ui/core/AppBar';\nimport CssBaseline from '@material-ui/core/CssBaseline';\nimport Toolbar from '@material-ui/core/Toolbar';\nimport Typography from '@material-ui/core/Typography';\nimport OptionList from \"./option-list\"\nimport DropZone from \"./dropzone\"\nimport Footer from \"./footer\"\nimport GitHubForkRibbon from \"react-github-fork-ribbon\"\nimport Main from \"./main\"\nimport Download from \"./download\"\nimport MenuOpenRoundedIcon from '@material-ui/icons/MenuOpenRounded';\nimport MenuRoundedIcon from '@material-ui/icons/MenuRounded';\n\nconst drawerWidth = 300;\n\nconst useStyles = makeStyles(theme => ({\n root: {\n display: 'flex',\n },\n appBar: {\n zIndex: theme.zIndex.drawer + 1,\n },\n drawer: {\n width: drawerWidth,\n flexShrink: 0,\n },\n drawerPaper: {\n width: drawerWidth,\n },\n content: {\n flexGrow: 1,\n padding: theme.spacing(3),\n },\n toolbar: theme.mixins.toolbar,\n red: {\n color: theme.palette.secondary.dark\n },\n handle: {\n paddingRight: '0.6rem'\n },\n}));\n\ninterface appProps {\n file_path?: string;\n has_contents: boolean;\n}\n\n\n\n\n\nconst App: React.FC = (props) => {\n const [open, setOpen] = React.useState(false);\n const toggleOpen = () => { setOpen(!open) };\n const classes = useStyles();\n\n const MyDrawer = (\n \n
\n \n
\n )\n\n return (\n\n \n
\n \n \n \n Fork me on GitHub\n \n \n
\n {open ?\n :\n }\n
\n
\n \n
\n \n {props.file_path ?\n [props.file_path.endsWith(\".docx\") ? null : [not a .docx file] , props.file_path] :\n \"Drop a .docx file into the page to inspect\"}\n \n
\n
\n {open && MyDrawer}\n
\n
\n
\n
\n
\n {props.has_contents ?
: null}\n
\n \n )\n}\n\nfunction mapStateToProps(state: storeState): appProps {\n return {\n file_path: state.file_path,\n has_contents: !!state.file_contents,\n };\n}\n\nexport default connect(mapStateToProps)(App);","// This optional code is used to register a service worker.\n// register() is not called by default.\n\n// This lets the app load faster on subsequent visits in production, and gives\n// it offline capabilities. However, it also means that developers (and users)\n// will only see deployed updates on subsequent visits to a page, after all the\n// existing tabs open on the page have been closed, since previously cached\n// resources are updated in the background.\n\n// To learn more about the benefits of this model and instructions on how to\n// opt-in, read https://bit.ly/CRA-PWA\n\nconst isLocalhost = Boolean(\n window.location.hostname === 'localhost' ||\n // [::1] is the IPv6 localhost address.\n window.location.hostname === '[::1]' ||\n // 127.0.0.0/8 are considered localhost for IPv4.\n window.location.hostname.match(\n /^127(?:\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3}$/\n )\n);\n\ntype Config = {\n onSuccess?: (registration: ServiceWorkerRegistration) => void;\n onUpdate?: (registration: ServiceWorkerRegistration) => void;\n};\n\nexport function register(config?: Config) {\n if (process.env.NODE_ENV === 'production' && 'serviceWorker' in navigator) {\n // The URL constructor is available in all browsers that support SW.\n const publicUrl = new URL(\n process.env.PUBLIC_URL,\n window.location.href\n );\n if (publicUrl.origin !== window.location.origin) {\n // Our service worker won't work if PUBLIC_URL is on a different origin\n // from what our page is served on. This might happen if a CDN is used to\n // serve assets; see https://github.com/facebook/create-react-app/issues/2374\n return;\n }\n\n window.addEventListener('load', () => {\n const swUrl = `${process.env.PUBLIC_URL}/service-worker.js`;\n\n if (isLocalhost) {\n // This is running on localhost. Let's check if a service worker still exists or not.\n checkValidServiceWorker(swUrl, config);\n\n // Add some additional logging to localhost, pointing developers to the\n // service worker/PWA documentation.\n navigator.serviceWorker.ready.then(() => {\n console.log(\n 'This web app is being served cache-first by a service ' +\n 'worker. To learn more, visit https://bit.ly/CRA-PWA'\n );\n });\n } else {\n // Is not localhost. Just register service worker\n registerValidSW(swUrl, config);\n }\n });\n }\n}\n\nfunction registerValidSW(swUrl: string, config?: Config) {\n navigator.serviceWorker\n .register(swUrl)\n .then(registration => {\n registration.onupdatefound = () => {\n const installingWorker = registration.installing;\n if (installingWorker == null) {\n return;\n }\n installingWorker.onstatechange = () => {\n if (installingWorker.state === 'installed') {\n if (navigator.serviceWorker.controller) {\n // At this point, the updated precached content has been fetched,\n // but the previous service worker will still serve the older\n // content until all client tabs are closed.\n console.log(\n 'New content is available and will be used when all ' +\n 'tabs for this page are closed. See https://bit.ly/CRA-PWA.'\n );\n\n // Execute callback\n if (config && config.onUpdate) {\n config.onUpdate(registration);\n }\n } else {\n // At this point, everything has been precached.\n // It's the perfect time to display a\n // \"Content is cached for offline use.\" message.\n console.log('Content is cached for offline use.');\n\n // Execute callback\n if (config && config.onSuccess) {\n config.onSuccess(registration);\n }\n }\n }\n };\n };\n })\n .catch(error => {\n console.error('Error during service worker registration:', error);\n });\n}\n\nfunction checkValidServiceWorker(swUrl: string, config?: Config) {\n // Check if the service worker can be found. If it can't reload the page.\n fetch(swUrl, {\n headers: { 'Service-Worker': 'script' }\n })\n .then(response => {\n // Ensure service worker exists, and that we really are getting a JS file.\n const contentType = response.headers.get('content-type');\n if (\n response.status === 404 ||\n (contentType != null && contentType.indexOf('javascript') === -1)\n ) {\n // No service worker found. Probably a different app. Reload the page.\n navigator.serviceWorker.ready.then(registration => {\n registration.unregister().then(() => {\n window.location.reload();\n });\n });\n } else {\n // Service worker found. Proceed as normal.\n registerValidSW(swUrl, config);\n }\n })\n .catch(() => {\n console.log(\n 'No internet connection found. App is running in offline mode.'\n );\n });\n}\n\nexport function unregister() {\n if ('serviceWorker' in navigator) {\n navigator.serviceWorker.ready.then(registration => {\n registration.unregister();\n });\n }\n}\n","import thunkMiddleware, { ThunkAction } from \"redux-thunk\";\nimport { createStore, applyMiddleware, compose } from \"redux\";\nimport { default_options } from \"./options\";\n\nexport type action =\n | set_contents_action\n | set_path_action\n | invalid_file\n | set_jmespath\n | deactivate_jmespath\n | activate_jmespath\n | jmespath_error\n | toggle_option_action;\n\nexport interface storeState {\n file_path?: string;\n file?: File;\n is_invalid?: boolean;\n file_contents?: any;\n error_message?: string;\n options: { [option: string]: boolean };\n loading: boolean;\n jmesquery: string;\n jmesquery_is_valid: boolean;\n jmesquery_result?: any;\n jmesquery_error?: any;\n}\n\nexport interface set_path_action {\n type: \"SET_PATH\";\n file: File;\n path: string;\n}\n\nexport interface invalid_file {\n type: \"INVALID_FILE\";\n path: string;\n message: string;\n}\n\nexport interface set_contents_action {\n type: \"SET_CONTENTS\";\n path: string;\n payload: any;\n}\n\nexport interface toggle_option_action {\n type: \"TOGGLE_OPTION\";\n name: string;\n}\n\nexport interface set_jmespath {\n type: \"SET_JMESPATH\";\n payload: string;\n is_valid: boolean;\n}\n\n// export interface set_jmespath_result {\n// type: \"SET_JMESPATH_RESULT\";\n// payload: any;\n// }\n\nexport interface jmespath_error {\n type: \"JMESPATH_ERROR\";\n message: string;\n}\n\nexport interface deactivate_jmespath {\n type: \"DEACTIVATE_JSMESPATH\";\n}\n\nexport interface activate_jmespath {\n type: \"ACTIVATE_JMESPATH\";\n payload: any;\n}\n\nfunction reducer(\n state: storeState = {\n options: default_options,\n loading: false,\n jmesquery: \"\",\n jmesquery_is_valid: false\n },\n action: action\n): storeState {\n switch (action.type) {\n case \"SET_PATH\":\n return {\n ...state,\n file_path: action.path,\n file: action.file,\n is_invalid: false,\n file_contents: null,\n error_message: undefined,\n loading: true,\n jmesquery_result: undefined\n };\n\n case \"INVALID_FILE\":\n return {\n ...state,\n file_path: action.path,\n is_invalid: true,\n error_message: action.message,\n loading: false,\n jmesquery_result: undefined\n };\n case \"SET_CONTENTS\":\n return {\n ...state,\n file_path: action.path,\n is_invalid: false,\n error_message: undefined,\n file_contents: action.payload,\n loading: false,\n jmesquery_result: undefined\n };\n case \"TOGGLE_OPTION\": {\n let out: storeState = {\n ...state,\n error_message: undefined,\n options: { ...state.options },\n jmesquery_result: undefined\n };\n out.options[action.name] = !out.options[action.name];\n return out;\n }\n\n case \"SET_JMESPATH\":\n return {\n ...state,\n jmesquery: action.payload,\n jmesquery_is_valid: action.is_valid\n };\n case \"ACTIVATE_JMESPATH\":\n return {\n ...state,\n jmesquery_result: action.payload,\n jmesquery_error: undefined\n };\n case \"DEACTIVATE_JSMESPATH\":\n return {\n ...state,\n jmesquery_result: undefined\n };\n case \"JMESPATH_ERROR\":\n return {\n ...state,\n jmesquery_is_valid: false,\n jmesquery_error: action.message\n };\n\n default:\n //alert(\"unhandled action type: \" + (action as any).type);\n return state;\n }\n}\n\nexport type ThunkResult = ThunkAction;\n\nconst composeEnhancers =\n (window as any).__REDUX_DEVTOOLS_EXTENSION_COMPOSE__ || compose;\n\nexport const store = createStore(\n reducer,\n {\n options: default_options,\n loading: false,\n jmesquery: \"\",\n jmesquery_is_valid: false\n },\n composeEnhancers(applyMiddleware(thunkMiddleware))\n);\n\nexport default store;\n","import React from 'react';\nimport ReactDOM from 'react-dom';\nimport './index.css';\nimport App from './App';\nimport * as serviceWorker from './serviceWorker';\n\nimport { Provider } from 'react-redux'\nimport store from './store'\n\nReactDOM.render(\n \n\n , document.getElementById('root'));\n\n// If you want your app to work offline and load faster, you can change\n// unregister() to register() below. Note this comes with some pitfalls.\n// Learn more about service workers: https://bit.ly/CRA-PWA\nserviceWorker.unregister();\n"],"sourceRoot":""}