(this["webpackJsonpng911-portal-app"]=this["webpackJsonpng911-portal-app"]||[]).push([[0],{157:function(e,t){},294:function(e,t,a){e.exports=a.p+"static/media/hero2.1cb7c584.jpg"},323:function(e,t,a){e.exports=a(859)},858:function(e,t,a){},859:function(e,t,a){"use strict";a.r(t);var n=a(0),l=a.n(n),r=a(86),o=a.n(r),c=a(47),i=a(92),s=a(29),u=n.createContext(null),d=function(e){var t=e.children,a=n.useState(!0),l=Object(s.a)(a,2),r=l[0],o=l[1];return n.useEffect((function(){r||document.body.classList.add("light-mode")}),[r]),n.createElement(u.Provider,{value:{darkMode:r,setDarkMode:o}},t)},m=a(878),p=a(192),h=a(26),f=a.n(h),E=a(49),g=a(64),v=a(114),y=a.n(v),b=a(22),w=a.n(b),C={base:"https://uin8o8a421.execute-api.us-east-1.amazonaws.com/v1",endpoints:{configCurrent:"/config/current",runValidate:"/run/validate",statusValidate:"/status/validate",runLoad:"/run/load"},statusInterval:5e3},P={GA:{id:"UA-162788603-1"}},H=a(873),k=a(53),A=a(306),I=a(119),T=Object(A.a)();T.listen((function(e){try{I.a.pageview(e.pathname)}catch(t){console.error(t)}}));var x=function(e){try{return I.a.set({userId:e.sub})}catch(t){console.error(t)}},S=function(){try{return I.a.initialize(P.GA.id)}catch(e){console.error(e)}},O=function(e){k.b((function(t){t.setUser({id:e.sub,username:e.username,email:e.email})}))},R=function(e){k.a(e),function(t){try{console.log("Error",t.message);var a=w.a.has(t,"message")?t.message:"landing page error - check Sentry";console.log(a),I.a.exception({description:a})}catch(e){console.error(e)}}(e)},j=function(e){var t=e.getIdToken().decodePayload();return{email:w.a.get(t,"email",null),group:w.a.get(t,"cognito:groups",[null])[0],sub:w.a.get(t,"sub",null),username:w.a.get(t,"cognito:username",null)}},D=function(){function e(t,a){Object(E.a)(this,e),this.session=void 0,this.instance=void 0,this.token=void 0,this.user=void 0;var n=t.getIdToken();this.session=t,this.token=n.getJwtToken(),this.user=a,this.instance=y.a.create({baseURL:C.base,headers:{Authorization:this.token}})}return Object(g.a)(e,[{key:"RunValidation",value:function(e){var t,a;return f.a.async((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,f.a.awrap(this.instance.post(C.endpoints.runValidate,{county:this.user.group,key:e.s3Response.info.key}));case 2:return t=n.sent,n.next=5,f.a.awrap(this.CheckValidationStatusInvertal(t.data));case 5:return a=n.sent,n.abrupt("return",{run:t.data,result:a,uid:t.data.data.uid});case 7:case"end":return n.stop()}}),null,this)}},{key:"RunETL",value:function(e){var t;return f.a.async((function(a){for(;;)switch(a.prev=a.next){case 0:return a.next=2,f.a.awrap(this.instance.post(C.endpoints.runLoad,{uid:e.uid}));case 2:return t=a.sent,a.abrupt("return",t.data);case 4:case"end":return a.stop()}}),null,this)}},{key:"CheckValidationStatusInvertal",value:function(e){var t=this;return f.a.async((function(a){for(;;)switch(a.prev=a.next){case 0:return a.abrupt("return",new Promise((function(a,n){try{var l=setInterval((function(){var n;return f.a.async((function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=2,f.a.awrap(t.CheckValidationStatus(e.data.uid));case 2:"failed"!==(n=r.sent).data.status&&"error"!==n.data.status||(clearInterval(l),a(n)),"success"===n.data.status&&(clearInterval(l),a(n));case 5:case"end":return r.stop()}}))}),C.statusInterval)}catch(r){R(r),n(r)}})));case 1:case"end":return a.stop()}}))}},{key:"CheckValidationStatus",value:function(e){var t;return f.a.async((function(a){for(;;)switch(a.prev=a.next){case 0:return a.prev=0,a.next=3,f.a.awrap(this.instance.post(C.endpoints.statusValidate,{uid:e}));case 3:return t=a.sent,a.abrupt("return",t.data);case 7:return a.prev=7,a.t0=a.catch(0),R(a.t0),a.abrupt("return",{data:{status:"error",error:a.t0,report:null},success:!1});case 11:case"end":return a.stop()}}),null,this,[[0,7]])}}]),e}(),_=n.createContext(null),N=function(e){var t=e.children,a=n.useState(null),l=Object(s.a)(a,2),r=l[0],o=l[1],i=n.useState({group:"",username:"",email:""}),u=Object(s.a)(i,2),d=u[0],m=u[1],p=n.useState(null),h=Object(s.a)(p,2),E=h[0],g=h[1];return n.useEffect((function(){!function(){var e,t,a;f.a.async((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,f.a.awrap(c.a.currentSession());case 2:e=n.sent,t=j(e),a=new D(e,t),m(t),O(t),x(d),o(a);case 9:case"end":return n.stop()}}))}()}),[]),n.createElement(_.Provider,{value:{fetch:r,user:d,uploadProgress:E,setUploadProgress:g}},t)},F=a(870),G={title:"NG 9-1-1 Portal",validation:{header:"Submit your data for validation",messages:{error:{message:"There was an error with your upload. Please try again."},processing:{message:"Upload Complete. Running analysis...."},uploading:{message:"Your file is uploading. Please wait."}},subheader:"First browse for your zipped GDB, then enter your GDB name, and upload your file"},welcome:{header:"Welcome to the NG 9-1-1 GIS Data Conversion Portal",welcomeItems:{content:"This portal will take a county's NG 9-1-1 required GIS layers and convert them from their native schema to the NENA NG 9-1-1 stadardized schema.",content1:"Outputs provided include : ",content2:"The county dataset in the NENA standard",content3:"QA/QC feature classes showing data items that are flagged as having issues according to the NENA standard.",content4:" A multi-county output of all of the data in the Portal.",content5:"To start using this Portal, click on Data Conversion above."}},email:{header:"support@geographIT.io"},link:{content:"support@geographIT.io"},helpPage:{header:"NG911 Help Document",HelpPageitem:{content1:"Sign In and Home Page",content2:"NG 9-1-1 Home Page",content3:"Data Conversion ",content4:"Data Download",content5:"Further Information/Links"}},HelpPageContent1:{Header1:"Username:",Header2:"Password:",HelpAccordItems:{content1:"Your username is the email address that you provide to EBA",content2:"If you are signing in for the first time, use the password provided to you by EBA",content3:"After signing in for the first time you will be prompted to change your password",content4:"Password requirements include atleast 6 characters, requiring atleast one uppercase, one lowercase, one number, and one special character (i.e. $#@&*)",content5:'To change your password, select "reset password" on the sign in page, enter your username, and select "send code". The code will be sent to your corresponding email, and allows you to rest the password when entered',content6:"After signing in, you will be redirected to the NG911 Portal Home Page where it gives you an overview off the whole process, from inputting your GIS data, converting it to NENA standard, and downloading the new data"}},HelpPageContent3:{HelpAccordItems:{content1:"Navigate to the tab Data Conversion to begin the process of converting the data from its native schema to the NENA standard schema",content2:"If your data is not in a geodatabase, download the template at the bottom of the page",content3:"Insert your data and zip up the file geodatabase",content4:"Once you have done the previous steps you can upload your data",content5:"As your data is uploading, it will go through a validation process to analyze any possible errors",content6:"Once the analysis is complete, it will display the validation results table with a list of feature classes within your geodatabase along with the status and notes associated with analysis conducted",content7:"After your gdb is validated, you can submit the ETL Job by clicking the Run ETL button on the page",content8:"You will receive an email when the ETL is complete.",content9:"The amount of time it takes the ETL to complete may vary based on the size of the gdb"}},HelpPageContent4:{content1:"\tUpon receiving the email stating the ETL is complete you may click the tab Data Download, which is in the top right-hand corner of the page",content2:" Once in the Data Download page you will find your data separated into a few geodatabases. Provided is the new county dataset in the NENA standard, QA/QC feature classes, and a multi-county output of all the data in the NG 9-1-1 Portal",content3:"The QA/QC feature class will have data items that are flagged issues according to the NENA standard"},HelpPageContent5:{content1:"For more information, please visit the links below!",link1:"https://www.nena.org/page/NG911GISDataModel",link2:"https://www.pema.pa.gov/911-Program/Partners/NG911-GIS/Pages/default.aspx",link3:"https://pema.maps.arcgis.com/home/item.html?id=fd8ec0be4f874066b3ef73b4a3a2aeaf"},HelpPageContent6:{Header1:"Steps to use the Portal",HelpAccordItems:{content1:"Login access",content1Sub1:"Decide who will be your county\u2019s portal manager",content1Sub2:"Assign duties",content1Sub3:"Register and confirm your user access",content2:"Review your Template GDB",content2Sub1:"Confirm that the data you are submitting for upload matches the geodatabase name, layer names, and field names of the blank Template GDB",content3:"Review your county output GDB",content3Sub1:"Confirm that the number of features that you uploaded match the original gdb",content4:"Review your county output QAQC GDB"}},HelpPageContent7:{Header1:"FAQ",HelpAccordItems:{content1:"If data types change in my source data, can I still run the validation process?",content1Sub1:"Any data types that change in the county source data will cause the validation to fail. A data type change is considered a schema difference when validating source data to the portal\u2019s configuration. Please contact the geographIT team for these changes to be made.",content2:"If feature class names change in my source data, can I still run the validation process?",content2Sub1:"Any Feature Class names that change in the county source data will cause the validation to fail. A name change is considered a schema difference when validating source data to the portal\u2019s configuration. Please contact the geographIT team for these changes to be made.",content3:"I never recieved an email with my validation results?",content3Sub1:"Validation results can take time, especially if your county has a large dataset. However, if you fail to recieve your validation results, please contact the geographIT team for futher support."}},Validate:{header1:"Data Validation\u200b",header2:"Once data is validated, run the ETL process.\xa0\u200b",ValidateHelpInfo:{content2:"Upload zipped file geodatabase (.gdb) of data to be processed.\u200b",content3:"Data will be validated against expected schema.\u200b",content4:"A template .FGDB is available for download below.",content6:"You will be notified via email when the process is complete, and the data is ready for downloading.\u200b"}}},L={textStyle:{color:"white",textAlign:"center",margin:"5rem"}},U=function(){return l.a.createElement(F.a,null,l.a.createElement("div",{style:L.textStyle},l.a.createElement("div",null,"Developed by"," ",l.a.createElement("a",{href:"https://ebaengineering.com/services/geospatial/",rel:"noopener noreferrer",target:"_blank"},"geographIT")),"For support or questions please contact us:"," ",l.a.createElement("a",{href:"mailto:".concat(G.link.content)},l.a.createElement("i",null,G.email.header))))},V=a(883),B=a(78),M=a(871),z=function(e){var t=e.progress;return t?l.a.createElement(M.a,{value:t.loaded/t.total*100,style:{marginBottom:"-1.28571429rem"},total:100,attached:"top",color:"blue"}):null},Y=[{name:"data-conversion"},{name:"data-download"},{name:"help"}],q=function(e,t){return{active:t.active}},Q=function(){var e=l.a.useContext(m.d),t=e.location,a=e.history,n=l.a.useContext(_).uploadProgress,r=l.a.useContext(u).darkMode,o=l.a.useReducer(q,{active:"/"===t.pathname?t.pathname:t.pathname.substr(1)}),i=Object(s.a)(o,2),d=i[0],p=i[1],h=function(e){a.push(e),p({active:e})};return l.a.createElement(l.a.Fragment,null,l.a.createElement(z,{progress:n}),l.a.createElement(V.a,{inverted:r,stackable:!0},l.a.createElement(V.a.Item,{header:!0,active:"/"===d.active,onClick:function(){return h("/")}},l.a.createElement(B.a,{name:"home",size:"large"}),G.title),l.a.createElement(V.a.Menu,{position:"right"},Y.map((function(e){return l.a.createElement(V.a.Item,{key:e.name,name:e.name,active:d.active===e.name,onClick:function(){return h(e.name)}})})),l.a.createElement(V.a.Item,{name:"logout",onClick:function(){c.a.signOut()}}))))},W=function(e){var t=e.children;return l.a.createElement(N,null,l.a.createElement(l.a.Fragment,null,l.a.createElement(Q,null),l.a.createElement("div",null,t),l.a.createElement(U,null)))},J=a(884),K=a(885),$=function(e){return new Promise((function(t,a){c.c.get(e,{level:"private"}).then((function(e){return t(e)})).catch((function(e){return a(e)}))}))},X=function(e){return new Promise((function(t,a){c.c.get("templates/".concat(e),{level:"public"}).then((function(e){return t(e)})).catch((function(e){return a(e)}))}))},Z=function(){var e=n.useState({status:"loading",info:null}),t=Object(s.a)(e,2),a=t[0],l=t[1],r=n.useState(null),o=Object(s.a)(r,2),i=o[0],u=o[1],d=n.useState(null),m=Object(s.a)(d,2),p=m[0],h=m[1],E=function(){l({status:"loading",info:null}),h(null)};return n.useEffect((function(){return function(){var e;f.a.async((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,f.a.awrap(new Promise((function(e,t){c.c.list("",{level:"private"}).then((function(t){return e(t)})).catch((function(e){return t(e)}))})));case 3:e=t.sent,h(e),l({status:"ready",info:null}),t.next=12;break;case 8:t.prev=8,t.t0=t.catch(0),R(t.t0),l({status:"error",info:null});case 12:case"end":return t.stop()}}),null,null,[[0,8]])}(),E}),[]),{status:a,objects:p,downloadUrl:i,downloadFile:function(e){var t;return f.a.async((function(a){for(;;)switch(a.prev=a.next){case 0:return a.prev=0,l({status:"downloading",info:null}),a.next=4,f.a.awrap($(e));case 4:t=a.sent,u(t),l({status:"ready",info:null}),a.next=13;break;case 9:a.prev=9,a.t0=a.catch(0),R(a.t0),l({status:"error",info:null});case 13:case"end":return a.stop()}}),null,null,[[0,9]])}}},ee=a(880),te=a(872),ae=function(e){var t=e.loading;return l.a.createElement(ee.a,{active:t,page:!0},l.a.createElement(te.a,null))},ne=a(290),le=a.n(ne),re=a(291),oe=a.n(re),ce=a(876),ie=function(e){var t=e.objects,a=e.darkMode,n=e.handleDownloadFile,r=e.downloadUrl,o=l.a.useRef(null);return l.a.useEffect((function(){r&&(console.info("Downloading: ".concat(r)),o.current.click())}),[r]),l.a.createElement(l.a.Fragment,null,l.a.createElement(ce.a,{celled:!0,striped:!0,selectable:!0,inverted:a},l.a.createElement(ce.a.Header,null,l.a.createElement(ce.a.Row,null,l.a.createElement(ce.a.HeaderCell,null,"Name"),l.a.createElement(ce.a.HeaderCell,null,"Last Modified"),l.a.createElement(ce.a.HeaderCell,null,"Size"))),l.a.createElement(ce.a.Body,null,w.a.orderBy(t,["lastModified"],["desc","asc"]).map((function(e){return l.a.createElement(ce.a.Row,{key:e.eTag},l.a.createElement(ce.a.Cell,{onClick:function(){return n(e.key)},style:{cursor:"pointer"}},l.a.createElement(B.a,{name:"cloud download"})," ",e.key),l.a.createElement(ce.a.Cell,null,le()(e.lastModified).format("MMMM Do YYYY, h:mm:ss a")),l.a.createElement(ce.a.Cell,null,oe()(e.size)))})))),l.a.createElement("a",{href:r,ref:o,download:!0,style:{display:"none"}},"Download S3 Object"))},se=function(){var e=l.a.useContext(u).darkMode,t=Z(),a=t.status,n=t.objects,r=t.downloadUrl,o=t.downloadFile;return l.a.createElement(F.a,null,l.a.createElement(ae,{loading:"loading"===a.status}),l.a.createElement(J.a,{inverted:e},n&&l.a.createElement(l.a.Fragment,null,l.a.createElement(K.a,{inverted:e,content:"Download Your Data",subheader:"Click on file name to download"}),l.a.createElement(ie,{objects:n,darkMode:e,downloadUrl:r,handleDownloadFile:o}))))},ue=function(){var e=l.a.useContext(u).darkMode;return l.a.createElement(J.a,{inverted:e},l.a.createElement(K.a,{inverted:e},"Run ETL job"))},de=a(879),me={accordTitle:{marginTop:"4rem",fontWeight:"bold",fontSize:"medium",display:"block"},accordCenter:{textAlign:"center"}},pe=function(){var e=Object(n.useState)(-1),t=Object(s.a)(e,2),a=t[0],r=t[1],o=function(e,t){var n=t.index;r(a===n?-1:n)};return l.a.createElement(de.a,{inverted:!0,style:{display:"block",margin:"0 auto"}},l.a.createElement(de.a.Title,{style:me.accordTitle,active:0===a,index:0,onClick:o},G.helpPage.HelpPageitem.content1,l.a.createElement(B.a,{name:"dropdown"})),l.a.createElement(de.a.Content,{active:0===a},l.a.createElement("h5",null,G.HelpPageContent1.Header1),l.a.createElement("ul",null,l.a.createElement("li",null,l.a.createElement("p",null,G.HelpPageContent1.HelpAccordItems.content1))),l.a.createElement("h5",null,G.HelpPageContent1.Header2),l.a.createElement("ul",null,l.a.createElement("li",null,l.a.createElement("p",null,G.HelpPageContent1.HelpAccordItems.content2)),l.a.createElement("li",null,l.a.createElement("p",null,G.HelpPageContent1.HelpAccordItems.content3)),l.a.createElement("li",null,l.a.createElement("p",null,G.HelpPageContent1.HelpAccordItems.content4)),l.a.createElement("li",null,l.a.createElement("p",null,G.HelpPageContent1.HelpAccordItems.content5))),l.a.createElement("h5",null,G.HelpPageContent1.HelpAccordItems.content6)),l.a.createElement(de.a.Title,{style:me.accordTitle,active:1===a,index:1,onClick:o},G.helpPage.HelpPageitem.content3,l.a.createElement(B.a,{name:"dropdown"})),l.a.createElement(de.a.Content,{active:1===a},l.a.createElement("h5",null,G.HelpPageContent3.HelpAccordItems.content1),l.a.createElement("h5",null,G.HelpPageContent3.HelpAccordItems.content2),l.a.createElement("ul",null,l.a.createElement("li",null,l.a.createElement("p",null,G.HelpPageContent3.HelpAccordItems.content3))),l.a.createElement("h5",null,G.HelpPageContent3.HelpAccordItems.content4),l.a.createElement("ul",null,l.a.createElement("li",null,l.a.createElement("p",null,G.HelpPageContent3.HelpAccordItems.content5)),l.a.createElement("li",null,l.a.createElement("p",null,G.HelpPageContent3.HelpAccordItems.content6))),l.a.createElement("h5",null,G.HelpPageContent3.HelpAccordItems.content7),l.a.createElement("ul",null,l.a.createElement("li",null,l.a.createElement("p",null,G.HelpPageContent3.HelpAccordItems.content8)),l.a.createElement("li",null,l.a.createElement("p",null,G.HelpPageContent3.HelpAccordItems.content9)))),l.a.createElement(de.a.Title,{style:me.accordTitle,active:2===a,index:2,onClick:o},G.helpPage.HelpPageitem.content4,l.a.createElement(B.a,{name:"dropdown"})),l.a.createElement(de.a.Content,{active:2===a},l.a.createElement("h5",null,G.HelpPageContent4.content1),l.a.createElement("h5",null,G.HelpPageContent4.content2),l.a.createElement("li",null,G.HelpPageContent4.content3)),l.a.createElement(de.a.Title,{style:me.accordTitle,active:3===a,index:3,onClick:o},G.helpPage.HelpPageitem.content5,l.a.createElement(B.a,{name:"dropdown"})),l.a.createElement(de.a.Content,{active:3===a},l.a.createElement("h5",null,G.HelpPageContent5.content1),l.a.createElement("p",null,l.a.createElement("a",{href:G.HelpPageContent5.link1},l.a.createElement("i",null,"NENA Model"))),l.a.createElement("p",null,l.a.createElement("a",{href:G.HelpPageContent5.link2},l.a.createElement("i",null,"PEMA NG-9-1-1 Info Page"))),l.a.createElement("p",null,l.a.createElement("a",{href:G.HelpPageContent5.link3},l.a.createElement("i",null,"Pennsylvania Specific items incorporated with NENA")))),l.a.createElement(de.a.Title,{style:me.accordTitle,active:4===a,index:4,onClick:o},G.HelpPageContent6.Header1,l.a.createElement(B.a,{name:"dropdown"})),l.a.createElement(de.a.Content,{active:4===a},l.a.createElement("h5",null,G.HelpPageContent6.HelpAccordItems.content1),l.a.createElement("ul",null,l.a.createElement("li",null,G.HelpPageContent6.HelpAccordItems.content1Sub1),l.a.createElement("li",null,G.HelpPageContent6.HelpAccordItems.content1Sub2),l.a.createElement("li",null,G.HelpPageContent6.HelpAccordItems.content1Sub3)),l.a.createElement("h5",null,G.HelpPageContent6.HelpAccordItems.content2),l.a.createElement("ul",null,l.a.createElement("li",null,G.HelpPageContent6.HelpAccordItems.content2Sub1)),l.a.createElement("h5",null,G.HelpPageContent6.HelpAccordItems.content3),l.a.createElement("ul",null,l.a.createElement("li",null,G.HelpPageContent6.HelpAccordItems.content3Sub1)),l.a.createElement("h5",null,G.HelpPageContent6.HelpAccordItems.content4)),l.a.createElement(de.a.Title,{style:me.accordTitle,active:5===a,index:5,onClick:o},G.HelpPageContent7.Header1,l.a.createElement(B.a,{name:"dropdown"})),l.a.createElement(de.a.Content,{active:5===a},l.a.createElement("h5",null,G.HelpPageContent7.HelpAccordItems.content1),l.a.createElement("ul",null,l.a.createElement("li",null,G.HelpPageContent7.HelpAccordItems.content1Sub1)),l.a.createElement("h5",null,G.HelpPageContent7.HelpAccordItems.content2),l.a.createElement("ul",null,l.a.createElement("li",null,G.HelpPageContent7.HelpAccordItems.content2Sub1)),l.a.createElement("h5",null,G.HelpPageContent7.HelpAccordItems.content3),l.a.createElement("ul",null,l.a.createElement("li",null,G.HelpPageContent7.HelpAccordItems.content3Sub1))))},he=function(){var e=l.a.useContext(u).darkMode;return l.a.createElement(F.a,null,l.a.createElement(J.a,{inverted:e},l.a.createElement("h2",null,"NG911 Help Document"),l.a.createElement(pe,null)))},fe=a(61),Ee=a(62),ge=a(877),ve=a(882);function ye(){var e=Object(fe.a)(["\n display: flex;\n justify-content: center;\n padding: 1rem;\n"]);return ye=function(){return e},e}var be=[G.welcome.welcomeItems.content2,G.welcome.welcomeItems.content3,G.welcome.welcomeItems.content4],we=Ee.a.div(ye()),Ce=function(e){var t=e.inverted,a=Object(m.e)();return l.a.createElement(J.a,{inverted:t},l.a.createElement(K.a,{as:"h2",inverted:t,content:G.welcome.header,subheader:"Please review the instructions below"}),l.a.createElement(K.a,{as:"h4"},G.welcome.welcomeItems.content),l.a.createElement(K.a,{as:"h4"},G.welcome.welcomeItems.content1),l.a.createElement(ge.a,{inverted:t,bulleted:!0},w.a.map(be,(function(e,t){return l.a.createElement(ge.a.Item,{key:t},e)}))),l.a.createElement(we,null,l.a.createElement(ve.a,{primary:!0,size:"large",style:{padding:"1rem 3rem",margin:0},onClick:function(){return a.push("/data-conversion")}},"Get Started")))},Pe=a(294),He=a.n(Pe);function ke(){var e=Object(fe.a)(["\n flex-basis: 66.66%;\n padding: 3rem 3rem 3rem 1.5rem;\n"]);return ke=function(){return e},e}function Ae(){var e=Object(fe.a)(["\n font-family: 'Raleway', sans-serif;\n color: ",";\n margin-top: 1rem;\n font-size: 5rem;\n"]);return Ae=function(){return e},e}function Ie(){var e=Object(fe.a)(["\n font-family: 'Raleway', sans-serif;\n color: ",";\n font-size: 6rem;\n"]);return Ie=function(){return e},e}function Te(){var e=Object(fe.a)(["\n flex-basis: 33.33%;\n padding: 3rem 1.5rem 3rem 3rem;\n"]);return Te=function(){return e},e}function xe(){var e=Object(fe.a)(["\n background: url(",") no-repeat center center fixed;\n background-size: cover;\n height: 100vh;\n display: flex;\n justify-content: center;\n align-items: center;\n margin-top: -1rem;\n"]);return xe=function(){return e},e}var Se=Ee.a.div(xe(),He.a),Oe=Ee.a.div(Te()),Re=Ee.a.h1(Ie(),(function(e){return e.inverted?"white":"inherit"})),je=Ee.a.h2(Ae(),(function(e){return e.inverted?"white":"inherit"})),De=Ee.a.div(ke()),_e=function(e){var t=e.inverted;return l.a.createElement(Se,null,l.a.createElement(Oe,null,l.a.createElement(Re,{inverted:t},"NG 9-1-1"),l.a.createElement(je,{inverted:t},"GIS Data Conversion Portal")),l.a.createElement(De,null,l.a.createElement(Ce,{inverted:t})))},Ne=function(){var e=l.a.useContext(u).darkMode;return l.a.createElement(_e,{inverted:e})},Fe=function(){return l.a.createElement("div",null,"Not Found")},Ge=function(){var e=l.a.useContext(u).darkMode;return l.a.createElement(J.a,{inverted:e},l.a.createElement(K.a,{inverted:e},"update settings"))},Le=a(886),Ue=function(e){var t=n.useState({status:"ready",info:null}),a=Object(s.a)(t,2),l=a[0],r=a[1],o=n.useState(null),c=Object(s.a)(o,2),i=c[0],u=c[1];return{etlStatus:l,etlResp:i,handleRunETL:function(t){var a;return f.a.async((function(n){for(;;)switch(n.prev=n.next){case 0:return r({status:"loading",info:null}),n.prev=1,n.next=4,f.a.awrap(e.RunETL({uid:t}));case 4:a=n.sent,u(a),r({status:"success",info:null}),n.next=14;break;case 9:n.prev=9,n.t0=n.catch(1),R(n.t0),console.error(n.t0),r({status:"error",info:null});case 14:case"end":return n.stop()}}),null,null,[[1,9]])},resetETL:function(){r({status:"ready",info:null}),u(null)}}},Ve=a(295),Be=function(e){var t=w.a.chain(e).map((function(e){var t=function(e){return w.a.chain(e).map((function(e){return"OK"!==e.status?e:null})).flattenDeep().compact().value()}(e.fields);return e.exists&&w.a.isEmpty(t)?{name:e.name,status:"ok",message:"Validation passed with no issues."}:e.exists?w.a.isEmpty(t)?null:{name:e.name,status:"field-issue",message:"There is an issue with the current fields.",fieldIssues:t}:{name:e.name,status:"ok",message:"Feature Class Missing."}})).compact().flattenDeep().value(),a=w.a.chain(t).filter((function(e){return"ok"!==e.status})).isEmpty().value();return{status:a?"valid":"invalid",display:t,message:a?"Submitted GDB is valid! Scroll down to run ETL process.":"Submitted GDB is not valid!"}},Me=function(e){return"success"!==e.status||!w.a.has(e.report,"Features")||w.a.isEmpty(e.report.Features)?{status:"error",display:null,message:"Error running analysis, please check the format of your zip file."}:Be(e.report.Features)},ze=function(e,t){var a=e.file,n=e.name,l=e.contentType,r=null;return new Promise((function(e,o){c.c.put("".concat(n),a,{contentType:l,level:"private",progressCallback:function(e){r=e,t(e)}}).then((function(t){return e({result:t,info:r})})).catch((function(e){return o(e)}))}))},Ye=function(e,t){var a=n.useState({status:"ready",info:null}),l=Object(s.a)(a,2),r=l[0],o=l[1],c=n.useState({chooseFile:null}),i=Object(s.a)(c,2),u=i[0],d=i[1],m=n.useState(null),p=Object(s.a)(m,2),h=p[0],E=p[1],g=n.useState(null),v=Object(s.a)(g,2),y=v[0],b=v[1],C=n.useState(null),P=Object(s.a)(C,2),H=P[0],k=P[1],A=function(e){return f.a.async((function(a){for(;;)switch(a.prev=a.next){case 0:t(null),o({status:"working",info:"processing"}),I(e);case 3:case"end":return a.stop()}}))},I=function(t){var a;return f.a.async((function(n){for(;;)switch(n.prev=n.next){case 0:return n.prev=0,n.next=3,f.a.awrap(e.RunValidation({s3Response:t}));case 3:a=n.sent,o({status:"success",info:null}),E(null),b(Me(a.result.data)),k(a.uid),n.next=15;break;case 10:n.prev=10,n.t0=n.catch(0),R(n.t0),console.error(n.t0),o({status:"error",info:null});case 15:case"end":return n.stop()}}),null,null,[[0,10]])};return{fileToUpload:h,formValidation:u,handleFileChange:function(e){var t=function(e){try{return e.target.files.length<=0?null:{contentType:e.target.files[0].type,file:e.target.files[0],name:e.target.files[0].name}}catch(t){return R(t),null}}(e);t&&(w.a.endsWith(t.name,".zip")?(o({status:"ready",info:null}),b(null),k(null),d({chooseFile:null}),E(t)):d(Object(Ve.a)({},u,{chooseFile:"File must end in .zip"})))},handleUpload:function(){var e;return f.a.async((function(a){for(;;)switch(a.prev=a.next){case 0:return o({status:"working",info:"uploading"}),d({chooseFile:null}),a.prev=2,a.next=5,f.a.awrap(ze(h,t));case 5:e=a.sent,A(e),a.next=13;break;case 9:a.prev=9,a.t0=a.catch(2),R(a.t0),n=a.t0,console.error(n),o({status:"error",info:n});case 13:case"end":return a.stop()}var n}),null,null,[[2,9]])},status:r,validationResults:y,runUID:H,resetAnalysis:function(){o({status:"ready",info:null}),b(null),k(null)},setValidationResults:b,setRunUID:k}},qe=a(881),Qe=function(){return l.a.createElement(ve.a,{onClick:function(){return H.b()}},"Report Feedback")},We=G.validation.messages,Je=function(e){var t=e.status;return"error"===t.status?l.a.createElement(qe.a,{icon:!0,negative:!0},l.a.createElement(B.a,{name:"exclamation"}),l.a.createElement(qe.a.Content,null,We.error.message),l.a.createElement(Qe,null)):"working"===t.status?l.a.createElement(qe.a,{icon:!0,info:!0},"processing"===t.info?l.a.createElement(B.a,{name:"circle notched",loading:!0}):l.a.createElement(B.a,{name:"upload"}),l.a.createElement(qe.a.Content,null,l.a.createElement("div",{style:{paddingBottom:"0.5rem"}},We[t.info].message)," ",l.a.createElement("div",null,l.a.createElement("strong",null,"Important!")," Please don't refresh your browser or navigate away from this page!"))):null};function Ke(){var e=Object(fe.a)(["\n justify-content: center;\n display: flex;\n padding-top: 1rem;\n"]);return Ke=function(){return e},e}var $e=Ee.a.div(Ke()),Xe=function(e){var t=e.positive,a=e.error,n=e.content,r=e.dismiss;return l.a.createElement(qe.a,{icon:!0,positive:t,error:a,onDismiss:r},l.a.createElement(B.a,{name:"send"}),l.a.createElement(qe.a.Content,null,l.a.createElement(qe.a.Header,null,a?"ETL Error":"ETL Job Submitted"),n),l.a.createElement(Qe,null))},Ze=function(e){var t=e.results,a=e.uid,n=e.status,r=e.handleClick,o=e.handleReset,c=l.a.useContext(u).darkMode;if(!t)return null;if(!a&&"valid"!==t.status)return null;if("valid"!==t.status)return null;var i="success"===n.status||"error"===n.status,s="ready"===n.status||"loading"===n.status;return l.a.createElement(Le.a.Row,{columns:1},l.a.createElement(Le.a.Column,null,l.a.createElement(J.a,{inverted:c,padded:"very"},l.a.createElement(K.a,{inverted:c,content:"Submit ETL Job",subheader:"Run the ETL process on the validated GDB. Please allow some time for the data to be processed. You will receive an email upon completion."}),i&&l.a.createElement(Xe,{positive:"success"===n.status,error:"error"===n.status,content:"Your ETL has been submitted! Please await an email notification when the process has completed.",dismiss:function(){o("clear-analysis")}}),s&&l.a.createElement($e,null,l.a.createElement(ve.a,{positive:!0,size:"massive",onClick:function(){r(a)},loading:"loading"===n.status},"Run ETL")))))},et=function(e){var t=e.url,a=e.inverted;return l.a.createElement(J.a,{inverted:a},l.a.createElement("h5",{style:{textAlign:"center"}},"Download your template GDB and insert your data!"),l.a.createElement("p",{style:{textAlign:"center",marginTop:"1rem"}},l.a.createElement("a",{href:t},"Download Your Template GDB")))},tt=a(874),at=function(e){var t=e.status,a=e.formValidation,n=e.fileToUpload,r=e.runUID,o=e.handleFileChange,c=e.handleUpload,i=l.a.useContext(u).darkMode,s=l.a.useRef(null);return l.a.createElement(l.a.Fragment,null,l.a.createElement(Le.a,{padded:!0,columns:3},l.a.createElement(Le.a.Column,{width:2}),l.a.createElement(Le.a.Column,{width:12},l.a.createElement(tt.a,{inverted:i},l.a.createElement(tt.a.Field,null,l.a.createElement("label",null,"Select your zip file:"),l.a.createElement(tt.a.Button,{error:a.chooseFile,inverted:i,content:n?"".concat(n.name):"Choose File",disabled:"working"===t.status||!w.a.isEmpty(r),icon:"file archive",onClick:function(){return s.current.click()},fluid:!0}),l.a.createElement("input",{ref:s,type:"file",accept:"zip",hidden:!0,onChange:o})),l.a.createElement(tt.a.Field,null,l.a.createElement("label",null,"Upload your zip file:"),l.a.createElement(tt.a.Button,{onClick:c,size:"large",primary:!0,inverted:i,icon:"upload",disabled:!n||"working"===t.status,fluid:!0,content:"Upload"})))),l.a.createElement(Le.a.Column,{width:2})))},nt=function(e){var t=e.inverted;return l.a.createElement(J.a,{inverted:t},l.a.createElement("h3",null,G.Validate.header1),l.a.createElement("p",null,l.a.createElement("li",null,G.Validate.ValidateHelpInfo.content2)),l.a.createElement("p",null,l.a.createElement("li",null,G.Validate.ValidateHelpInfo.content3)),l.a.createElement("p",null,l.a.createElement("li",null,G.Validate.ValidateHelpInfo.content4)),l.a.createElement("h3",null,G.Validate.header2),l.a.createElement("p",null,l.a.createElement("li",null,G.Validate.ValidateHelpInfo.content6)))};function lt(){var e=Object(fe.a)(["\n margin: 0 3rem;\n"]);return lt=function(){return e},e}var rt=Ee.a.div(lt()),ot=function(e){var t=e.positive,a=e.warning,n=e.error,r=e.content;return l.a.createElement(rt,null,l.a.createElement(qe.a,{icon:!0,positive:t,warning:a,error:n},l.a.createElement(B.a,{name:"database"}),l.a.createElement(qe.a.Content,null,l.a.createElement(qe.a.Header,null,n?"Analysis Error":"Analysis Complete"),r),l.a.createElement(Qe,null)))},ct=function(e){var t=e.display,a=e.hidden,n=e.inverted;return a?null:l.a.createElement(ce.a,{striped:!0,inverted:n,selectable:!0,celled:!0},l.a.createElement(ce.a.Header,null,l.a.createElement(ce.a.Row,null,l.a.createElement(ce.a.HeaderCell,null,"Feature Class"),l.a.createElement(ce.a.HeaderCell,null,"Status"),l.a.createElement(ce.a.HeaderCell,null,"Note"),l.a.createElement(ce.a.HeaderCell,null,"Details"))),l.a.createElement(ce.a.Body,null,w.a.map(t,(function(e){return l.a.createElement(ce.a.Row,{verticalAlign:"top",key:e.name},l.a.createElement(ce.a.Cell,null,e.name),l.a.createElement(ce.a.Cell,null,w.a.upperCase(e.status)),l.a.createElement(ce.a.Cell,null,e.message),l.a.createElement(ce.a.Cell,{verticalAlign:"top"},w.a.map(e.fieldIssues,(function(e){return l.a.createElement("span",{key:e.name},l.a.createElement("span",null,"".concat(w.a.upperCase(e.name),": ").concat(e.status)),l.a.createElement("br",null))}))))}))))},it=function(e){var t=e.results,a=l.a.useContext(u).darkMode;return t?l.a.createElement(Le.a.Row,{columns:1},l.a.createElement(Le.a.Column,null,l.a.createElement(J.a,{inverted:a},l.a.createElement(ot,{positive:"valid"===t.status,warning:"invalid"===t.status,error:"error"===t.status,content:t.message}),l.a.createElement(ct,{inverted:a,hidden:"error"===t.status,display:t.display})))):null},st=function(){var e=l.a.useContext(_),t=e.fetch,a=e.user,n=e.setUploadProgress,r=l.a.useContext(u).darkMode,o=l.a.useState(null),c=Object(s.a)(o,2),i=c[0],d=c[1],m=Ye(t,n),p=m.formValidation,h=m.status,E=m.fileToUpload,g=m.handleFileChange,v=m.handleUpload,y=m.validationResults,b=m.runUID,w=m.resetAnalysis,C=m.setValidationResults,P=Ue(t),H=P.etlStatus,k=P.handleRunETL,A=P.resetETL;return l.a.useEffect((function(){!function(){var e;f.a.async((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,f.a.awrap(X((n=a.group,"".concat(n,".gdb.zip"))));case 2:e=t.sent,d(e);case 4:case"end":return t.stop()}var n}))}()}),[a]),l.a.createElement(F.a,null,l.a.createElement(Le.a,null,l.a.createElement(Le.a.Row,{columns:2,stretched:!0,style:{paddingTop:"2rem"}},l.a.createElement(Le.a.Column,null,l.a.createElement(nt,{inverted:r})),l.a.createElement(Le.a.Column,null,l.a.createElement(J.a,{inverted:r},l.a.createElement(K.a,{inverted:r,as:"h4"},G.validation.header,l.a.createElement(K.a.Subheader,null,G.validation.subheader)),l.a.createElement(Je,{status:h}),l.a.createElement(at,{status:h,formValidation:p,fileToUpload:E,runUID:b,handleFileChange:g,handleUpload:v})),l.a.createElement(et,{inverted:r,url:i}))),l.a.createElement(it,{results:y}),l.a.createElement(Ze,{results:y,uid:b,status:H,handleClick:k,handleReset:function(e){switch(e){case"clear-analysis":C(null);break;default:w(),A()}}})))},ut=function(){var e=Object(p.b)({config:{duration:1e3},from:{opacity:0},opacity:1});return l.a.createElement(W,null,l.a.createElement(p.a.div,{style:e},l.a.createElement(m.c,null,l.a.createElement(m.a,{path:"/",exact:!0,component:Ne}),l.a.createElement(m.a,{path:"/data-conversion",exact:!0,component:st}),l.a.createElement(m.a,{path:"/etl",exact:!0,component:ue}),l.a.createElement(m.a,{path:"/data-download",exact:!0,component:se}),l.a.createElement(m.a,{path:"/settings",exact:!0,component:Ge}),l.a.createElement(m.a,{path:"/help",exact:!0,component:he}),l.a.createElement(m.a,{component:Fe}))))},dt=function(){return l.a.createElement(m.b,{history:T},l.a.createElement(ut,null))},mt=a(70),pt=a(69),ht=a(71),ft=function(e){function t(){var e,a;Object(E.a)(this,t);for(var n=arguments.length,l=new Array(n),r=0;r