(this["webpackJsonpgonzo-test-client"]=this["webpackJsonpgonzo-test-client"]||[]).push([[7],{"++5R":function(e,a,t){"use strict";t.d(a,"a",(function(){return o}));var n=t("q1tI"),r=t.n(n),l=t("17x9"),s=t.n(l),i=t("bXC2");class o extends r.a.Component{render(){const{cycle:{parturitions:e},isAdvanced:a,tooltipContent:t,cycleRenderClass:n}=this.props;let l=e[0];if(!l)return r.a.createElement(r.a.Fragment,null,a&&r.a.createElement(i.a,{className:"print-display-none"}),r.a.createElement(i.a,{className:"print-display-none",comment:n&&t}),r.a.createElement(i.a,{className:"print-display-none"}),r.a.createElement(i.a,{className:"print-display-none"}),r.a.createElement(i.a,{className:"print-display-none"}),a&&r.a.createElement(i.a,{className:"normal-display-none"}),r.a.createElement(i.a,{className:"normal-display-none"}),r.a.createElement(i.a,{className:"normal-display-none"}),r.a.createElement(i.a,{className:"normal-display-none"}),r.a.createElement(i.a,{className:"normal-display-none"}));const s=e[0].operators;return r.a.createElement(r.a.Fragment,null,r.a.createElement(r.a.Fragment,null,a&&r.a.createElement(i.a,{className:"print-display-none"},l.date),r.a.createElement(i.a,{className:"print-display-none",comment:n&&t,isAdvanced:a,operators:s},r.a.createElement("div",null,l.alive)),r.a.createElement(i.a,{className:"print-display-none"},l.dead),r.a.createElement(i.a,{className:"print-display-none"},l.mummies),r.a.createElement(i.a,{className:"print-display-none"},l.avgWeight),a&&r.a.createElement(i.a,{className:"normal-display-none"},l.date),r.a.createElement(i.a,{className:"normal-display-none"},l.alive),r.a.createElement(i.a,{className:"normal-display-none"},l.dead),r.a.createElement(i.a,{className:"normal-display-none"},l.mummies),r.a.createElement(i.a,{className:"normal-display-none"},l.avgWeight)))}}o.propTypes={cycle:s.a.shape({parturitions:s.a.array.isRequired}).isRequired}},"/YCi":function(e,a,t){},"04kE":function(e,a,t){},"2SFk":function(e,a,t){"use strict";var n=t("q1tI"),r=t.n(n),l=t("Ty5D"),s=t("udB/");function i(){return(i=Object.assign||function(e){for(var a=1;a=0||(r[t]=e[t]);return r}(e,a);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(r[t]=e[t])}return r}a.a=e=>{let{component:a,props:t}=e,n=o(e,["component","props"]);const c=function(e,a=window.location.href){e=e.replace(/[[]]/g,"\\$&");const t=new RegExp("[?&]"+e+"(=([^#]*)|&|#|$)","i").exec(a);if(!t)return null;if(!t[2])return"";return decodeURIComponent(t[2].replace(/\+/g," "))}("redirect");return r.a.createElement(l.d,i({},n,{render:e=>t.isAuthenticating?r.a.createElement(s.a,{isLoading:t.isAuthenticating}):t.isAuthenticated?r.a.createElement(l.c,{to:c||"/"}):r.a.createElement(a,i({},e,t))}))}},"7tZq":function(e,a,t){"use strict";t.d(a,"a",(function(){return E}));var n=t("a9jo"),r=t.n(n),l=t("Y+p1"),s=t.n(l),i=t("q1tI"),o=t.n(i),c=t("bXC2"),m=t("17x9"),d=t.n(m),p=t("pxzG"),u=t("eASP");class E extends o.a.Component{constructor(...e){super(...e),this.weightValueFormatter=e=>Object(p.j)(e,{unit:u.a.MEDIUM,showUnit:!0,fixed:1})}render(){const{cycle:{falls:e,key:a},expanded:{rows:t},isAdvanced:n,tooltipContent:l,cycleRenderClass:i}=this.props;let m=t.find(e=>e===a),d=e[e.length-1];if(!d)return o.a.createElement(o.a.Fragment,null,n&&o.a.createElement(c.a,{className:"print-display-none"}),o.a.createElement(c.a,{className:"print-display-none",comment:i&&l}),o.a.createElement(c.a,{className:"print-display-none"}),n&&o.a.createElement(c.a,{className:"normal-display-none"}),o.a.createElement(c.a,{className:"normal-display-none"}),o.a.createElement(c.a,{className:"normal-display-none"}));const p=e[0].operators;return o.a.createElement(o.a.Fragment,null,n&&o.a.createElement(c.a,{className:"print-display-none"},s()(a,m)&&n?e.map((e,a)=>o.a.createElement("div",{key:a},e.date)):d.date),o.a.createElement(c.a,{className:"print-display-none",comment:i&&l,isAdvanced:n,operators:p},n&&s()(a,m)?o.a.createElement("div",null,e.map((e,a)=>o.a.createElement("div",{key:a},e.amount))):o.a.createElement("div",null,r()(e,"amount"))),o.a.createElement(c.a,{className:"print-display-none"},n&&s()(a,m)?e.map((e,a)=>o.a.createElement("div",{key:a},this.weightValueFormatter(e.weight))):this.weightValueFormatter(r()(e,"weight"))),n&&o.a.createElement(c.a,{className:"normal-display-none"},e.map((e,a)=>o.a.createElement("div",{key:a},e.date))),o.a.createElement(c.a,{className:"normal-display-none"},n?e.map((e,a)=>o.a.createElement("div",{key:a},e.amount)):r()(e,"amount")),o.a.createElement(c.a,{className:"normal-display-none"},n?e.map((e,a)=>o.a.createElement("div",{key:a},this.weightValueFormatter(e.weight))):this.weightValueFormatter(r()(e,"weight"))))}}E.propTypes={cycle:d.a.shape({falls:d.a.array.isRequired}).isRequired}},Awgz:function(e,a,t){"use strict";var n=t("q1tI"),r=t.n(n),l=t("17x9"),s=t.n(l),i=t("bXC2"),o=t("/MKj");class c extends r.a.Component{constructor(...e){super(...e),this.getCellBackground=()=>{const{cycleTable:e,cycle:{cycle:a}}=this.props,t=e.filter(e=>e.cycle===a).length;return t>3?"error":t>=2?"warning":""}}render(){const{cycle:{cycle:e}}=this.props,a=this.getCellBackground();return r.a.createElement(i.a,{className:a},e)}}c.propTypes={cycle:s.a.isRequired},c=Object(o.connect)(e=>({cycleTable:e.animalDocuments.cycleTable}))(c),a.a=c},EfYk:function(e,a,t){"use strict";t.d(a,"a",(function(){return o}));var n=t("q1tI"),r=t.n(n),l=t("17x9"),s=t.n(l),i=t("bXC2");class o extends r.a.Component{constructor(e){super(e),this.onClick=()=>{const{cycle:{key:e},onPress:a}=this.props;this.setState(e=>({opened:!e.opened}),()=>a(e,this.state.opened))},this.shouldExpand=()=>{const{cycle:e}=this.props;for(const a in e)if(e.hasOwnProperty(a)&&"invalidEvents"!==a&&Array.isArray(e[a])&&e[a].length>1)return!0;return!1};const{expanded:{rows:a},cycle:{key:t}}=e,n=!!a.includes(t);this.state={opened:n}}render(){const{opened:e}=this.state;return this.shouldExpand()?r.a.createElement(r.a.Fragment,null,r.a.createElement(i.a,{className:"print-display-none"},r.a.createElement("i",{onClick:this.onClick,className:"fas fa-chevron-".concat(e?"up":"down")}))):r.a.createElement(i.a,{className:"print-display-none"})}}o.propTypes={cycle:s.a.shape({shouldExpand:s.a.bool.isRequired}).isRequired}},IKic:function(e,a,t){"use strict";t.d(a,"a",(function(){return m}));var n=t("Y+p1"),r=t.n(n),l=t("q1tI"),s=t.n(l),i=t("17x9"),o=t.n(i),c=t("bXC2");class m extends s.a.Component{getBoarName(){try{const{cycle:{inseminations:e}}=this.props,a=e[0].boar;for(let t of e)if(t.boar!==a)return"Mix";return a}catch(e){return""}}render(){const{cycle:{inseminations:e,key:a},expanded:{rows:t},isAdvanced:n,tooltipContent:l,cycleRenderClass:i}=this.props;let o=t.find(e=>e===a),m=e[0];if(!m)return s.a.createElement(s.a.Fragment,null,s.a.createElement(c.a,{className:"print-display-none",comment:i&&l}),s.a.createElement(c.a,{className:"print-display-none"}),s.a.createElement(c.a,{className:"normal-display-none"}),s.a.createElement(c.a,{className:"normal-display-none"}));const d=e[0].operators;return s.a.createElement(s.a.Fragment,null,s.a.createElement(c.a,{className:"print-display-none",comment:l,isAdvanced:n,operators:d},n&&r()(a,o)?s.a.createElement("div",null,e.map((e,a)=>s.a.createElement("div",{key:a},e.date))):s.a.createElement("div",null,!!m&&m.date)),s.a.createElement(c.a,{className:"print-display-none"},n&&r()(a,o)?s.a.createElement("div",null,e.map((e,a)=>s.a.createElement("div",{key:a},e.boar))):s.a.createElement("div",null,!!m&&this.getBoarName())),s.a.createElement(c.a,{className:"normal-display-none"},n?e.map((e,a)=>s.a.createElement("div",{key:a},e.date)):m&&m.date),s.a.createElement(c.a,{className:"normal-display-none"},n?e.map((e,a)=>s.a.createElement("div",{key:a},e.boar)):this.getBoarName()))}}m.propTypes={cycle:o.a.shape({inseminations:o.a.array.isRequired}).isRequired,showTitle:o.a.bool}},L3U4:function(e,a,t){"use strict";t.d(a,"a",(function(){return d}));var n=t("Y+p1"),r=t.n(n),l=t("q1tI"),s=t.n(l),i=t("17x9"),o=t.n(i),c=t("bXC2"),m=t("Dn3e");class d extends s.a.Component{render(){const{cycle:{usgs:e,key:a},expanded:{rows:t},isAdvanced:n,tooltipContent:l,cycleRenderClass:i}=this.props;let o=t.find(e=>e===a),d=e[e.length-1];if(!d)return s.a.createElement(s.a.Fragment,null,n&&s.a.createElement(c.a,{className:"print-display-none"}),s.a.createElement(c.a,{className:"print-display-none",comment:i&&l}),n&&s.a.createElement(c.a,{className:"normal-display-none"}),s.a.createElement(c.a,{className:"normal-display-none"}));const p=e[0].operators;return s.a.createElement(s.a.Fragment,null,n&&s.a.createElement(c.a,{className:"print-display-none"},n&&r()(a,o)?s.a.createElement("div",null,e.map((e,a)=>s.a.createElement("div",{key:a},e.date))):s.a.createElement("div",null,!!d&&d.date)),s.a.createElement(c.a,{className:"print-display-none",comment:l,isAdvanced:n,operators:p},n&&r()(a,o)?s.a.createElement("div",null,e.map((e,a)=>s.a.createElement("div",{key:a},e&&(!0===e.result||e.result===m.USG_STATE.POSITIVE)&&s.a.createElement("i",{className:"fas fa-fw fa-check"}),e&&(!1===e.result||e.result===m.USG_STATE.NEGATIVE)&&s.a.createElement("i",{className:"fas fa-fw fa-times"}),e&&e.result===m.USG_STATE.REPEAT&&s.a.createElement("i",{className:"fas fa-fw fa-redo-alt"})))):s.a.createElement("div",null,d&&(!0===d.result||d.result===m.USG_STATE.POSITIVE)&&s.a.createElement("i",{className:"fas fa-fw fa-check"}),d&&(!1===d.result||d.result===m.USG_STATE.NEGATIVE)&&s.a.createElement("i",{className:"fas fa-fw fa-times"}),d&&d.result===m.USG_STATE.REPEAT&&s.a.createElement("i",{className:"fas fa-fw fa-redo-alt"}))),n&&s.a.createElement(c.a,{className:"normal-display-none"},n?e.map((e,a)=>s.a.createElement("div",{key:a},e.date)):d.date),s.a.createElement(c.a,{className:"normal-display-none"},n?e.map((e,a)=>s.a.createElement("div",{key:a},e&&(!0===e.result||e.result===m.USG_STATE.POSITIVE)&&s.a.createElement("i",{className:"fas fa-fw fa-check"}),e&&(!1===e.result||e.result===m.USG_STATE.NEGATIVE)&&s.a.createElement("i",{className:"fas fa-fw fa-times"}),e&&e.result===m.USG_STATE.REPEAT&&s.a.createElement("i",{className:"fas fa-fw fa-redo-alt"}))):s.a.createElement("div",null,d&&(!0===d.result||d.result===m.USG_STATE.POSITIVE)&&s.a.createElement("i",{className:"fas fa-fw fa-check"}),d&&(!1===d.result||d.result===m.USG_STATE.NEGATIVE)&&s.a.createElement("i",{className:"fas fa-fw fa-times"}),d&&d.result===m.USG_STATE.REPEAT&&s.a.createElement("i",{className:"fas fa-fw fa-redo-alt"}))))}}d.propTypes={cycle:o.a.shape({usgs:o.a.array.isRequired}).isRequired}},LZmG:function(e,a,t){"use strict";var n=t("L5/0"),r=t.n(n),l=t("50DI"),s=t.n(l),i=t("q1tI"),o=t.n(i),c=t("/MKj"),m=t("mzFT"),d=t("v9qu"),p=t("E+oP"),u=t.n(p),E=t("BkRI"),h=t.n(E),f=t("wd/R"),y=t.n(f),v=t("ANjH"),g=t("f0zD"),N=t("10H7"),D=t("tkTQ"),T=t("3Z9Z"),b=t("JI6e"),w=t("i8MS"),I=(t("/YCi"),t("VyNe")),A=t("SXbh"),F=t("uSQv"),O=t("17x9"),S=t.n(O),C=t("pxzG"),R=t("eASP"),j=t("q17X"),x=t("pZsI"),M=t("PRyg"),Y=t("uUZO"),P=t("LCzB");class k extends i.Component{constructor(e){super(e),this.getLastActiveNipples=()=>{const{cycleTable:e}=this.props;return e[e.length-1]&&e[e.length-1].AN[0]&&e[e.length-1].AN[0].EvData?e[e.length-1].AN[e[e.length-1].AN.length-1].EvData.Nipples:"-"},this.getTechnologyGroup=()=>{const{animal:{AnmID:e}}=this.props;return x.a.getTechnoGroupById(e)},this.state={separations:this.props.events.length>0?this.props.events.filter(e=>[N.b.SEPARATION].includes(e.EvCode)):[]}}getSupplier(){try{return this.props.suppliers.find(e=>e.ID===this.props.animal.SupplierID).Value}catch(e){return"-"}}getRace(){try{return this.props.races.find(e=>e.ID===this.props.animal.Race).Value}catch(e){return"-"}}getDeathReason(){let e=-1;if(this.props.animal&&this.props.animal.DtaDthTime){let a=h()(this.props.events);if(e=this.props.animal.DthRsn,a=a||[],a.sort((e,a)=>(a.EvTime?+a.EvTime:0)-(e.EvTime?+e.EvTime:0)),a=a.filter(a=>a.EvCode===(1===e?N.b.SELL:N.b.FALL))[0],a){if(a.EvCode===N.b.SELL&&a.EvData){let t=this.props.clients.filter(e=>"".concat(e.ID)==="".concat(a.EvData.Buyer))[0];if(t)return{type:e,value:t.Value}}if(a.EvCode===N.b.FALL&&a.EvData){let t=this.props.fallReasons.filter(e=>"".concat(e.ID)==="".concat(a.EvData.Reasn))[0];if(t)return{type:e,value:t.Value}}}}return{type:e,value:"-"}}getLocation(){const{animal:e}=this.props;return w.a.getAnimalLocationsByPlcmntID(e.PlcmntID).map(e=>e.name).join(", ")}getBirth(e){let a=y()(e),t=y()().startOf("day").diff(e,"days");return"".concat(a.format("DD.MM.YYYY")," (").concat(t," ").concat(1===t?this.props.t("day"):this.props.t("days"),")")}getAverageWeightOfBirth(){const{Weight:e,AnmCnt:a}=this.props.animal,t=a?+e/+a:0;return t?Object(C.j)(t,{unit:R.a.MEDIUM,showUnit:!0}):"-"}getAverageWeightOfSeparation(){const{separations:e}=this.state;if(0===e.length)return"-";const a=e.reduce((e,a)=>({weight:e.weight+a.EvData.PiWeight,cnt:e.cnt+a.EvData.PiCnt}),{weight:0,cnt:0});return a.cnt?Object(C.j)(a.weight/a.cnt,{unit:R.a.MEDIUM,showUnit:!0}):"-"}getLastDateOfSeparation(){const{separations:e}=this.state,a=e.length?Math.max.apply(null,e.map(e=>e.EvTime)):0;return a?y()(a).format("DD.MM.YYYY"):"-"}getExpectedDateOfSale(){const{animal:{DtaBrthTime:e}}=this.props;let a=+Object(j.getNumberOfDaysToSale)();return e?y()(e).add(a,"days").format("DD.MM.YYYY"):"-"}getCurrentPigletsForASow(){const{cycleTable:e}=this.props,a=Object(Y.a)(e),t=[];if(!u()(a)){const e=a[a.length-1];return Object.values(e).forEach(e=>{Array.isArray(e)&&e.forEach(e=>t.push(e))}),Object(M.getPigBalance)(t)}return 0}render(){const{animal:e,showEdit:a,cycleTable:t}=this.props,n=this.getTechnologyGroup();let r=this.getDeathReason();return o.a.createElement(I.a,{className:"basic-info-box"},o.a.createElement("div",{className:"d-flex justify-content-between"},o.a.createElement("h5",null,this.props.t("animalDocuments.basicInformation")),a&&o.a.createElement(F.a,{buttonStyle:"round",icon:o.a.createElement("i",{className:"fas fa-pencil-alt"}),onClick:()=>this.props.show(A.a,{animal:e})})),o.a.createElement("div",{id:"info-box"},o.a.createElement(T.a,null,o.a.createElement(b.a,{md:6},o.a.createElement("div",null,o.a.createElement("div",{className:"info-row"},o.a.createElement("div",{className:"info-column header"},this.props.t("animalNumber")),o.a.createElement("div",{className:"info-column"},e.AnmNo1)),o.a.createElement("div",{className:"info-row"},o.a.createElement("div",{className:"info-column header"},this.props.t("secondaryNumber")),o.a.createElement("div",{className:"info-column"},e.AnmNo2||"-")),o.a.createElement("div",{className:"info-row"},o.a.createElement("div",{className:"info-column header"},this.props.t("rfidNumber")),o.a.createElement("div",{className:"info-column"},e.RFID||"-"))),this.props.animal.AnimalKind===D.a.PORKER&&o.a.createElement(o.a.Fragment,null,o.a.createElement("div",{className:"info-row"},o.a.createElement("div",{className:"info-column header"},this.props.t("amount")),o.a.createElement("div",{className:"info-column"},e.AnmCnt||"-"))),this.props.animal.AnimalKind===D.a.PIGLET&&o.a.createElement(o.a.Fragment,null,o.a.createElement("div",{className:"info-row"},o.a.createElement("div",{className:"info-column header"},this.props.t("amount")),o.a.createElement("div",{className:"info-column"},e.AnmCnt||"-")),o.a.createElement("div",{className:"info-row"},o.a.createElement("div",{className:"info-column header"},this.props.t("animalDocuments.averageBirthWeight")),o.a.createElement("div",{className:"info-column"},this.getAverageWeightOfBirth())),o.a.createElement("div",{className:"info-row"},o.a.createElement("div",{className:"info-column header"},this.props.t("animalDocuments.averageSeparationWeight")),o.a.createElement("div",{className:"info-column"},this.getAverageWeightOfSeparation()))),o.a.createElement("div",{className:"info-row"},o.a.createElement("div",{className:"info-column header"},this.props.t("supplier")),o.a.createElement("div",{className:"info-column"},this.getSupplier())),o.a.createElement("div",{className:"info-row"},o.a.createElement("div",{className:"info-column header"},this.props.t("race")),o.a.createElement("div",{className:"info-column"},this.getRace())),this.props.animal.AnimalKind===D.a.SOW&&o.a.createElement(o.a.Fragment,null,o.a.createElement("div",{className:"info-row"},o.a.createElement("div",{className:"info-column header"},this.props.t("animalDocuments.activeNipples")),o.a.createElement("div",{className:"info-column"},this.getLastActiveNipples())),o.a.createElement("div",{className:"info-row"},o.a.createElement("div",{className:"info-column header"},this.props.t("animalDocuments.sowPigletsCount")),o.a.createElement("div",{className:"info-column"},this.getCurrentPigletsForASow())))),o.a.createElement(b.a,{md:6},o.a.createElement("div",{className:"info-row"},o.a.createElement("div",{className:"info-column header"},this.props.t("birthDate")),o.a.createElement("div",{className:"info-column"},e.DtaBrthTime?this.getBirth(e.DtaBrthTime):"-")),o.a.createElement("div",{className:"info-row"},o.a.createElement("div",{className:"info-column header"},this.props.t("insertionDate")),o.a.createElement("div",{className:"info-column"},e.DtaInTime?y()(e.DtaInTime).format("DD.MM.YYYY"):"-")),o.a.createElement("div",{className:"info-row"},o.a.createElement("div",{className:"info-column header"},1===r.type?this.props.t("sellDate"):this.props.t("animalDocuments.deathDate")),o.a.createElement("div",{className:"info-column"},e.DtaDthTime?y()(e.DtaDthTime).format("DD.MM.YY"):"-")),o.a.createElement("div",{className:"info-row"},o.a.createElement("div",{className:"info-column header"},1===r.type?this.props.t("animalDocuments.soldTo"):this.props.t("animalDocuments.deathReason")),o.a.createElement("div",{className:"info-column"},r.value)),this.props.animal.AnimalKind===D.a.SOW&&o.a.createElement("div",{className:"info-row"},o.a.createElement("div",{className:"info-column header"},this.props.t("animalDocuments.plannedBirth")),o.a.createElement("div",{className:"info-column"},Object(M.getPlannedParturitionForASow)(t))),o.a.createElement("div",{className:"info-row"},o.a.createElement("div",{className:"info-column header"},this.props.t("placement")),o.a.createElement("div",{className:"info-column"},this.getLocation()||"-")),this.props.animal.AnimalKind===D.a.PIGLET&&o.a.createElement(o.a.Fragment,null,o.a.createElement("div",{className:"info-row"},o.a.createElement("div",{className:"info-column header"},this.props.t("animalDocuments.lastSeparationDate")),o.a.createElement("div",{className:"info-column"},this.getLastDateOfSeparation())),o.a.createElement("div",{className:"info-row"},o.a.createElement("div",{className:"info-column header"},this.props.t("animalDocuments.predictedSaleDate")),o.a.createElement("div",{className:"info-column"},this.getExpectedDateOfSale()))),o.a.createElement("div",{className:"info-row"},o.a.createElement("div",{className:"info-column header"},this.props.t("technologyGroup")),o.a.createElement("div",{className:"info-column"},n?y()(n.StartTime).format("DD-MM-YYYY"):"-"))))))}}k.propTypes={showEdit:S.a.bool},k.defaultProps={showEdit:!0},k=Object(c.connect)(e=>({farm:e.location.farm,animal:e.animalDocuments.selectedItem,events:e.animalDocuments.events,races:e.dictionary.race.WData[e.language.locale],suppliers:e.dictionary.suppliers.WData[e.language.locale],fallReasons:e.dictionary.fallReasons.WData[e.language.locale],clients:e.dictionary.clients.WData[e.language.locale],cycleTable:e.animalDocuments.cycleTable}))(k),k=Object(c.connect)(null,e=>Object(v.b)({show:g.d},e))(k);var V=Object(P.a)()(k),G=t("EooJ"),W=t("5PAS"),q=t("i7k/"),L=t("AAik"),B=t("yjtO"),U=t("BvFm");class K extends o.a.Component{constructor(...e){super(...e),this.dateValueFormatter=e=>e?y()(e).format("DD.MM.YY"):"",this.locationValueFormatter=e=>{let a=w.a.getAnimalLocationsByPlcmntID(e);return a.length>0?a[0].name:""},this.employeesValueFormatter=e=>{if("System"===e)return"Fetura Cloud";const{employees:a}=this.props;let t=a.find(a=>a.LocalUserID===e);return t?t.userName:e||""},this.getTransfers=e=>e.filter(e=>[N.b.TRANSFER].includes(e.EvCode))}render(){const{t:e,events:a}=this.props,t=this.getTransfers(a.length?a:[]),n=[{name:e("date"),field:"EvTime",valueFormatter:this.dateValueFormatter,customSort:q.c,_mobileDate:!0},{name:e("amount"),field:"AnmCnt",_mobileHide:!0},Object(d.a)()?{name:e("from"),field:"EvData.SrcID",valueFormatter:this.locationValueFormatter}:null,{name:e("to"),field:"EvData.DstID",valueFormatter:this.locationValueFormatter,colWidth:4},{name:e("eventGrid.operator"),field:"EvData.OperID",valueFormatter:this.employeesValueFormatter,shouldShow:()=>Object(U.c)(),colWidth:2}].filter(e=>!!e);return o.a.createElement(I.a,null,o.a.createElement("div",{className:"d-flex justify-content-between"},o.a.createElement("h5",null,e("animalDocuments.transfers"),"\xa0")),o.a.createElement("div",null,o.a.createElement(L.a,{data:t.sort((e,a)=>a.EvTime-e.EvTime),headers:n,mobileRow:o.a.createElement(B.a,null),showPagination:!0,paginationItems:10,scrollOnPageChange:!1})))}}K=Object(c.connect)(e=>({employees:e.user.employees,events:e.animalDocuments.events}))(K);var _=Object(P.a)()(K);class X extends o.a.Component{constructor(...e){super(...e),this.dateValueFormatter=e=>e?y()(e).format("DD.MM.YY"):"",this.weightValueFormatter=e=>e?Object(C.j)(+e,{unit:R.a.MEDIUM,showUnit:!0}):"",this.employeesValueFormatter=e=>{const{employees:a}=this.props;let t=a.find(a=>a.LocalUserID===e);return t?t.userName:e||""},this.getWeightings=e=>e.filter(e=>[N.b.WEIGHTING].includes(e.EvCode))}render(){const{t:e,events:a}=this.props,t=this.getWeightings(a.length?a:[]),n=[{name:e("date"),field:"EvTime",valueFormatter:this.dateValueFormatter,customSort:q.c,_mobileDate:!0},{name:e("animalDocuments.averageWeight"),field:"EvData.Weight",valueFormatter:this.weightValueFormatter},{name:e("eventGrid.operator"),field:"EvData.OperID",valueFormatter:this.employeesValueFormatter,shouldShow:()=>Object(U.c)(),colWidth:4}];return o.a.createElement(I.a,null,o.a.createElement("div",{className:"d-flex justify-content-between"},o.a.createElement("h5",null,e("weighting"),"\xa0")),o.a.createElement("div",null,o.a.createElement(L.a,{data:t.sort((e,a)=>a.EvTime-e.EvTime),headers:n,mobileRow:o.a.createElement(B.a,null),showPagination:!0,paginationItems:10,scrollOnPageChange:!1})))}}X=Object(c.connect)(e=>({employees:e.user.employees,events:e.animalDocuments.events}))(X);var Z=Object(P.a)()(X),z=t("mqUJ"),H=t("lU8S"),J=t("Y+p1"),Q=t.n(J),$=t("mwIZ"),ee=t.n($),ae=t("r8wt"),te=t("CuyV");class ne extends i.Component{render(){const{name:e,t:a,showFromInsemination:t}=this.props;return o.a.createElement("div",null,e,"\xa0",o.a.createElement(te.a,{tooltipContent:a(t?"animalDocuments.calculatedFromInsemination":"animalDocuments.calculatedFromBirth")},o.a.createElement("i",{className:"fas fa-info-circle"})))}}var re=Object(P.a)()(ne),le=t("3e2P"),se=t("F7k6");class ie extends o.a.Component{constructor(...e){super(...e),this.state=this.getData(this.props),this.dateValueFormatter=e=>{if(e){if(e.Start){let a=y()(e.Start).format("DD.MM.YY")+" - ";return e.End?a+=y()(e.End).format("DD.MM.YY"):a+="...",a}return y()(e).format("DD.MM.YY")}return"-"},this.medicineValueFormatter=e=>e?e.WData.Name:"-",this.unitValueFormatter=e=>e?e.WData.Dose+e.WData.Unit:"-",this.employeesValueFormatter=e=>{const{employees:a}=this.props;let t=a.find(a=>a.LocalUserID===e);return t?t.userName:"-"},this.userFormatter=e=>{const{employees:a}=this.props;let t=a.find(a=>a.login===e);return t?t.userName:e||""},this.reasonValueFormatter=e=>{const{graftingReasons:a}=this.props;let t=a.find(a=>a.ID===e);if(t)return t.Value},this.sortGridData=e=>{const a=e=>"Moment"!==e.date.constructor.name?e.date.Start:e.date.toDate().getTime();return e.sort((e,t)=>{const n=a(e),r=a(t);return nr?-1:0})}}hadGrafting(e,a,t){return e.find(e=>a.WordID===e.EvData.Medicine&&(!a||a.WData.Type!==ae.b.DOSATRON&&a.WData.Type!==ae.b.FORAGE?t.isSame(e.EvTime,"day"):t.isBetween(e.EvData.StartTime,e.EvData.EndTime,null,"[]")))}getData(){let e=[];const{medicines:a,events:t,animal:n,cycle:r,cycles:l,graftingProgram:s}=this.props;let i,o,c=!1,m=l[r];n.AnimalKind===D.a.SOW||n.AnimalKind===D.a.RENOVATION_SOW?(i=m?y()(m.StartTime):y()(0),o=m?0===r?null:m.EndTime:null,c=!!m&&!!m[N.b.INSEMINATION][0]):n.DtaBrthTime||n.DtaInTime?(i=y()(n.DtaBrthTime||n.DtaInTime).startOf("day"),c=!0):i=y()(0);let d=t.filter(e=>e.EvCode===N.b.GRAFTING&&(!(e.EvTime{let t=a.find(a=>a.WordID===e.Medicine),n=i.clone().add(e.Age,"days");if(o&&n.toDate().getTime()e.EvID!==a.EvID)),{medicine:t,date:n,daysAfter:e.Age,done:!!a,comment:a?a.Comment:null,operator:a?a.OperID:null,reason:a?a.EvData.Reasn:null}}}).filter(e=>e));let p=t.filter(e=>e.EvCode===N.b.TREATMENT);for(let u of p)for(let t of u.EvData.Treatment){let n=t.Dates.filter(e=>(!o||!y()(e).isAfter(o))&&y()(e).isAfter(i));for(let r of t.Medicine){let t=a.find(e=>e.WordID===r);for(let a of n){let n=y()(a).startOf("day"),r=this.hadGrafting(d,t,n);r&&(d=d.filter(e=>e.EvID!==r.EvID)),e.push({medicine:t,date:n,daysAfter:s?n.diff(i,"day")+1:null,done:!!r,comment:r?r.Comment:null,operator:r?r.OperID:null,reason:r?r.EvData.Reasn:null})}}}for(let u of d){let t=a.find(e=>e.WordID===ee()(u,"EvData.Medicine")),n=u.EvData.StartTime?y()(u.EvData.StartTime).startOf("day"):y()(u.EvTime).startOf("day");e.push({medicine:t,date:u.EvData.StartTime?{Start:u.EvData.StartTime,End:u.EvData.EndTime}:n,done:!0,daysAfter:c?n.diff(i,"days")+1:null,comment:u.Comment,operator:u.OperID,reason:u.EvData.Reasn})}return e.sort((e,a)=>e.date.Start&&a.date.Start?e.date.Start-a.date.Start:e.date.Start?e.date.Start-a.date.toDate().getTime():a.date.Start?e.date.toDate().getTime()-a.date.Start:e.date.toDate().getTime()-a.date.toDate().getTime()),{data:e}}componentDidUpdate(e,a,t){this.props.cycle===e.cycle&&Q()(this.props.events,e.events)||this.setState(this.getData(this.props))}renderGrid(){const{t:e,animal:a}=this.props,{data:t}=this.state,n=[{name:e("date"),field:"date",valueFormatter:this.dateValueFormatter,customSort:q.c,_mobileDate:!0},{name:e("day"),field:"daysAfter",headerComponent:o.a.createElement(re,{showFromInsemination:a.AnimalKind===D.a.SOW||a.AnimalKind===D.a.RENOVATION_SOW})},{name:e("medicine"),field:"medicine",valueFormatter:this.medicineValueFormatter,colWidth:2},{name:e("dosage"),field:"medicine",valueFormatter:this.unitValueFormatter},{name:e("reason"),field:"reason",valueFormatter:this.reasonValueFormatter},{name:e("done"),field:"done",component:e=>o.a.createElement("i",{className:e.value?"fas fa-check success":"fas fa-times error"})},{name:e("eventGrid.operator"),field:"operator",valueFormatter:this.userFormatter,shouldShow:()=>Object(U.c)(),colWidth:2},{name:e("comment"),field:"comment"}];return o.a.createElement(o.a.Fragment,null,o.a.createElement("div",{className:"d-flex justify-content-between"},o.a.createElement("h5",null,e("treatment"))),o.a.createElement("div",null,o.a.createElement(L.a,{data:this.sortGridData(t),headers:n,mobileRow:o.a.createElement(B.a,null),showPagination:!0,paginationItems:10,scrollOnPageChange:!1})))}render(){const{showCard:e}=this.props;return e?o.a.createElement(I.a,null,this.renderGrid()):this.renderGrid()}}ie.propTypes={cycle:S.a.number.isRequired,showCard:S.a.bool},ie.defaultProps={showCard:!0};var oe=Object(v.d)(Object(P.a)(),Object(c.connect)((function(e){return{events:[...Object(le.a)(e,N.b.GRAFTING),...Object(le.a)(e,N.b.TREATMENT)],cycles:Object(le.b)(e).sort((e,a)=>a.cycle-e.cycle),medicines:e.dictionary.medicine,employees:e.user.employees,graftingReasons:e.dictionary.graftingReason.WData[e.language.locale],graftingProgram:Object(se.a)(e,e.animalDocuments.selectedItem.AnimalKind),animal:Object(le.c)(e)}})))(ie);class ce extends i.Component{constructor(...e){super(...e),this.state={treatments:[]},this.mapPigletTreatments=e=>({date:e.EvData.StartTime?{Start:e.EvData.StartTime,End:e.EvData.EndTime}:e.EvTime,pigletsAmount:e.EvData.PiCnt,medicine:e.EvData.Medicine,operator:e.OperID,comment:e.Comment,reason:e.EvData.Reasn}),this.dateFormatter=e=>e.Start?e.End?y()(e.Start).format("DD.MM.YYYY")+" - "+y()(e.End).format("DD.MM.YYYY"):y()(e.Start).format("DD.MM.YYYY")+" - ...":y()(e).format("DD.MM.YYYY"),this.medicineFormatter=e=>{const{medicines:a}=this.props;let t=a.find(a=>a.WordID===e);if(t)return t.WData.Name},this.userFormatter=e=>{const{employees:a}=this.props;let t=a.find(a=>a.login===e);return t?t.userName:e||""},this.reasonValueFormatter=e=>{const{graftingReasons:a}=this.props;let t=a.find(a=>a.ID===e);if(t)return t.Value}}componentDidUpdate(e,a,t){this.props.cycle===e.cycle&&Q()(this.props.events,e.events)||this.setState({treatments:this.getPigletsTreatments(this.props.cycle)})}getPigletsTreatments(e){const{events:a}=this.props;if(!this.props.cycles.length)return[];const{StartTime:t,EndTime:n}=this.props.cycles[e];return 0===e?a.filter(e=>e.EvTime>=t).map(this.mapPigletTreatments):a.filter(e=>e.EvTime>=t&&e.EvTime<=n).map(this.mapPigletTreatments)}render(){const{t:e}=this.props,{treatments:a}=this.state,t=[{name:e("date"),field:"date",valueFormatter:this.dateFormatter},{name:e("pigletsAmount"),field:"pigletsAmount"},{name:e("medicine"),field:"medicine",valueFormatter:this.medicineFormatter,colWidth:2},{name:e("reason"),field:"reason",valueFormatter:this.reasonValueFormatter,colWidth:2},{name:e("eventGrid.operator"),field:"operator",valueFormatter:this.userFormatter,shouldShow:()=>Object(U.c)(),colWidth:2},{name:e("comment"),field:"comment"}];return o.a.createElement(o.a.Fragment,null,o.a.createElement("h5",null,e("pigletsTreatment")),o.a.createElement(L.a,{data:a.sort((e,a)=>a.EvData.StartTime-e.EvData.StartTime),headers:t,mobileRow:o.a.createElement(B.a,null),showPagination:!0,paginationItems:10,scrollOnPageChange:!1}))}}ce.propTypes={cycle:S.a.number.isRequired};var me=Object(v.d)(Object(P.a)(),Object(c.connect)((function(e){return{events:Object(le.a)(e,N.b.PIGLETS_TREATMENT),cycles:Object(le.b)(e).sort((e,a)=>a.cycle-e.cycle),medicines:e.dictionary.medicine,employees:e.user.employees,graftingReasons:e.dictionary.graftingReason.WData[e.language.locale]}})))(ce),de=t("hw2D");t("WF/M");class pe extends i.Component{constructor(...e){super(...e),this.state={cycle:0},this.onSelectChange=e=>{this.setState({cycle:e})}}render(){const{cycles:e,t:a}=this.props,{cycle:t}=this.state;return o.a.createElement(I.a,null,o.a.createElement(de.a,{options:e.map((e,t)=>({name:a("cycle",{count:e.cycle}),value:t})),clearButton:!1,value:t,onChange:this.onSelectChange}),o.a.createElement("div",{className:"sow-grafting-list"},o.a.createElement(oe,{cycle:t,showCard:!1})),o.a.createElement(me,{cycle:t}))}}var ue=Object(v.d)(Object(P.a)(),Object(c.connect)((function(e){return{cycles:Object(le.b)(e).sort((e,a)=>a.cycle-e.cycle)}})))(pe);class Ee extends i.Component{render(){const{mobile:e}=this.props;return o.a.createElement(o.a.Fragment,null,!e&&o.a.createElement(z.a,null),e&&o.a.createElement(H.a,null),o.a.createElement(ue,null),o.a.createElement(W.a,null),o.a.createElement(Z,null),o.a.createElement(_,null),o.a.createElement(G.b,null))}}class he extends o.a.Component{render(){return o.a.createElement(o.a.Fragment,null,o.a.createElement(oe,null),o.a.createElement(Z,null),o.a.createElement(_,null))}}class fe extends o.a.Component{render(){return o.a.createElement(o.a.Fragment,null,o.a.createElement(oe,null),o.a.createElement(Z,null),o.a.createElement(_,null))}}var ye=t("CX8Q"),ve=t("jpwK");class ge extends o.a.Component{constructor(e){super(e);const a=[],{group:t}=e;[...t.AnmIDs,...t.Rmvd].forEach(e=>{let t=w.a.getAnimalById(e);t&&a.push(t)}),this.state={animalsInGroup:a}}getLastData(){const{animalsInGroup:e}=this.state;if(e.length){let a=0,t=0,n=0;return e.forEach(e=>{+e.DtaBrthTime>a&&(a=+e.DtaBrthTime),+e.DtaInTime>t&&(t=+e.DtaInTime),+e.DtaDthTime>n&&(n=+e.DtaDthTime)}),{birthTime:a,insertionTime:t,deathTime:n}}return{}}getSupplier(){try{const{animalsInGroup:e}=this.state;return this.props.suppliers.find(a=>a.ID===e[0].SupplierID).Value}catch(e){return"-"}}getLocation(){const{group:{AnmIDs:e}}=this.props;if(e.length){let a;if(e.find(e=>{const t=w.a.getAnimalById(e);a=h()(t)}),a){return w.a.getAnimalLocationsByPlcmntID(a.PlcmntID).map(e=>e.name).join(", ")}}return"-"}getDeathReason(e=0){let a=-1;const{groupEvents:t}=this.props,{animalsInGroup:n}=this.state,r=n.filter(a=>a.DtaDthTime===e)[0];if(r){let e=h()(t);if(e=e||[],a=r.DthRsn,e.sort((e,a)=>(a.EvTime?+a.EvTime:0)-(e.EvTime?+e.EvTime:0)),e=e.filter(e=>e.EvCode===(a?N.b.SELL:N.b.FALL))[0],e){if(e.EvCode===N.b.SELL&&e.EvData){let t=this.props.clients.filter(a=>"".concat(a.ID)==="".concat(e.EvData.Buyer))[0];if(t)return{type:a,value:t.Value}}if(e.EvCode===N.b.FALL&&e.EvData){let t=this.props.fallReasons.filter(a=>"".concat(a.ID)==="".concat(e.EvData.Reasn))[0];if(t)return{type:a,value:t.Value}}}}return{type:a,value:"-"}}render(){const{group:e,t:a}=this.props,{birthTime:t,insertionTime:n,deathTime:r}=this.getLastData(),l=this.getDeathReason(r);return o.a.createElement(I.a,{className:"basic-info-box"},o.a.createElement("div",{className:"d-flex justify-content-between"},o.a.createElement("h5",null,a("animalDocuments.basicInformation"))),o.a.createElement("div",{id:"info-box"},o.a.createElement(T.a,null,o.a.createElement(b.a,{md:6},o.a.createElement("div",null,o.a.createElement("div",{className:"info-row"},o.a.createElement("div",{className:"info-column header"},a("groupNumber")),o.a.createElement("div",{className:"info-column"},e.GrNo1?e.GrNo1:"-")),o.a.createElement("div",{className:"info-row"},o.a.createElement("div",{className:"info-column header"},a("animalDocuments.lastInsertionDate")),o.a.createElement("div",{className:"info-column"},n?y()(n).format("DD.MM.YYYY"):"-")),o.a.createElement("div",{className:"info-row"},o.a.createElement("div",{className:"info-column header"},a("supplier")),o.a.createElement("div",{className:"info-column"},this.getSupplier())),o.a.createElement("div",{className:"info-row"},o.a.createElement("div",{className:"info-column header"},a("placement")),o.a.createElement("div",{className:"info-column"},this.getLocation())))),o.a.createElement(b.a,{md:6},o.a.createElement("div",null,o.a.createElement("div",{className:"info-row"},o.a.createElement("div",{className:"info-column header"},a("animalDocuments.lastBirthDate")),o.a.createElement("div",{className:"info-column"},t?y()(t).format("DD.MM.YYYY"):"-")),o.a.createElement("div",{className:"info-row"},o.a.createElement("div",{className:"info-column header"},1===l.type?a("animalDocuments.lastSellDate"):a("animalDocuments.lastFallDate")),o.a.createElement("div",{className:"info-column"},r?y()(r).format("DD.MM.YYYY"):"-")),o.a.createElement("div",{className:"info-row"},o.a.createElement("div",{className:"info-column header"},1===l.type?a("animalDocuments.soldTo"):a("animalDocuments.deathReason")),o.a.createElement("div",{className:"info-column"},l.value)))))))}}ge=Object(c.connect)(e=>({farm:e.location.farm,group:e.animalDocuments.selectedItem,groupEvents:e.animalDocuments.events,races:e.dictionary.race.WData[e.language.locale],suppliers:e.dictionary.suppliers.WData[e.language.locale],fallReasons:e.dictionary.fallReasons.WData[e.language.locale],clients:e.dictionary.clients.WData[e.language.locale]}))(ge);var Ne=Object(P.a)()(ge);class De extends o.a.Component{render(){return o.a.createElement(o.a.Fragment,null,o.a.createElement(Z,null),o.a.createElement(_,null))}}var Te=De,be=t("XiQt"),we=t("ZGSZ");class Ie extends o.a.Component{render(){return o.a.createElement(o.a.Fragment,null,o.a.createElement(oe,null),o.a.createElement(W.a,null),o.a.createElement(Z,null),o.a.createElement(_,null))}}class Ae extends i.Component{render(){const{selectedItem:e,events:a,mobile:t,loading:n}=this.props;return o.a.createElement(o.a.Fragment,null,!n&&e instanceof ye.a&&o.a.createElement(o.a.Fragment,null,o.a.createElement(V,{showEdit:!0,events:a,animal:e}),void 0!==e.AnimalKind&&o.a.createElement(o.a.Fragment,null,e.AnimalKind===D.a.RENOVATION_SOW&&o.a.createElement(Ie,null),e.AnimalKind===D.a.SOW&&o.a.createElement(Ee,{mobile:t}),e.AnimalKind===D.a.BOAR&&o.a.createElement(he,null),(e.AnimalKind===D.a.PORKER||e.AnimalKind===D.a.PIGLET)&&o.a.createElement(fe,null))),!n&&e instanceof ve.a&&o.a.createElement(o.a.Fragment,null,o.a.createElement(Ne,null),o.a.createElement(Te,null)),!n&&e instanceof be.a&&o.a.createElement(o.a.Fragment,null,o.a.createElement(we.a,null),o.a.createElement(we.a,{showRemoved:!0})))}}Ae=Object(c.connect)(e=>({selectedItem:e.animalDocuments.selectedItem}))(Ae);var Fe=t("i2xj"),Oe=t("IXwn"),Se=t("lM7y");const Ce={zIndex:5};class Re extends i.Component{constructor(e){super(e),this.getName=()=>{const{selectedItem:e,t:a}=this.props;if(!e)return"-";switch(e.AnimalKind){case D.a.SOW:return a("animalDocuments._sow")+" "+e.AnmNo1;case D.a.BOAR:return a("boar")+" "+e.AnmNo1;case D.a.PIGLET:return a("animalDocuments._piglet")+" "+e.AnmNo1;case D.a.RENOVATION_SOW:return a("animalDocuments.renovation_sow")+" "+e.AnmNo1;case D.a.PORKER:return a("animalDocuments._porker")+" "+e.AnmNo1;default:return e.GrNo1?"".concat(s()(r()(a("group")))," ").concat(e.GrNo1):"".concat(s()(r()(a("technologyGroup")))," ").concat(y()(e.StartTime).format("DD.MM.YY"))}},this.shouldShow=({scrollTop:e})=>!this.props.selectedItem&&e>100;const{dispatch:a}=this.props;a(Object(Se.b)())}render(){const{selectedItem:e,events:a,handleNext:t,handlePrev:n,handleHide:r,loadingDocuments:l,loadingTechno:s}=this.props,i=Object(d.a)(),c=e instanceof be.a&&s||l,p=t(!1),u=n(!1);return o.a.createElement(o.a.Fragment,null,o.a.createElement(m.a,{onHide:r,loading:!!c||!e,name:this.getName(),show:!!e,addPaddingForButtons:!0},o.a.createElement(Ae,{selectedItem:e,events:a,mobile:i})),o.a.createElement(Fe.a,{show:this.shouldShow}),o.a.createElement(A.b,null),o.a.createElement(Oe.a,{show:!!e&&!!t&&!!n,style:Ce,fixed:!0,renderInPortal:!0},o.a.createElement(F.a,{type:"button",onClick:()=>n(!0),buttonColor:"info",buttonStyle:"round",icon:o.a.createElement("i",{className:"fas fa-arrow-left"}),disabled:c||!u}),o.a.createElement(F.a,{type:"button",onClick:()=>t(!0),buttonColor:"info",buttonStyle:"round",icon:o.a.createElement("i",{className:"fas fa-arrow-right"}),disabled:c||!p})))}}Re=Object(c.connect)(e=>({selectedItem:e.animalDocuments.selectedItem,events:e.animalDocuments.events,loadingDocuments:e.animalDocuments.fetchingEvent,loadingTechno:e.technologyGroup.fetching}))(Re);a.a=Object(P.a)()(Re)},OgZR:function(e,a,t){},"PYU+":function(e,a,t){"use strict";t.d(a,"a",(function(){return o}));var n=t("q1tI"),r=t.n(n),l=t("17x9"),s=t.n(l),i=t("bXC2");class o extends r.a.Component{render(){const{cycle:{separations:e,sowCycle:a},isAdvanced:t,tooltipContent:n,cycleRenderClass:l}=this.props;let s=e[0],o=l&&l.split(" ")[1];if(!s)return r.a.createElement(r.a.Fragment,null,t&&r.a.createElement(i.a,{className:"print-display-none"}),r.a.createElement(i.a,{className:"print-display-none",comment:l&&n,type:o}),r.a.createElement(i.a,{className:"print-display-none"}),t&&r.a.createElement(i.a,{className:"normal-display-none"}),r.a.createElement(i.a,{className:"normal-display-none"}),r.a.createElement(i.a,{className:"normal-display-none"}));const c=e[0].operators;return r.a.createElement(r.a.Fragment,null,t&&r.a.createElement(i.a,{className:"print-display-none"},s.date),r.a.createElement(i.a,{className:"print-display-none",type:o,sowCycle:a,comment:l&&n,isAdvanced:t,operators:c},s.amount),r.a.createElement(i.a,{className:"print-display-none"},s.weight),t&&r.a.createElement(i.a,{className:"normal-display-none"},s.date),r.a.createElement(i.a,{className:"normal-display-none"},s.amount),r.a.createElement(i.a,{className:"normal-display-none"},s.weight))}}o.propTypes={cycle:s.a.shape({separations:s.a.array.isRequired}).isRequired}},"TLA/":function(e,a,t){"use strict";var n=t("q1tI"),r=t.n(n),l=t("wd/R"),s=t.n(l),i=(t("04kE"),t("LCzB"));class o extends n.Component{constructor(...e){super(...e),this.getPrefix=e=>{const a=e.length;let t=0;for(;t<4;t++)for(let n=0;n0?t:void 0):[],startFrom:t}}}render(){const{alarm:e,t:a}=this.props;if(!e)return null;const{_passThrough:{other:t},subtitle:n,title:l}=e,{prefix:i,startFrom:o}=this.getPrefix(t);return r.a.createElement("div",{className:"alarm-details-body"},r.a.createElement("p",{className:"font-weight-bold"},l),r.a.createElement("p",{className:"font-weight-bold"},0===n.length?a("missingLocation"):n.length>1?i.join(" - "):n[0].join(" - ")),r.a.createElement("div",{className:"table-responsive w-100"},r.a.createElement("table",{className:"w-100"},r.a.createElement("thead",null,r.a.createElement("tr",null,r.a.createElement("th",null,a("time")),n.length>1&&r.a.createElement("th",null,a("placement")),r.a.createElement("th",null,a("modals.alarmDetailsModal.description")))),r.a.createElement("tbody",null,t.map(e=>{const{timestamp:t,text:l,subtitle:i}=e;return r.a.createElement("tr",null,r.a.createElement("td",null,s()(t).format("DD.MM.YY HH:mm")),n.length>1&&r.a.createElement("td",null,i.map(e=>e.slice(o+1).join(" - ")).join("-")),r.a.createElement("td",null,a(l.key,l.params)))})))))}}a.a=Object(i.a)()(o)},TmX0:function(e,a,t){},W2wK:function(e,a,t){"use strict";t.d(a,"a",(function(){return p}));var n=t("Y+p1"),r=t.n(n),l=t("q1tI"),s=t.n(l),i=t("17x9"),o=t.n(i),c=t("bXC2"),m=t("pxzG"),d=t("eASP");class p extends s.a.Component{constructor(...e){super(...e),this.weightValueFormatter=e=>Object(m.j)(e,{unit:d.a.MEDIUM,showUnit:!0,fixed:1})}render(){const{cycle:{weightings:e,key:a},expanded:{rows:t},isAdvanced:n}=this.props;let l=t.find(e=>e===a),i=e[e.length-1];if(!i)return s.a.createElement(s.a.Fragment,null,n&&s.a.createElement(c.a,null),s.a.createElement(c.a,null));const o=e[0].operators;return s.a.createElement(s.a.Fragment,null,n&&s.a.createElement(c.a,{className:"print-display-none"},r()(a,l)?e.map((e,a)=>s.a.createElement("div",{key:a},e.date)):i.date),s.a.createElement(c.a,{className:"print-display-none",isAdvanced:n,operators:o},n&&r()(a,l)?e.map((e,a)=>s.a.createElement("div",{key:a},this.weightValueFormatter(e.weight))):this.weightValueFormatter(i.weight)),n&&s.a.createElement(c.a,{className:"normal-display-none"},e.map((e,a)=>s.a.createElement("div",{key:a},e.date))),s.a.createElement(c.a,{className:"normal-display-none"},n?e.map((e,a)=>s.a.createElement("div",{key:a},this.weightValueFormatter(e.weight))):this.weightValueFormatter(i.weight)))}}p.propTypes={cycle:o.a.shape({weightings:o.a.array.isRequired}).isRequired}},"WF/M":function(e,a,t){},bXC2:function(e,a,t){"use strict";t.d(a,"a",(function(){return i}));var n=t("q1tI"),r=t.n(n),l=t("CuyV"),s=t("BvFm");class i extends r.a.Component{constructor(...e){super(...e),this.getOperators=(e,a)=>Array.isArray(e)?a?[...new Set(e)].join("\n"):e[0]:""}render(){const{children:e,className:a,comment:t,operators:n,isAdvanced:i,type:o}=this.props,c=Object(s.i)()||Object(s.g)()||Object(s.h)()?this.getOperators(n,i):"";return r.a.createElement("div",{className:a?"cycle-grid-content "+a:"cycle-grid-content"},e,t&&r.a.createElement(l.a,{tooltipContent:t,type:o||"error"},r.a.createElement("div",{className:"box ".concat(o||"error")})),c&&r.a.createElement(l.a,{tooltipContent:c,type:o||"info"},r.a.createElement("div",{className:"box ".concat(o||"info")})))}}},jIxK:function(e,a,t){"use strict";t.d(a,"a",(function(){return E}));var n=t("a9jo"),r=t.n(n),l=t("Y+p1"),s=t.n(l),i=t("q1tI"),o=t.n(i),c=t("bXC2"),m=t("17x9"),d=t.n(m),p=t("pxzG"),u=t("eASP");class E extends o.a.Component{constructor(...e){super(...e),this.weightValueFormatter=e=>Object(p.j)(e,{unit:u.a.MEDIUM,showUnit:!0,fixed:1})}render(){const{cycle:{separationsMommy:e,key:a},expanded:{rows:t},isAdvanced:n,tooltipContent:l,cycleRenderClass:i}=this.props;let m=t.find(e=>e===a),d=e[0];if(!d)return o.a.createElement(o.a.Fragment,null,n&&o.a.createElement(c.a,{className:"print-display-none"}),o.a.createElement(c.a,{className:"print-display-none",comment:i&&l}),o.a.createElement(c.a,{className:"print-display-none"}),n&&o.a.createElement(c.a,{className:"normal-display-none"}),o.a.createElement(c.a,{className:"normal-display-none"}),o.a.createElement(c.a,{className:"normal-display-none"}));const p=e[0].operators;return o.a.createElement(o.a.Fragment,null,n&&o.a.createElement(c.a,{className:"print-display-none"},s()(a,m)?e.map((e,a)=>o.a.createElement("div",{key:a},e.date)):d.date),o.a.createElement(c.a,{className:"print-display-none",comment:i&&l,isAdvanced:n,operators:p},n&&s()(a,m)?o.a.createElement("div",null,e.map((e,a)=>o.a.createElement("div",{key:a},e.amount))):o.a.createElement("div",null,r()(e,"amount"))),o.a.createElement(c.a,{className:"print-display-none"},n&&s()(a,m)?e.map((e,a)=>o.a.createElement("div",{key:a},this.weightValueFormatter(e.weight))):this.weightValueFormatter(r()(e,"weight"))),n&&o.a.createElement(c.a,{className:"normal-display-none"},e.map((e,a)=>o.a.createElement("div",{key:a},e.date))),o.a.createElement(c.a,{className:"normal-display-none"},n?e.map((e,a)=>o.a.createElement("div",{key:a},e.amount)):r()(e,"amount")),o.a.createElement(c.a,{className:"normal-display-none"},n?e.map((e,a)=>o.a.createElement("div",{key:a},this.weightValueFormatter(e.weight))):this.weightValueFormatter(r()(e,"weight"))))}}E.propTypes={cycle:d.a.shape({separationsMommy:d.a.array.isRequired}).isRequired}},l9rj:function(e,a,t){"use strict";t.d(a,"a",(function(){return m}));var n=t("E+oP"),r=t.n(n),l=t("q1tI"),s=t.n(l),i=t("bXC2"),o=t("17x9"),c=t.n(o);class m extends s.a.Component{render(){const{cycle:{activeNipples:e},tooltipContent:a,cycleRenderClass:t}=this.props;let n=e[e.length-1],l=n&&n.nipples,o=[];return r()(e)||(o=e[0].operators),s.a.createElement(s.a.Fragment,null,s.a.createElement(i.a,{className:"print-display-none",comment:t&&a,isAdvanced:!1,operators:o},l),s.a.createElement(i.a,{className:"normal-display-none"},l))}}m.propTypes={cycle:c.a.shape({nipples:c.a.array.isRequired}).isRequired}},qWIT:function(e,a,t){"use strict";t.d(a,"a",(function(){return c}));var n=t("q1tI"),r=t.n(n),l=(t("OgZR"),t("17x9")),s=t.n(l),i=t("wd/R"),o=t.n(i);class c extends r.a.Component{render(){const{time:e}=this.props;let a=o()(e),t=a.seconds()%60*6,n=a.minutes()%60*6,l=a.hours()%12*30;return console.log(a),r.a.createElement("div",{className:"analog-clock"},r.a.createElement("div",{className:"analog-clock-container"},r.a.createElement("div",{className:"pointer hours",style:{transform:"rotateZ(".concat(l,"deg)")}}),r.a.createElement("div",{className:"pointer minutes",style:{transform:"rotateZ(".concat(n,"deg)")}}),r.a.createElement("div",{className:"pointer seconds",style:{transform:"rotateZ(".concat(t,"deg)")}})))}}c.propTypes={time:s.a.object}},vXTL:function(e,a,t){"use strict";var n=t("q1tI"),r=t.n(n),l=t("bXC2"),s=t("17x9"),i=t.n(s),o=t("/MKj");class c extends r.a.Component{render(){const{cycle:{noPregnancy:e},isAdvanced:a,noPregnancyReason:t,lang:n}=this.props,s=e[0];if(!s)return r.a.createElement(r.a.Fragment,null,a&&r.a.createElement(l.a,{className:"print-display-none"}),r.a.createElement(l.a,{className:"print-display-none last-cell"}));const i=t.WData[n].find(e=>e.ID===s.reason),o=e[0].operators;return r.a.createElement(r.a.Fragment,null,a&&r.a.createElement(l.a,{className:"print-display-none"},s.date),r.a.createElement(l.a,{className:"print-display-none last-cell",isAdvanced:a,operators:o},i&&i.Value))}}(c=Object(o.connect)(e=>({noPregnancyReason:e.dictionary.noPreganancy,lang:e.language.lang.lang}))(c)).propTypes={cycle:i.a.shape({noPregnancy:i.a.array.isRequired}).isRequired},a.a=c},w4rF:function(e,a,t){"use strict";t.d(a,"a",(function(){return i}));var n=t("q1tI"),r=t.n(n),l=t("17x9"),s=t.n(l);class i extends r.a.Component{render(){const{title:e,columns:a,className:t}=this.props;return r.a.createElement(r.a.Fragment,null,r.a.createElement("div",{className:a?"cycle-grid-header has-children ".concat(t):"cycle-grid-header ".concat(t),style:{gridColumn:a?"span ".concat(a.length):""}},e),a&&a.map((e,a)=>r.a.createElement("div",{className:"cycle-grid-header ".concat(t," ").concat(e.className),key:a,style:{gridRow:2}},e.name)))}}i.propTypes={title:s.a.string.isRequired,columns:s.a.arrayOf(s.a.string),className:s.a.string}},"wjq+":function(e,a,t){"use strict";t.d(a,"a",(function(){return p}));var n=t("a9jo"),r=t.n(n),l=t("Y+p1"),s=t.n(l),i=t("q1tI"),o=t.n(i),c=t("bXC2"),m=t("17x9"),d=t.n(m);class p extends o.a.Component{render(){const{cycle:{mommys:e,key:a},expanded:{rows:t},isAdvanced:n,tooltipContent:l,cycleRenderClass:i}=this.props;let m=t.find(e=>e===a),d=e[e.length-1];if(!d)return o.a.createElement(o.a.Fragment,null,n&&o.a.createElement(c.a,{className:"print-display-none"}),o.a.createElement(c.a,{className:"print-display-none",comment:i&&l}),n&&o.a.createElement(c.a,{className:"normal-display-none"}),o.a.createElement(c.a,{className:"normal-display-none"}));const p=e[0].operators;return o.a.createElement(o.a.Fragment,null,n&&o.a.createElement(c.a,{className:"print-display-none"},s()(a,m)?e.map((e,a)=>o.a.createElement("div",{key:a},e.date)):d.date),o.a.createElement(c.a,{className:"print-display-none",comment:i&&l,isAdvanced:n,operators:p},n&&s()(a,m)?o.a.createElement("div",null,e.map((e,a)=>o.a.createElement("div",{key:a},e.amount))):o.a.createElement("div",null,r()(e,"amount"))),n&&o.a.createElement(c.a,{className:"normal-display-none"},e.map((e,a)=>o.a.createElement("div",{key:a},e.date))),o.a.createElement(c.a,{className:"normal-display-none"},n?e.map((e,a)=>o.a.createElement("div",{key:a},e.amount)):r()(e,"amount")))}}p.propTypes={cycle:d.a.shape({mommys:d.a.array.isRequired}).isRequired}}}]); //# sourceMappingURL=main~10ee5a17.2c49b21e.chunk.js.map