(this["webpackJsonpgonzo-test-client"]=this["webpackJsonpgonzo-test-client"]||[]).push([[84],{cVJu:function(e,t,a){"use strict";a.r(t),a.d(t,"SettingsView",(function(){return Be}));var n=a("q1tI"),r=a.n(n),s=a("/MKj"),c=a("XSU/"),i=a("2tEe"),l=a("lerP"),d=a("Ty5D"),m=a("1eYP"),p=a("ZSSp"),o=a("9pRY"),h=a("lTfi"),g=a("bweh"),E=a("qx5e"),f=a("s506"),u=a("dZA5"),v=a("Pl9q"),b=a("W7+E"),y=a("hTL/"),x=a("ZvD3"),w=a("xEfi"),S=a("iSlo"),k=a("uD39"),D=a("MguO"),O=a("1zaY"),P=a("eAWT"),F=a("sYJm"),z=a("yvpC"),T=a("+nj3"),W=a("Oslk"),j=a("Th0Y"),C=a("q1ki"),N=a("a1wW"),Y=a("A6ap"),R=a("4mNT"),q=a("J9rs"),A=a("O45h"),H=a("3NtG"),I=a("kpyk"),K=a("NVg3"),M=a("/V44"),Q=a("QIPU"),J=a("JvrF"),L=a("iwqF"),U=a("Zpnk"),V=a("WUlb"),G=a("5U3c"),B=a("B46+"),Z=a("49aN"),X=a("AvdG"),_=a("HYy3"),$=a("ktQ7"),ee=a("z/sH"),te=a("VROb"),ae=a("Wuxo"),ne=a("Q0ay"),re=a("razv"),se=a("yzW4"),ce=a("NdYj"),ie=a("O1KL"),le=a("Yavi"),de=a("Xpzc"),me=a("tG0a"),pe=a("rZug"),oe=a("nkxF"),he=a("pBWe"),ge=a("TQ9z"),Ee=a("SSPK"),fe=a("Wg2v"),ue=a("7h6m"),ve=a("mndY"),be=a("DKgl"),ye=a("HkhQ"),xe=a("DVKa"),we=a("+69I"),Se=a("V9Uu"),ke=a("a63n"),De=a("h639"),Oe=a("m5Db"),Pe=a("slNt"),Fe=a("jGzQ"),ze=a("oFjU"),Te=a("gtWs"),We=a("zDeS"),je=a("bGCL"),Ce=a("SD4l"),Ne=a("5O/K"),Ye=a("LCzB"),Re=a("2ULW"),qe=a("f13W"),Ae=a("pCty"),He=a("w/hH"),Ie=a("HhzP"),Ke=a("zx8b"),Me=a("CYYY"),Qe=a("MOoq"),Je=a("QDvx"),Le=a("qJRs"),Ue=a("00Nw"),Ve=a("8ke+");function Ge(){return(Ge=Object.assign||function(e){for(var t=1;t{const{t:e}=this.props;try{const{location:{pathname:t}}=this.props;let a=t.split("/")[3],n=t.split("/")[4];return a&&e("newSettings.headers.".concat(a),{returnObjects:!0})?"".concat(e("settings.settings"),": ").concat("string"===typeof e("".concat(a),{returnObjects:!0})?e("".concat(a)):e("".concat(a,".").concat(a))," ").concat(n?"string"===typeof e("".concat(n),{returnObjects:!0})?" - "+e("".concat(n)):" - "+e("".concat(n,".").concat(n)):""):e("settings.settings")}catch(t){return console.error(t),e("settings.settings")}},this.onArrowClick=()=>{let e=!1;if(this.props.location.pathname.includes("/feeding/curves")||this.props.location.pathname.includes("/feeding/plans")||this.props.location.pathname.includes("/feeding/forages")||this.props.location.pathname.includes("/devices/manage")){let t=this.state.history.length;this.state.history[t-2]&&(this.state.history[t-2].includes("/edit")||this.state.history[t-2].includes("/devices/add"))&&(e=!0)}e?this.props.history.push("/".concat(this.props.farm,"/settings")):this.props.history.goBack()},this.state={history:[]}}componentDidMount(){this.props.history.listen(e=>{const t=this.state.history.slice(0);t.push(e.pathname),this.setState({history:t})})}render(){return r.a.createElement("div",{className:"settings-view"},r.a.createElement(c.a,{text:r.a.createElement(r.a.Fragment,null,this.props.history.location.pathname!=="/".concat(this.props.farm,"/settings")&&r.a.createElement("span",null,r.a.createElement("i",{className:"fas fa-fw fa-arrow-left pointer",onClick:this.onArrowClick})),this.getHeader())}),r.a.createElement(i.a,{addPaddingForButtons:!0},r.a.createElement(d.g,null,r.a.createElement(d.d,{path:"/".concat(this.props.farm,"/settings/profile/personalize"),render:()=>r.a.createElement(m.a,null)}),r.a.createElement(d.d,{path:"/".concat(this.props.farm,"/settings/profile/changePassword"),render:()=>r.a.createElement(p.a,null)}),r.a.createElement(d.d,{path:"/".concat(this.props.farm,"/settings/profile/changeMQTTPassword"),render:()=>r.a.createElement(ie.a,null)}),r.a.createElement(d.d,{path:"/".concat(this.props.farm,"/settings/profile/general"),render:()=>r.a.createElement(o.a,null)}),r.a.createElement(d.d,{path:"/".concat(this.props.farm,"/settings/devices/manage"),render:()=>r.a.createElement(h.a,null)}),r.a.createElement(d.d,{path:"/".concat(this.props.farm,"/settings/devices/add"),exact:!0,render:()=>r.a.createElement(y.a,null)}),r.a.createElement(d.d,{path:"/".concat(this.props.farm,"/settings/devices/add/bridge"),render:()=>r.a.createElement(x.a,null)}),r.a.createElement(d.d,{path:"/".concat(this.props.farm,"/settings/devices/add/dispenserWST"),render:()=>r.a.createElement(w.a,null)}),r.a.createElement(d.d,{path:"/".concat(this.props.farm,"/settings/devices/add/dispenserNRF"),render:()=>r.a.createElement(S.a,null)}),r.a.createElement(d.d,{path:"/".concat(this.props.farm,"/settings/devices/add/waterMeter"),render:()=>r.a.createElement(We.a,null)}),r.a.createElement(d.d,{path:"/".concat(this.props.farm,"/settings/devices/add/electricityMeter"),render:()=>r.a.createElement(Ce.a,null)}),r.a.createElement(d.d,{path:"/".concat(this.props.farm,"/settings/devices/add/weightWST"),render:()=>r.a.createElement(k.a,null)}),r.a.createElement(d.d,{path:"/".concat(this.props.farm,"/settings/devices/add/climateWST"),render:()=>r.a.createElement(D.a,null)}),r.a.createElement(d.d,{path:"/".concat(this.props.farm,"/settings/devices/add/climateSK3"),render:()=>r.a.createElement(Ve.a,null)}),r.a.createElement(d.d,{path:"/".concat(this.props.farm,"/settings/devices/add/cage"),render:()=>r.a.createElement(O.a,null)}),r.a.createElement(d.d,{path:"/".concat(this.props.farm,"/settings/devices/add/thermoEye"),render:()=>r.a.createElement(X.a,null)}),r.a.createElement(d.d,{path:"/".concat(this.props.farm,"/settings/devices/add/dispenserNRFMulti"),render:()=>r.a.createElement(me.a,null)}),r.a.createElement(d.d,{path:"/".concat(this.props.farm,"/settings/devices/add/chainFeeding"),render:()=>r.a.createElement(Re.a,null)}),r.a.createElement(d.d,{path:"/".concat(this.props.farm,"/settings/devices/add/antennaRFID"),render:()=>r.a.createElement(he.a,null)}),r.a.createElement(d.d,{path:"/".concat(this.props.farm,"/settings/devices/add/pigletScale"),render:()=>r.a.createElement(Ne.a,null)}),r.a.createElement(d.d,{path:"/".concat(this.props.farm,"/settings/devices/add/pigletScaleEdit"),render:()=>r.a.createElement(He.a,null)}),r.a.createElement(d.d,{path:"/".concat(this.props.farm,"/settings/devices/addressing"),render:()=>r.a.createElement(U.a,null)}),r.a.createElement(d.d,{path:"/".concat(this.props.farm,"/settings/devices/subaddressing"),render:()=>r.a.createElement(le.a,null)}),r.a.createElement(d.d,{path:"/".concat(this.props.farm,"/settings/devices/openSSH"),render:()=>r.a.createElement(V.a,null)}),r.a.createElement(d.d,{path:"/".concat(this.props.farm,"/settings/buildings/manage"),render:()=>r.a.createElement(g.a,null)}),r.a.createElement(d.d,{path:"/".concat(this.props.farm,"/settings/buildings/map"),render:()=>r.a.createElement(Q.a,null)}),r.a.createElement(d.d,{path:"/".concat(this.props.farm,"/settings/buildings/pairDevice"),render:()=>r.a.createElement(u.a,null)}),r.a.createElement(d.d,{path:"/".concat(this.props.farm,"/settings/buildings/assignChambers"),render:()=>r.a.createElement(Z.a,null)}),r.a.createElement(d.d,{path:"/".concat(this.props.farm,"/settings/feeding/curves"),exact:!0,render:()=>r.a.createElement(v.a,null)}),r.a.createElement(d.d,{path:"/".concat(this.props.farm,"/settings/feeding/general"),exact:!0,render:()=>r.a.createElement(ye.a,null)}),r.a.createElement(d.d,{path:"/".concat(this.props.farm,"/settings/feeding/curves/edit/:index"),render:()=>r.a.createElement(b.a,null)}),r.a.createElement(d.d,{path:"/".concat(this.props.farm,"/settings/feeding/plans"),exact:!0,render:()=>r.a.createElement(P.a,null)}),r.a.createElement(d.d,{path:"/".concat(this.props.farm,"/settings/feeding/schedules/edit/:index"),render:()=>r.a.createElement(F.a,null)}),r.a.createElement(d.d,{path:"/".concat(this.props.farm,"/settings/feeding/forages"),exact:!0,render:()=>r.a.createElement(z.a,null)}),r.a.createElement(d.d,{path:"/".concat(this.props.farm,"/settings/feeding/forages/edit/:index"),render:()=>r.a.createElement(T.a,null)}),r.a.createElement(d.d,{path:"/".concat(this.props.farm,"/settings/feeding/f1/manage"),render:e=>r.a.createElement(I.a,e),exact:!0}),r.a.createElement(d.d,{path:"/".concat(this.props.farm,"/settings/feeding/f1/manage/configuration"),render:e=>r.a.createElement(De.a,e)}),r.a.createElement(d.d,{path:"/".concat(this.props.farm,"/settings/feeding/f3f5/manage"),render:e=>r.a.createElement(K.a,e),exact:!0}),r.a.createElement(d.d,{path:"/".concat(this.props.farm,"/settings/feeding/f3f5/manage/configuration"),render:e=>r.a.createElement(Oe.a,e)}),r.a.createElement(d.d,{path:"/".concat(this.props.farm,"/settings/feeding/calibration"),render:()=>r.a.createElement(pe.a,null)}),r.a.createElement(d.d,{path:"/".concat(this.props.farm,"/settings/buildings/pairDevice"),render:()=>r.a.createElement(u.a,null)}),r.a.createElement(d.d,{path:"/".concat(this.props.farm,"/settings/buildings/assignChambers"),render:()=>r.a.createElement(Z.a,null)}),r.a.createElement(d.d,{path:"/".concat(this.props.farm,"/settings/buildings/assignRFIDToStand"),render:()=>r.a.createElement(oe.a,null)}),r.a.createElement(d.d,{path:"/".concat(this.props.farm,"/settings/feeding/curves"),exact:!0,render:()=>r.a.createElement(v.a,null)}),r.a.createElement(d.d,{path:"/".concat(this.props.farm,"/settings/feeding/curves/edit/:index"),render:()=>r.a.createElement(b.a,null)}),r.a.createElement(d.d,{path:"/".concat(this.props.farm,"/settings/feeding/schedules"),exact:!0,render:()=>r.a.createElement(P.a,null)}),r.a.createElement(d.d,{path:"/".concat(this.props.farm,"/settings/feeding/schedules/edit/:index"),render:()=>r.a.createElement(F.a,null)}),r.a.createElement(d.d,{path:"/".concat(this.props.farm,"/settings/feeding/forages"),exact:!0,render:()=>r.a.createElement(z.a,null)}),r.a.createElement(d.d,{path:"/".concat(this.props.farm,"/settings/feeding/forages/edit/:index"),render:()=>r.a.createElement(T.a,null)}),r.a.createElement(d.d,{path:"/".concat(this.props.farm,"/settings/feeding/f1/manage"),render:()=>r.a.createElement(I.a,null)}),r.a.createElement(d.d,{path:"/".concat(this.props.farm,"/settings/feeding/f3f5/manage"),render:()=>r.a.createElement(K.a,null)}),r.a.createElement(d.d,{path:"/".concat(this.props.farm,"/settings/feeding/calibration"),render:()=>r.a.createElement(pe.a,null)}),r.a.createElement(d.d,{path:"/".concat(this.props.farm,"/settings/feeding/waterCalibration"),render:()=>r.a.createElement(Ke.a,null)}),r.a.createElement(d.d,{path:"/".concat(this.props.farm,"/settings/weightPanels/manage"),render:e=>r.a.createElement(J.a,e),exact:!0}),r.a.createElement(d.d,{path:"/".concat(this.props.farm,"/settings/weightPanels/manage/configuration"),render:e=>r.a.createElement(ze.a,e)}),r.a.createElement(d.d,{path:"/".concat(this.props.farm,"/settings/climate/curves"),exact:!0,render:()=>r.a.createElement(j.a,null)}),r.a.createElement(d.d,{path:"/".concat(this.props.farm,"/settings/climate/curves/add"),render:e=>r.a.createElement(C.a,e)}),r.a.createElement(d.d,{path:"/".concat(this.props.farm,"/settings/climate/curves/edit/:id"),render:e=>r.a.createElement(C.a,e)}),r.a.createElement(d.d,{path:"/".concat(this.props.farm,"/settings/climate/manage"),exact:!0,render:e=>r.a.createElement(M.a,e)}),r.a.createElement(d.d,{path:"/".concat(this.props.farm,"/settings/climate-sk3/curves"),exact:!0,render:()=>r.a.createElement(N.a,null)}),r.a.createElement(d.d,{path:"/".concat(this.props.farm,"/settings/climate-sk3/curves/add"),render:e=>r.a.createElement(Y.a,e)}),r.a.createElement(d.d,{path:"/".concat(this.props.farm,"/settings/climate-sk3/curves/edit/:id"),render:e=>r.a.createElement(Y.a,e)}),r.a.createElement(d.d,{path:"/".concat(this.props.farm,"/settings/climate-sk3/manage"),exact:!0,render:e=>r.a.createElement(Le.a,e)}),r.a.createElement(d.d,{path:"/".concat(this.props.farm,"/settings/climate/manage/configuration"),render:e=>r.a.createElement(Pe.a,e)}),r.a.createElement(d.d,{path:"/".concat(this.props.farm,"/settings/climate-sk3/manage/configuration"),render:e=>r.a.createElement(Ue.a,e)}),r.a.createElement(d.d,{path:"/".concat(this.props.farm,"/settings/cage/manage"),render:e=>r.a.createElement(q.a,e),exact:!0}),r.a.createElement(d.d,{path:"/".concat(this.props.farm,"/settings/cage/manage/configuration"),render:e=>r.a.createElement(Fe.a,e)}),r.a.createElement(d.d,{path:"/".concat(this.props.farm,"/settings/chainFeeding/manage"),render:e=>r.a.createElement(qe.a,e),exact:!0}),r.a.createElement(d.d,{path:"/".concat(this.props.farm,"/settings/chainFeeding/manage/configuration"),render:e=>r.a.createElement(Ae.a,e)}),r.a.createElement(d.d,{path:"/".concat(this.props.farm,"/settings/cage/display"),render:()=>r.a.createElement(_.a,null)}),r.a.createElement(d.d,{path:"/".concat(this.props.farm,"/settings/dictionary/manage"),render:()=>r.a.createElement(A.a,null)}),r.a.createElement(d.d,{path:"/".concat(this.props.farm,"/settings/system/locale"),render:()=>r.a.createElement(H.a,null)}),r.a.createElement(d.d,{path:"/".concat(this.props.farm,"/settings/system/devices"),render:()=>r.a.createElement($.a,null)}),r.a.createElement(d.d,{path:"/".concat(this.props.farm,"/settings/system/schedules"),render:()=>r.a.createElement(we.a,null),exact:!0}),r.a.createElement(d.d,{path:"/".concat(this.props.farm,"/settings/system/schedules/worktype/add/:index"),render:e=>r.a.createElement(Se.a,e)}),r.a.createElement(d.d,{path:"/".concat(this.props.farm,"/settings/system/schedules/worktype/edit/:SetID"),render:e=>r.a.createElement(Se.a,e)}),r.a.createElement(d.d,{path:"/".concat(this.props.farm,"/settings/system/schedules/add/:index"),render:e=>r.a.createElement(ke.a,e)}),r.a.createElement(d.d,{path:"/".concat(this.props.farm,"/settings/system/schedules/edit/:SetID"),render:e=>r.a.createElement(ke.a,e)}),r.a.createElement(d.d,{path:"/".concat(this.props.farm,"/settings/breeding/cycleSettings"),render:()=>r.a.createElement(L.a,null)}),r.a.createElement(d.d,{path:"/".concat(this.props.farm,"/settings/breeding/graftingProgram"),render:e=>r.a.createElement(ve.a,e),exact:!0}),r.a.createElement(d.d,{path:"/".concat(this.props.farm,"/settings/breeding/graftingProgram/add/:animalKind"),render:e=>r.a.createElement(be.a,e)}),r.a.createElement(d.d,{path:"/".concat(this.props.farm,"/settings/breeding/graftingProgram/edit/:programID"),render:e=>r.a.createElement(be.a,Ge({},e,{edit:!0}))}),r.a.createElement(d.d,{path:"/".concat(this.props.farm,"/settings/breeding/feedingLevels"),render:e=>r.a.createElement(Me.a,e),exact:!0}),r.a.createElement(d.d,{path:"/".concat(this.props.farm,"/settings/debug/bridge"),render:()=>r.a.createElement(G.a,null)}),r.a.createElement(d.d,{path:"/".concat(this.props.farm,"/settings/debug/nrf"),render:()=>r.a.createElement(B.a,null)}),r.a.createElement(d.d,{path:"/".concat(this.props.farm,"/settings/debug/shadows"),render:()=>r.a.createElement(W.a,null)}),r.a.createElement(d.d,{path:"/".concat(this.props.farm,"/settings/debug/cage"),render:()=>r.a.createElement(R.a,null)}),r.a.createElement(d.d,{path:"/".concat(this.props.farm,"/settings/debug/terminal"),render:()=>r.a.createElement(ee.a,null)}),r.a.createElement(d.d,{path:"/".concat(this.props.farm,"/settings/debug/climate"),render:()=>r.a.createElement(xe.a,null)}),r.a.createElement(d.d,{path:"/".concat(this.props.farm,"/settings/debug/programs"),render:()=>r.a.createElement(Ee.a,null)}),r.a.createElement(d.d,{path:"/".concat(this.props.farm,"/settings/debug/ramToFram"),render:()=>r.a.createElement(fe.a,null)}),r.a.createElement(d.d,{path:"/".concat(this.props.farm,"/settings/debug/currentPrograms"),render:()=>r.a.createElement(ue.a,null)}),r.a.createElement(d.d,{path:"/".concat(this.props.farm,"/settings/debug/queueSuccess"),render:()=>r.a.createElement(de.a,null)}),r.a.createElement(d.d,{path:"/".concat(this.props.farm,"/settings/debug/loki"),render:()=>r.a.createElement(Te.a,null)}),r.a.createElement(d.d,{path:"/".concat(this.props.farm,"/settings/notifications/general"),render:()=>r.a.createElement(te.a,null)}),r.a.createElement(d.d,{path:"/".concat(this.props.farm,"/settings/notifications/cage"),render:()=>r.a.createElement(ae.a,null)}),r.a.createElement(d.d,{path:"/".concat(this.props.farm,"/settings/notifications/climateSettings"),render:()=>r.a.createElement(ne.a,null)}),r.a.createElement(d.d,{path:"/".concat(this.props.farm,"/settings/notifications/siloses"),render:()=>r.a.createElement(re.a,null)}),r.a.createElement(d.d,{path:"/".concat(this.props.farm,"/settings/notifications/feeding"),render:()=>r.a.createElement(se.a,null)}),r.a.createElement(d.d,{path:"/".concat(this.props.farm,"/settings/notifications/overallEvents"),render:()=>r.a.createElement(ce.a,null)}),r.a.createElement(d.d,{path:"/".concat(this.props.farm,"/settings/dictionary/medicines"),render:()=>r.a.createElement(ge.a,null)}),r.a.createElement(d.d,{path:"/".concat(this.props.farm,"/settings/translate/edit"),render:e=>r.a.createElement(je.a,e)}),r.a.createElement(d.d,{path:"/".concat(this.props.farm,"/settings/utility"),render:e=>r.a.createElement(Ie.a,e)}),r.a.createElement(d.d,{path:"/".concat(this.props.farm,"/settings/service/maintenance"),render:e=>r.a.createElement(Qe.a,e)}),r.a.createElement(d.d,{path:"/".concat(this.props.farm,"/settings/service/deleteFarmData"),render:e=>r.a.createElement(Je.a,e)}),r.a.createElement(d.d,{render:()=>r.a.createElement(l.a,null)}))))}}Be=Object(s.connect)(e=>({farm:e.location.farm}))(Be),Be=Object(E.a)({roles:[f.c._GENERAL_READ],showComponent:!0})(Be),t.default=Object(Ye.a)()(Be)}}]); //# sourceMappingURL=main~c17b4d92.7bed0431.chunk.js.map