import { Box } from "@mui/material";
import { makeStyles } from "@mui/styles";
import { useMobile } from "hooks";
import moment from "moment";
import { pond } from "protobuf-ts/pond";
import { useGlobalState } from "providers";
import React from "react";

const useStyles = makeStyles(() => ({
    st0: {
      fill: "#434343"
    },
    st1: {
      stroke: "#F6EB14",
      strokeWidth: 4,
      strokeMiterlimit: 10
    },
    st2: {
      fill: "#272727"
    },
    st3: {
      stroke: "#272727",
      strokeWidth: 6,
      strokeMiterlimit: 10
    },
    st4: {
      fill: "#FFFFFF"
    },
    vals: {
      fontSize: 8,
      strokeWidth: 0.7,
      filter: "drop-shadow(20px 20px 20px rgb(0 0 0))"
    },
    fanState: {
      fontSize: 5
    },
    fontBase: {
      fontWeight: 650,
      fill: "white"
    }
}));

interface Props {
  finalTemp: number;
  ambientTemp: number;
  innerTemps: { t1: number; t2: number };
  innerPressures: { p1: number; p2: number };
  ambientSelector: () => JSX.Element;
  tempChainSelector: () => JSX.Element;
  pressureChainSelector: () => JSX.Element;
  pcaState: pond.PCAState;
  // pcaFanState: boolean;
  checkInTime: string;
}

export default function GateSVG(props: Props) {
  const {
    finalTemp,
    ambientTemp,
    innerTemps,
    innerPressures,
    ambientSelector,
    tempChainSelector,
    pressureChainSelector,
    pcaState,
    // pcaFanState,
    checkInTime
  } = props;
  const classes = useStyles();
  const isMobile = useMobile();
  const [{ user }] = useGlobalState();

  //old plane that was back facing
  // const ghostPlane = () => {
  //   return (
  //     <path
  //       className={classes.st4}
  //       d="m 673.79,308.44 c -2.72,0.03 -5.44,0 -8.16,0.11 -1.99,0.08 -3.97,0.34 -5.96,0.52 -4.27,0.39 -8.54,0.8 -12.81,1.18 -0.82,0.07 -1.69,0.45 -2.45,-0.05 -2.81,-1.84 -6.09,-1.88 -9.23,-2.35 -1.09,-0.16 -2.19,-0.31 -3.28,-0.45 -0.01,0 -0.01,0 -0.01,0 -1.05,-0.31 -1.06,-1.62 -0.8,-2.85 4.31,-13.15 8.65,-26.3 12.98,-39.44 1.22,-3.71 2.43,-7.42 3.65,-11.13 0.04,-0.13 0.06,-0.27 0.09,-0.4 -0.2,0 -0.4,0 -0.6,0 -1.47,0.16 -2.93,0.35 -4.4,0.47 -2.94,0.26 -5.88,0.49 -8.83,0.72 -0.71,0.06 -1.22,0.38 -1.65,0.95 -3.24,4.31 -6.49,8.61 -9.76,12.9 -6.11,8 -12.19,16.01 -18.37,23.96 -1.64,2.11 -3.41,4.15 -5.37,5.94 -3.16,2.9 -7.2,3.85 -11.33,4.33 -1.32,0.15 -2.66,0.13 -3.99,0.09 0,0 0,0 0,0 l -109.33,-2.3 c -1,0.02 -1.99,0.11 -2.98,0.24 -2.35,0.39 -5.64,1.42 -7.98,4.08 -0.82,0.99 -1.45,2.08 -1.96,3.23 0,0.01 -0.01,0.01 -0.01,0.02 0,0 0,0 0,0 -0.34,0.78 -0.63,1.58 -0.9,2.39 -0.17,0.51 -0.15,1.09 -0.12,1.64 0.02,0.44 -0.1,0.64 -0.55,0.62 -0.2,-0.01 -0.4,0 -0.6,0 -5.4,0.01 -10.8,0.02 -16.2,0.04 -0.73,0 -1.43,0.13 -1.97,0.69 0,0.08 0,0.16 0,0.24 0.42,0.54 1.05,0.65 1.66,0.7 1.85,0.16 3.7,0.28 5.55,0.4 2.47,0.16 4.93,0.3 7.4,0.44 1.89,0.1 3.78,0.2 5.68,0.28 0.76,0.03 1.46,0.16 2.15,0.57 1.67,0.97 3.51,1.5 5.38,1.93 0.19,0.04 0.37,0.1 0.55,0.23 -0.17,0.02 -0.33,0.04 -0.56,0.07 0.15,0.71 0.16,1.48 0.81,1.87 0.4,0.24 0.98,0.42 1.59,-0.23 0.19,1.2 0.36,2.23 0.52,3.24 -0.2,0.06 -0.24,0.09 -0.27,0.08 -1.57,-0.47 -2.39,0.36 -2.11,2.16 0.09,0.58 0.29,1.14 0.95,1.34 0.63,0.18 1.11,-0.04 1.62,-0.71 0.03,-0.04 0.09,-0.07 0.14,-0.1 1.13,1.12 1.87,0.94 2.7,-0.68 0.07,0.13 0.14,0.21 0.17,0.31 0.69,2.22 2.3,3.51 4.42,4.19 2.92,0.93 5.89,1.04 8.93,0.58 2.06,-0.31 3.95,-1.08 5.87,-1.78 1.46,-0.54 2.14,-1.78 2.29,-3.25 0.15,-1.48 -0.31,-2.76 -1.65,-3.6 -0.41,-0.26 -0.82,-0.53 -1.2,-0.92 0,0 2.58,0.51 5.49,1.08 l 4.64,0.91 c 2.01,0.39 3.51,0.69 3.54,0.69 0.51,0.2 0.9,0.51 1.23,1.01 0.52,0.8 1.18,1.51 1.7,2.32 0.33,0.51 0.74,0.72 1.3,0.79 0.49,0.05 0.78,0.59 0.65,1.07 -0.06,0.22 -0.05,0.46 -0.08,0.77 -0.51,0.25 -1.14,0.57 -1.79,0.87 -0.13,0.06 -0.3,0.09 -0.44,0.06 -1.71,-0.36 -2.75,0.3 -3.01,1.99 -0.16,1.04 -0.02,2.04 0.67,2.88 0.78,0.95 2.36,0.95 3.18,0.04 0.1,-0.12 0.2,-0.24 0.39,-0.45 0.36,0.91 0.89,1.58 1.84,1.77 0.16,0 0.32,0 0.48,0 1.22,-0.15 1.89,-0.9 2.14,-2.16 0.32,0.44 0.52,0.79 0.78,1.07 0.86,0.91 2.48,0.78 3.22,-0.22 0.81,-1.11 0.72,-3.17 -0.19,-4.2 -0.87,-0.99 -2.48,-0.96 -3.31,0.08 -0.08,0.1 -0.17,0.21 -0.2,0.25 -0.6,-0.6 -1.19,-1.19 -1.81,-1.82 0.11,-0.05 0.26,-0.1 0.4,-0.19 0.14,-0.09 0.36,-0.2 0.38,-0.33 0.02,-0.12 -0.16,-0.35 -0.29,-0.39 -0.53,-0.13 -0.52,-0.51 -0.51,-0.92 0.02,-0.6 0.07,-1.21 -0.01,-1.8 -0.1,-0.66 0.22,-1.07 0.64,-1.44 0.09,-0.08 0.29,-0.07 0.44,-0.05 0,0 0.09,0.01 0.24,0.02 2.26,0.21 4.52,0.44 6.78,0.64 1.05,0.09 2.11,0.17 3.16,0.24 4.79,0.4 10.9,0.89 17.54,1.37 -0.03,0.08 -0.07,0.14 -0.13,0.17 -0.59,0.34 -1.3,0.82 -1.89,0.74 -2.29,-0.32 -2.94,1.52 -2.75,2.99 0.05,0.37 0.17,0.74 0.34,1.08 0.76,1.5 2.67,1.61 3.62,0.22 0.08,-0.11 0.16,-0.23 0.29,-0.42 0.42,0.93 0.87,1.8 1.98,1.89 1.03,0.08 1.81,-0.35 2.18,-1.13 0.68,0.27 1.25,0.64 1.85,0.7 1.15,0.12 1.87,-0.49 2.18,-1.62 0.24,-0.87 0.14,-1.7 -0.29,-2.49 -0.78,-1.44 -2.67,-1.54 -3.62,-0.21 -0.08,0.11 -0.16,0.22 -0.23,0.31 -0.49,-0.53 -0.98,-1.03 -1.44,-1.57 -0.16,-0.19 -0.14,-0.39 0.12,-0.5 2.47,0.17 5,0.34 7.54,0.5 l 9.41,0.54 c 14,0.72 27.11,0.98 32.66,-0.1 -0.03,-0.01 -0.06,-0.01 -0.1,-0.02 0.48,-0.05 0.97,-0.08 1.45,-0.14 4.05,-0.49 8.1,-1.03 12.12,-1.76 6.55,-1.19 13.08,-2.52 19.61,-3.87 4.77,-0.98 9.51,-2.1 14.03,-3.95 0.9,-0.37 1.68,-0.82 2.34,-1.59 0.49,-0.57 1.23,-0.94 1.91,-1.31 0.82,-0.45 1.24,-1.1 1.28,-2.01 0.02,-0.41 0.19,-0.54 0.57,-0.59 6.76,-1.06 13.51,-2.14 20.26,-3.21 1.98,-0.31 3.97,-0.62 6.13,-0.96 -0.2,-0.11 -0.26,-0.15 -0.32,-0.15 z m -203.02,11.33 c -0.28,-0.48 -0.52,-0.9 -0.78,-1.36 0.75,0.04 1.04,0.48 0.78,1.36 z m 0.54,-0.17 c -0.15,-0.29 -0.29,-0.58 -0.45,-0.89 0.7,-0.19 0.78,-0.06 0.45,0.89 z m 3.22,4.1 c -0.47,-0.25 -0.9,-0.45 -1.3,-0.69 -0.13,-0.08 -0.18,-0.29 -0.28,-0.43 -0.07,-0.1 -0.16,-0.18 -0.35,-0.17 0.09,0.18 0.19,0.37 0.31,0.61 -0.22,0.09 -0.41,0.17 -0.75,0.3 0.07,-0.47 0.13,-0.8 0.18,-1.14 0.01,-0.07 0.06,-0.16 0.03,-0.2 -0.35,-0.48 0.08,-0.42 0.27,-0.42 -0.03,-0.42 -0.06,-0.78 -0.08,-1.17 0.14,-0.03 0.24,-0.09 0.32,-0.07 0.63,0.19 1,-0.09 1.18,-0.67 0.11,-0.35 0.28,-0.47 0.66,-0.32 0.38,0.15 0.8,0.21 1.29,0.33 -0.96,1.23 -1.41,2.61 -1.48,4.04 z m 36.95,7.44 c -0.23,-0.18 -0.41,-0.32 -0.69,-0.54 0.48,-0.13 0.84,-0.23 1.2,-0.33 0.03,0.03 0.06,0.07 0.09,0.1 -0.19,0.24 -0.37,0.47 -0.6,0.77 z"
  //       id="path216"
  //     />
  //   );
  // };

  //add svg's of other types of planes
  const frontFacingPlaneWindowed = () => {
    return (
      <path
        className={classes.st4}
        id="path216"
        d="m 655.34988,314.0221 c 0.85065,-0.58033 1.26508,-0.95264 1.61405,-1.56583 0.34899,-0.61318 0.63252,-1.4782 0.6107,-2.23373 -0.0215,-0.74461 -0.33808,-1.41253 -1.03602,-2.28853 -0.68705,-0.88692 -1.734,-1.96 -2.96632,-2.78122 -1.2214,-0.82125 -2.65002,-1.41253 -4.08955,-1.99289 h -0.0328 c 0,0 -0.0328,-0.0547 -0.0328,-0.0547 -1.57036,-1.86146 -3.14076,-3.70105 -4.67845,-4.99313 -1.53767,-1.29205 -3.03176,-2.04759 -4.95113,-2.74838 -1.91936,-0.71174 -4.26404,-1.35779 -6.53241,-1.80672 -2.26835,-0.44893 -4.48217,-0.6789 -6.69596,-0.90884 h -0.0872 c 0,0 -0.0544,-0.0877 -0.0544,-0.0877 -0.51257,-0.84312 -1.02514,-1.68627 -1.33049,-2.15711 -0.15269,-0.24101 -0.25093,-0.37228 -0.31627,-0.44893 -0.0654,-0.0767 -0.0872,-0.0877 -0.14168,-0.0987 -0.0761,-0.0225 -0.23992,0 -0.39257,0 l 0.63251,2.58412 -41.55008,-0.85408 -2.26833,-3.66817 c -0.50167,-0.33946 -1.01425,-0.65701 -1.40683,-0.7884 -0.31625,-0.10936 -0.59979,-0.0656 -0.88335,-0.033 l 1.36318,4.64272 h -0.25091 c -6.56517,-0.17534 -13.13029,-0.33945 -16.44556,-0.42706 -1.65764,-0.0437 -2.49736,-0.0656 -2.94449,-0.0767 -0.22888,0 -0.35991,-0.0225 -0.44715,-0.033 -0.0871,0 -0.14167,-0.033 -0.18543,-0.0547 -0.1527,-0.0657 -0.37079,-0.17534 -0.50166,-0.24102 -0.0654,-0.033 -0.0762,-0.0437 -0.15271,-0.0547 -0.0761,0 -0.20715,-0.0225 -0.44715,-0.033 -0.47981,-0.0226 -1.38499,-0.0547 -1.86484,-0.0656 -0.23991,0 -0.37078,0 -0.44711,0 -0.0765,0 -0.0871,0 -0.15268,0.033 -0.11996,0.0547 -0.33805,0.17534 -0.45805,0.24101 -0.0544,0.0327 -0.14167,0.0877 -0.28335,0.10937 -0.13097,0.0226 -0.32719,0.033 -0.68704,0.033 -0.7198,0 -2.1157,0 -3.30441,-0.033 -1.1778,-0.0225 -2.1484,-0.033 -2.73727,-0.0877 -0.5998,-0.0547 -0.83976,-0.16435 -0.95972,-0.23003 -0.0654,-0.033 -0.0761,-0.0437 -0.15268,-0.0547 -0.0761,-0.0113 -0.21819,-0.0225 -0.47986,-0.033 -0.52345,-0.0113 -1.53766,-0.0226 -2.09385,-0.0226 -0.27265,0 -0.42531,0 -0.52344,0 -0.0872,0 -0.0982,0.0113 -0.13099,0.0226 -0.0654,0.0226 -0.17443,0.0767 -0.28367,0.13136 -0.0328,0.0112 -0.0761,0.033 -0.13097,0.0437 -0.0544,0 -0.11996,0.0113 -0.21819,0.0113 -0.20716,0 -0.55616,0 -1.23233,-0.0113 -1.34138,-0.033 -3.9478,-0.0987 -6.54331,-0.17533 h -0.0982 l -1.74487,-2.49655 h -0.54529 c 0,0 0.93788,2.60606 0.93788,2.60606 h -0.26163 c -7.65569,-0.19704 -15.31136,-0.37228 -21.02587,-0.39419 -5.71449,-0.0225 -9.49872,0.12037 -12.31233,0.0226 -2.81363,-0.0987 -4.65667,-0.44895 -6.47789,-1.2045 -1.82123,-0.7555 -3.62066,-1.91621 -4.8857,-3.08783 -1.26502,-1.17163 -1.97388,-2.36516 -2.36646,-3.00025 -0.19616,-0.31755 -0.3054,-0.49273 -0.37079,-0.59128 -0.0654,-0.0987 -0.0873,-0.0987 -0.0982,-0.10938 -0.0328,-0.0112 -0.10893,-0.0225 -0.21819,-0.033 -0.0123,0 -0.0872,-0.0226 -0.11996,-0.0437 -0.0328,-0.0226 -0.0654,-0.0547 -0.0982,-0.0987 -0.0654,-0.0767 -0.17443,-0.20803 -0.35991,-0.4818 -0.39257,-0.53654 -1.13415,-1.60962 -2.6282,-3.73387 -2.97722,-4.25947 -8.89895,-12.75653 -11.9852,-17.16928 -3.08625,-4.41279 -3.32621,-4.7194 -3.43523,-4.94934 -0.0545,-0.12036 -0.0654,-0.25172 0,-0.35038 0.0122,-0.0112 0.0215,0 0.0328,-0.0225 -0.0982,-0.23003 -0.18542,-0.45991 -0.38171,-0.70081 -0.11995,-0.14235 -0.25092,-0.2737 -0.58886,-0.40512 -0.33809,-0.14235 -0.88336,-0.2737 -1.79944,-0.38325 -1.77759,-0.23001 -4.99472,-0.36135 -8.20094,-0.5037 v 0 c 1.48316,7.78531 2.96627,15.58157 4.17682,21.8558 1.23232,6.35088 2.20291,11.16879 3.17348,15.99767 l 0.0438,0.20803 h -0.20717 c -1.43955,0.0987 -2.85727,0.17533 -4.51489,0.40512 -1.64671,0.23002 -3.52248,0.61319 -4.79842,0.98548 -1.26504,0.37232 -1.9303,0.7227 -2.61735,1.09499 l -0.0544,0.033 h -0.0654 c -1.84302,-0.3285 -3.66426,-0.65698 -5.61634,-0.89788 -1.94121,-0.24102 -3.9914,-0.40517 -5.99804,-0.43801 -1.34139,-0.0225 -2.65006,0.0547 -3.9587,0.10938 l 15.51855,2.46371 -0.0328,0.18605 c -0.0982,0.48179 -0.20716,0.97452 -0.21817,1.24827 0,0.0656 -0.0123,0.0547 0.0122,0.0877 0.0215,0.033 0.11995,0.12036 0.33807,0.23002 0.43621,0.23001 1.31957,0.60224 3.07535,1.28112 3.48977,1.36872 10.42569,3.98571 13.94818,5.234 1.76668,0.62414 2.68275,0.90885 3.1626,1.01834 0.23992,0.0547 0.35989,0.0547 0.41442,0.0547 0.0544,0 0.0215,0 0.0544,-0.0226 l 0.0761,-0.0767 0.0982,0.033 c 8.81164,2.68267 17.6124,5.35445 24.86457,7.20496 7.25217,1.8505 12.94487,2.89076 17.53609,3.43823 4.60215,0.55844 8.10283,0.63509 11.55989,0.68983 3.45704,0.0547 6.84867,0.0656 10.24029,0.0877 h 0.26162 l -1.0469,2.9017 c 0.25092,-0.13137 0.51253,-0.21903 0.74155,-0.49274 0.37078,-0.42706 0.73067,-1.14973 1.09054,-1.87242 l 0.0544,-0.12037 5.15833,0.68983 v 0.36135 c 0,0 0.1527,-0.0112 0.1527,-0.0112 l -0.17441,3.59155 -0.18546,-0.0225 c -0.37078,-0.033 -0.70886,-0.0656 -1.11237,0.0327 -0.4144,0.10937 -0.91607,0.36135 -1.34135,0.7008 -0.42533,0.33944 -0.7743,0.76647 -1.03606,1.4125 -0.26164,0.64605 -0.42528,1.48917 -0.26164,2.25568 0.16372,0.76648 0.66523,1.50011 0.95971,1.90526 0.15271,0.20803 0.21818,0.29564 0.32715,0.35038 0.10893,0.0547 0.29439,0.0877 0.65434,0.10937 0.71977,0.0547 2.11568,0.0767 3.16259,0.0767 1.04696,0 1.75582,-0.033 2.3447,-0.15334 0.5889,-0.12037 1.06872,-0.33945 1.3959,-0.63509 0.32716,-0.29564 0.52346,-0.65697 0.63253,-1.28111 0.10893,-0.62415 0.10893,-1.48918 0,-2.1133 -0.10893,-0.62416 -0.30539,-1.01834 -0.65434,-1.42351 -0.34896,-0.40512 -0.85064,-0.81027 -1.30866,-1.00736 -0.45806,-0.19704 -0.92696,-0.21903 -1.4286,-0.23002 h -0.15271 l -0.14168,-0.78841 h 0.53439 c 0.0215,-0.13136 0.0435,-0.26271 0.0872,-0.40512 0.0654,-0.20804 0.16371,-0.4161 0.26164,-0.62415 l 0.34897,0.0767 v 0.10937 h 0.0123 l 0.92697,-1.01835 1.75579,0.84316 v 0.10937 c 0.0122,0.18604 0.0215,0.32851 0.11995,0.49273 0.0982,0.16435 0.31626,0.38325 0.54528,0.60226 l 0.97056,0.0766 h 0.0328 c 0.31627,0.17506 0.63253,0.32851 0.91607,0.4161 0.28339,0.0877 0.56707,0.13135 0.86154,0.16433 h 0.14169 c 0,0 0.0215,0.15335 0.0215,0.15335 0.0438,0.27371 0.0761,0.5256 0.23991,0.86505 0.1634,0.33942 0.45802,0.78838 0.76337,1.23731 l 0.19644,0.30661 -1.42862,-0.033 c 1.28685,0.39418 2.66095,0.82125 3.34802,1.02928 0.94877,0.28471 0.98148,0.28471 1.91935,0.32851 0.92697,0.0437 2.7264,0.13136 4.51492,0.21902 h 0.15267 c 0,0 0.0123,0.16434 0.0123,0.16434 0.0215,0.31755 0.0438,0.61319 0.15269,0.89787 0.10893,0.29564 0.31626,0.59131 0.58888,0.86505 0.26163,0.25172 0.61074,0.48176 0.9597,0.70076 1.67944,0.0547 3.3589,0.10937 4.36222,0.13137 1.0142,0.0327 1.30867,0.0327 1.614,-0.033 0.29439,-0.0656 0.59982,-0.20803 0.87247,-0.47084 0.27265,-0.25172 0.52344,-0.63508 0.67611,-0.97453 0.15271,-0.33945 0.20717,-0.64602 0.19646,-0.78838 0,-0.15334 -0.0328,-0.15334 -0.11995,-0.23002 l -0.31625,-0.28469 0.42532,-0.0327 c 0.54527,-0.0437 1.10144,-0.0877 1.58128,-0.16433 0.47985,-0.0767 0.89425,-0.18605 1.385,-0.42706 0.49076,-0.24073 1.04692,-0.6132 1.48316,-1.19351 0.43621,-0.58035 0.77428,-1.37969 1.03601,-2.26662 0.25094,-0.88692 0.42533,-1.86145 0.59981,-2.836 l 0.0328,-0.15334 2.9554,0.10937 v 0.19703 c 0,0 2.93361,1.18258 2.93361,1.18258 l 0.0215,0.0877 c 0.0544,0.19703 0.10891,0.37229 0.21819,0.55844 0.10891,0.18604 0.26163,0.36135 0.51255,0.53655 0.25094,0.16433 0.62162,0.31753 1.04694,0.42702 0.42529,0.10966 0.92697,0.18604 1.2214,0.24101 0.1417,0.033 0.25094,0.0547 0.34899,0.13136 0.0982,0.0767 0.15267,0.17506 0.19614,0.29564 0.0872,0.23002 0.18544,0.59128 0.34898,0.89786 0.16371,0.30661 0.40352,0.59131 0.65434,0.88696 l 0.26163,0.30658 h -0.39259 c -0.32717,0 -0.62162,0 -0.85063,0.0225 0.20717,0.10938 0.47985,0.23002 0.88336,0.38326 0.53435,0.19704 1.13415,0.38326 1.5704,0.52558 0.88332,0.27372 1.10143,0.32851 3.44612,0.38325 2.3447,0.0656 6.78326,0.13136 9.60779,0.14236 2.82453,0.0112 4.03503,-0.0226 4.97292,-0.25172 0.93786,-0.23003 1.60312,-0.62416 2.13747,-1.3359 0.53438,-0.71173 0.92699,-1.76291 1.15601,-2.71554 0.22889,-0.95264 0.30538,-1.80672 0.37078,-2.67178 v -0.17504 c 0,0 11.51621,0.0987 11.51621,0.0987 l -0.0328,1.75198 h 0.21817 l -0.0328,0.68984 0.53436,0.12036 0.0328,0.90883 0.90515,-0.0987 -0.0328,0.241 c -0.0438,0.27372 -0.0765,0.52561 -0.0328,0.73364 0.0438,0.20804 0.17441,0.41609 0.32715,0.64606 l 0.17441,0.28467 h -0.70883 c 0,0 0,0 0,0.0113 -0.0122,0.0987 0,0.37228 0,0.61319 l 0.88332,-0.0987 -0.11995,0.6351 h -0.16341 c -0.18544,-0.0225 -0.3599,-0.0113 -0.4035,0 -0.0215,0 -0.0215,0 -0.0122,0 0,0 0,0 0,0.0327 0,0.033 0,0.0547 0.0215,0.0767 0.0215,0.0226 0.0544,0.0437 0.14168,0.0656 0.18543,0.033 0.64341,-0.0225 1.09054,-0.0767 l 0.0982,0.35039 c -0.33805,0.13136 -0.65435,0.26272 -0.99239,0.4818 -0.34896,0.21903 -0.68705,0.49273 -0.91606,1.02927 -0.22891,0.52558 -0.3272,1.33589 -0.15271,1.8943 0.17442,0.55844 0.64344,0.9417 0.94881,1.17164 0.30539,0.23002 0.35986,0.252 0.85062,0.3066 0.49074,0.0547 1.3741,0.0987 2.05026,0 0.67612,-0.10965 1.15595,-0.36134 1.48313,-0.73364 0.32717,-0.37228 0.50165,-0.87599 0.46895,-1.52201 -0.0328,-0.64605 -0.30541,-1.43443 -0.7634,-1.83958 -0.45803,-0.40513 -1.18868,-0.49274 -1.95209,-0.58032 l -0.17442,-0.0226 0.26163,-3.48206 2.53008,-3.64628 h 0.0872 c 4.83115,-0.33945 9.66232,-0.67889 13.34837,-1.07308 3.68607,-0.39419 6.22707,-0.85408 8.12462,-1.4563 1.89756,-0.60225 3.14078,-1.35779 3.99142,-1.93813 z M 504.13383,299.51364 c -0.0215,0.24101 -0.20715,0.42702 -0.40353,0.42702 h -0.43621 c -0.19616,0 -0.32716,-0.19704 -0.3054,-0.42702 l 0.11996,-1.11689 c 0.0215,-0.24102 0.20717,-0.42704 0.4035,-0.42704 h 0.43621 c 0.19615,0 0.32714,0.19704 0.3054,0.42704 z m 2.84634,0.0656 c -0.0215,0.24101 -0.20716,0.42706 -0.40351,0.42706 h -0.4362 c -0.19616,0 -0.32718,-0.19704 -0.30541,-0.42706 l 0.11996,-1.11686 c 0.0215,-0.24101 0.20718,-0.42707 0.40349,-0.42707 h 0.43624 c 0.19644,0 0.32717,0.19705 0.30538,0.42707 z m 2.81363,-0.033 c -0.0215,0.24101 -0.20717,0.42706 -0.4035,0.42706 h -0.43622 c -0.19616,0 -0.32718,-0.19704 -0.30541,-0.42706 l 0.11996,-1.11689 c 0.0215,-0.24072 0.20718,-0.42703 0.4035,-0.42703 h 0.43626 c 0.19615,0 0.32714,0.19705 0.30537,0.42703 z m 2.84632,0.0877 c -0.0215,0.24101 -0.20715,0.42703 -0.40349,0.42703 h -0.43623 
        c -0.19645,0 -0.32715,-0.19704 -0.30539,-0.42703 l 0.11996,-1.11689 c 0.0215,-0.24101 0.20717,-0.42703 0.4035,-0.42703 h 0.43622 c 0.19615,0 0.32714,0.19704 0.30539,0.42703 z m 2.79185,0.033 c -0.0215,0.24101 -0.20717,0.42706 -0.40351,0.42706 h -0.43621 c -0.19615,0 -0.32719,-0.19704 -0.30541,-0.42706 l 0.11997,-1.11689 c 0.0215,-0.24073 0.20716,-0.42704 0.40351,-0.42704 h 0.4362 c 0.19616,0 0.32718,0.19705 0.3054,0.42704 z m 2.84633,0.12036 c -0.0215,0.24101 -0.20718,0.42703 -0.40352,0.42703 h -0.43621 c -0.19646,0 -0.32719,-0.19704 -0.3054,-0.42703 l 0.11996,-1.11689 c 0.0215,-0.24101 0.20717,-0.42702 0.40349,-0.42702 h 0.43626 c 0.19615,0 0.32715,0.19704 0.30539,0.42702 z m 2.81362,-0.033 c -0.0215,0.241 -0.20718,0.42702 -0.40351,0.42702 h -0.43622 c -0.19615,0 -0.32716,-0.19704 -0.3054,-0.42702 l 0.11995,-1.11689 c 0.0215,-0.24101 0.20718,-0.42706 0.40351,-0.42706 h 0.43621 c 0.19616,0 0.32717,0.19704 0.30541,0.42706 z m 2.7373,0.0656 c -0.0215,0.24101 -0.20718,0.42706 -0.4035,0.42706 h -0.43622 c -0.19616,0 -0.32718,-0.19704 -0.3054,-0.42706 l 0.11994,-1.11686 c 0.0215,-0.24101 0.20718,-0.42706 0.40352,-0.42706 h 0.43621 c 0.19647,0 0.32719,0.19704 0.3054,0.42706 z m 2.82452,0.0656 c -0.0215,0.24101 -0.19616,0.42703 -0.39258,0.42703 h -0.43627 c -0.19614,0 -0.33803,-0.19704 -0.31624,-0.42703 l 0.0982,-1.11689 c 0.0215,-0.24101 0.19615,-0.42702 0.39263,-0.42702 h 0.4362 c 0.19615,0 0.33808,0.19704 0.31626,0.42702 l -0.0872,1.11689 z m 3.06445,0.0877 c -0.0215,0.24073 -0.19616,0.42703 -0.39258,0.42703 h -0.43623 c -0.19616,0 -0.33805,-0.19704 -0.31627,-0.42703 l 0.0872,-1.11689 c 0.0215,-0.24101 0.19615,-0.42706 0.39261,-0.42706 h 0.43621 c 0.19615,0 0.33808,0.19704 0.31626,0.42706 l -0.0982,1.11689 z m 2.81365,0.0656 c -0.0215,0.24101 -0.20718,0.42706 -0.41444,0.42706 h -0.45802 c -0.20716,0 -0.34897,-0.19704 -0.33807,-0.42706 l 0.0982,-1.11685 c 0.0215,-0.24101 0.20716,-0.42706 0.40351,-0.42706 h 0.45801 c 0.20718,0 0.34899,0.19704 0.33808,0.42706 l -0.0982,1.11685 z m 2.68273,0 c -0.0215,0.24101 -0.20716,0.42706 -0.40349,0.42706 h -0.43623 c -0.19613,0 -0.32717,-0.19704 -0.30537,-0.42706 l 0.11995,-1.11685 c 0.0215,-0.24101 0.20716,-0.42706 0.40349,-0.42706 h 0.43624 c 0.19647,0 0.32716,0.19704 0.30541,0.42706 z m 3.03175,0.0877 c -0.0215,0.24101 -0.20717,0.42703 -0.40351,0.42703 h -0.4362 c -0.19647,0 -0.3272,-0.19704 -0.30541,-0.42703 l 0.11997,-1.11689 c 0.0215,-0.24101 0.20716,-0.42702 0.4035,-0.42702 h 0.43622 c 0.19613,0 0.32718,0.19704 0.30539,0.42702 z m 2.82456,0.0656 c -0.0215,0.24101 -0.19616,0.42703 -0.39263,0.42703 h -0.4362 c -0.19616,0 -0.33808,-0.19704 -0.31626,-0.42703 l 0.0982,-1.11688 c 0.0215,-0.24101 0.19615,-0.42706 0.39261,-0.42706 h 0.4362 c 0.19615,0 0.33809,0.19704 0.31626,0.42706 z m 3.06442,0.0877 c -0.0215,0.24102 -0.19615,0.42706 -0.39259,0.42706 h -0.4362 c -0.19647,0 -0.33808,-0.19703 -0.31627,-0.42706 l 0.0982,-1.11688 c 0.0215,-0.24102 0.19615,-0.42702 0.39259,-0.42702 h 0.43622 c 0.19616,0 0.33809,0.19703 0.31626,0.42702 z m 2.81365,0.0656 c -0.0215,0.24101 -0.20717,0.42702 -0.40351,0.42702 h -0.45802 c -0.20717,0 -0.34901,-0.19704 -0.33809,-0.42702 l 0.0982,-1.11689 c 0.0215,-0.24101 0.20717,-0.42703 0.4035,-0.42703 h 0.45803 c 0.20717,0 0.34897,0.19704 0.33808,0.42703 z m 2.7482,0.0437 c -0.0215,0.24102 -0.20717,0.42703 -0.40354,0.42703 h -0.43622 c -0.19615,0 -0.32716,-0.19703 -0.30539,-0.42703 l 0.11995,-1.11687 c 0.0215,-0.24102 0.20716,-0.42706 0.40351,-0.42706 h 0.4362 c 0.19647,0 0.32716,0.19703 0.30541,0.42706 z m 3.03171,0.0877 c -0.0215,0.24101 -0.20718,0.42706 -0.40351,0.42706 h -0.43621 c -0.19646,0 -0.32716,-0.19704 -0.3054,-0.42706 l 0.11995,-1.11686 c 0.0215,-0.241 0.20718,-0.42705 0.40352,-0.42705 h 0.4362 c 0.19616,0 0.32715,0.19704 0.30539,0.42705 z m 2.82455,0.0656 c -0.0215,0.24101 -0.19616,0.42702 -0.39262,0.42702 h -0.4362 c -0.19616,0 -0.3381,-0.19704 -0.31628,-0.42702 l 0.0982,-1.11689 c 0.0215,-0.24101 0.19615,-0.42703 0.39259,-0.42703 h 0.43624 c 0.19614,0 0.33807,0.19704 0.31625,0.42703 z m 3.06445,0.0877 c -0.0215,0.24101 -0.19646,0.42706 -0.39261,0.42706 h -0.43621 c -0.19646,0 -0.33808,-0.19704 -0.31626,-0.42706 l 0.0982,-1.11685 c 0.0215,-0.24102 0.19616,-0.42706 0.39262,-0.42706 h 0.42532 c 0.19615,0 0.33807,0.19704 0.31626,0.42706 z m 2.81362,0.0656 c -0.0215,0.24101 -0.20717,0.42705 -0.4144,0.42705 h -0.45802 c -0.20717,0 -0.34901,-0.19704 -0.33809,-0.42705 l 0.0982,-1.11689 c 0.0215,-0.24073 0.20718,-0.42703 0.40351,-0.42703 h 0.45802 c 0.20717,0 0.34897,0.19704 0.33807,0.42703 l -0.0982,1.11689 z m 3.42436,0.0657 c -0.0215,0.24101 -0.20718,0.42703 -0.41445,0.42703 h -0.45802 c -0.20718,0 -0.34898,-0.19704 -0.33808,-0.42703 l 0.0982,-1.11689 c 0.0215,-0.24101 0.20717,-0.42702 0.4144,-0.42702 h 0.45803 c 0.20718,0 0.34898,0.19704 0.33807,0.42702 z m 4.73297,0.0877 c -0.0215,0.24101 -0.20715,0.42706 -0.40348,0.42706 h -0.45805 c -0.20715,0 -0.349,-0.19704 -0.33807,-0.42706 l 0.0982,-1.11686 c 0.0215,-0.24102 0.20716,-0.42706 0.40351,-0.42706 h 0.45802 c 0.20717,0 0.34901,0.19704 0.33808,0.42706 z m 4.41676,0.18604 c -0.0215,0.24102 -0.20718,0.42705 -0.40351,0.42705 h -0.45803 c -0.20717,0 -0.34896,-0.19704 -0.33808,-0.42705 l 0.0982,-1.11688 c 0.0215,-0.24102 0.20717,-0.42704 0.40351,-0.42704 h 0.45802 c 0.20718,0 0.34901,0.19704 0.3381,0.42704 z m 2.87903,0.0437 c -0.0215,0.24101 -0.20716,0.42702 -0.40351,0.42702 h -0.45802 c -0.20717,0 -0.34897,-0.19704 -0.33808,-0.42702 l 0.0982,-1.11689 c 0.0215,-0.24101 0.20717,-0.42703 0.40351,-0.42703 h 0.45802 c 0.20717,0 0.34898,0.19704 0.33809,0.42703 z m 2.96633,0.10937 c -0.0215,0.24101 -0.20717,0.42705 -0.41443,0.42705 h -0.45804 c -0.20716,0 -0.34897,-0.19704 -0.33805,-0.42705 l 0.0982,-1.11686 c 0.0215,-0.24102 0.20717,-0.42706 0.40351,-0.42706 h 0.45803 c 0.20717,0 0.34898,0.19704 0.33809,0.42706 l -0.0982,1.11686 z m 3.02082,0.033 c -0.0215,0.24101 -0.20718,0.42703 -0.40351,0.42703 h -0.45803 c -0.20716,0 -0.34898,-0.19704 -0.33808,-0.42703 l 0.0982,-1.11688 c 0.0215,-0.24101 0.20717,-0.42703 0.4035,-0.42703 h 0.45804 c 0.20716,0 0.34897,0.19704 0.33807,0.42703 z m 2.87908,0.0437 c -0.0215,0.24102 -0.20717,0.42706 -0.40351,0.42706 h -0.45803 c -0.20716,0 -0.3599,-0.19704 -0.33807,-0.42706 l 0.0982,-1.11685 c 0.0215,-0.24101 0.20716,-0.42706 0.41443,-0.42706 h 0.45803 c 0.20717,0 0.34896,0.19704 0.33807,0.42706 l -0.0982,1.11685 z m 2.96627,0.10938 c -0.0215,0.24101 -0.20715,0.42702 -0.40348,0.42702 h -0.45805 c -0.20716,0 -0.34896,-0.19703 -0.33807,-0.42702 l 0.0982,-1.11689 c 0.0215,-0.24101 0.20716,-0.42703 0.40349,-0.42703 h 0.45805 c 0.20715,0 0.34896,0.19704 0.33807,0.42703 z m 3.11899,-0.0656 c -0.0215,0.24101 -0.20717,0.42706 -0.41439,0.42706 h -0.46896 c -0.20717,0 -0.35987,-0.19704 -0.33808,-0.42706 l 0.0982,-1.11686 c 0.0215,-0.24102 0.20717,-0.42705 0.41439,-0.42705 h 0.46896 c 0.20718,0 0.35986,0.19704 0.33804,0.42705 z m 2.95539,0.0437 c -0.0215,0.24101 -0.20715,0.42706 -0.41438,0.42706 h -0.46897 c -0.20716,0 -0.35986,-0.19704 -0.33805,-0.42706 l 0.0982,-1.11689 c 0.0215,-0.24073 0.20717,-0.42702 0.4144,-0.42702 h 0.46896 c 0.20717,0 0.35987,0.19704 0.33807,0.42702 z m 3.04265,0.10965 c -0.0215,0.24073 -0.20717,0.42703 -0.4144,0.42703 h -0.46894 c -0.20715,0 -0.35989,-0.19704 -0.33807,-0.42703 l 0.0982,-1.11688 c 0.0215,-0.24101 0.20715,-0.42706 0.41443,-0.42706 h 0.46892 c 0.20716,0 0.35989,0.19704 0.33807,0.42706 z m 3.08626,0.12037 c -0.0215,0.24101 -0.20715,0.42706 -0.41438,0.42706 h -0.46896 c -0.20717,0 -0.35987,-0.19704 -0.33808,-0.42706 l 0.0982,-1.11686 c 0.0215,-0.24101 0.20718,-0.42706 0.41439,-0.42706 h 0.46897 c 0.20715,0 0.35986,0.19704 0.33804,0.42706 z m 2.9554,0.0437 c -0.0215,0.24102 -0.20717,0.42705 -0.41439,0.42705 h -0.46896 c -0.20715,0 -0.35986,-0.19703 -0.33804,-0.42705 l 0.0982,-1.11685 c 0.0215,-0.24102 0.20716,-0.42706 0.4144,-0.42706 h 0.46895 c 0.20717,0 0.35987,0.19703 0.33808,0.42706 z m 3.04264,0.10937 c -0.0215,0.24102 -0.20717,0.42703 -0.41439,0.42703 h -0.46894 c -0.20715,0 -0.35988,-0.19703 -0.33806,-0.42703 l 0.0982,-1.11688 c 0.0215,-0.24102 0.20715,-0.42703 0.41443,-0.42703 h 0.46893 c 0.20715,0 0.3599,0.19703 0.33808,0.42703 z m 3.08628,0.033 c -0.0215,0.24101 -0.2182,0.42705 -0.42532,0.42705 h -0.47985 c -0.21819,0 -0.37077,-0.19704 -0.34898,-0.42705 l 0.0982,-1.11689 c 0.0215,-0.24101 0.21817,-0.42703 0.42532,-0.42703 h 0.47982 c 0.21819,0 0.37077,0.19704 0.34899,0.42703 z m 3.03174,0.0437 c -0.0215,0.24101 -0.21818,0.42703 -0.42532,0.42703 h -0.47985 c -0.21819,0 -0.37079,-0.19704 -0.34897,-0.42703 l 0.0982,-1.11688 c 0.0215,-0.24101 0.21819,-0.42703 0.42528,-0.42703 h 0.47987 c 0.21817,0 0.37078,0.19704 0.34896,0.42703 z m 3.11899,0.10938 c -0.0215,0.24101 -0.21819,0.42705 -0.42531,0.42705 h -0.47987 c -0.21817,0 -0.37078,-0.19704 -0.34896,-0.42705 l 0.0982,-1.11686 c 0.0215,-0.24101 0.21818,-0.42706 0.42533,-0.42706 h 0.47984 c 0.21819,0 0.3708,0.19704 0.34898,0.42706 z m 21.81106,-1.66436 c -0.14169,0.55844 -0.46898,1.66436 -0.63252,2.23376 -0.17442,0.58032 -0.19615,0.63509 -0.41443,0.657 -0.21819,0.0225 -0.64342,0 -0.85062,-0.0113 -0.20716,0 -0.20716,-0.0113 -0.46894,-0.0225 -0.26165,0 -0.7852,-0.0225 -1.05785,-0.0437 -0.27265,-0.0226 -0.29439,-0.0547 -0.32715,-0.10937 -0.0328,-0.0547 -0.0762,-0.12037 -0.0982,-0.20803 -0.0215,-0.0767 -0.0328,-0.16435 0.0654,-0.54749 0.0982,-0.38324 0.29438,-1.05117 0.41439,-1.41253 0.11995,-0.35038 0.15269,-0.39418 0.31626,-0.51463 0.1527,-0.12036 0.43624,-0.32848 0.58892,-0.44893 0.15269,-0.12037 0.19614,-0.14235 0.5998,-0.16434 0.4035,-0.0225 1.1778,-0.0225 1.58129,-0.0113 0.4035,0.0113 0.43621,0.0437 0.2944,0.60221 z m 4.39491,2.40896 c -0.85061,0.12036 -2.54097,0.29564 -3.40253,0.37229 -0.86154,0.0656 -0.88333,0.0225 -0.83971,-0.23002 0.0544,-0.26273 0.18542,-0.73364 0.32718,-1.2045 l 0.10892,-0.31754 
        c 0.10892,-0.31755 0.32719,-0.94168 0.45803,-1.27018 0.13098,-0.32848 0.16371,-0.32848 0.5562,-0.32848 0.38169,0 1.12328,0 1.50495,0.0112 0.38172,0.0113 0.41444,0.0437 0.70887,0.50371 0.29438,0.45989 0.86153,1.33588 1.14508,1.80672 0.28367,0.47082 0.28367,0.53653 -0.56709,0.65698 z m 5.68181,0.0767 c -0.7961,-0.033 -2.39923,-0.12037 -3.22804,-0.17533 -0.82883,-0.0547 -0.88336,-0.0767 -1.22143,-0.53654 -0.33809,-0.4599 -0.95969,-1.36872 -1.27595,-1.81768 v 0 q -0.31625,-0.44893 -0.27265,-0.45988 c 0,0 0.13097,-0.033 0.83972,0 0.70888,0.0437 2.03937,0.15335 2.71548,0.20804 0.68705,0.0547 0.71976,0.0547 1.14509,0.5037 0.42532,0.44893 1.25414,1.34682 1.66853,1.80672 0.41443,0.47082 0.42532,0.50367 -0.37075,0.47082 z"
      />
    );
  };

  const display = () => {
    return (
      <g id="g253" transform="matrix(0.74241796,0,0,0.68112931,-316.47051,-161.84314)">
        <path
          className={classes.st0}
          d="M 690.82,531.24 H 431.11 c -2.68,0 -4.84,-2.17 -4.84,-4.84 V 242.45 c 0,-2.68 2.17,-4.84 4.84,-4.84 h 259.71 c 2.68,0 4.84,2.17 4.84,4.84 V 526.4 c 0.01,2.68 -2.16,4.84 -4.84,4.84 z"
          id="path176"
        />
        <g id="g218">
          <line
            className={classes.st1}
            x1="617.04999"
            y1="446.35999"
            x2="617.04999"
            y2="318.41"
            id="line178"
          />

          <path
            className={classes.st2}
            d="m 598.74,371.62 h -57.2 c -2.68,0 -4.84,-2.17 -4.84,-4.84 v -15.16 c 0,-2.68 2.17,-4.84 4.84,-4.84 h 57.2 c 2.68,0 4.84,2.17 4.84,4.84 v 15.16 c 0,2.67 -2.17,4.84 -4.84,4.84 z"
            id="path180"
          />

          <path
            className={classes.st2}
            d="M 553.8,413.66 H 439.07 c -2.68,0 -4.84,-2.17 -4.84,-4.84 v -15.16 c 0,-2.68 2.17,-4.84 4.84,-4.84 H 553.8 c 2.68,0 4.84,2.17 4.84,4.84 v 15.16 c 0.01,2.68 -2.16,4.84 -4.84,4.84 z"
            id="path182"
          />

          <path
            className={classes.st2}
            d="M 598.74,464.47 H 439.07 c -2.68,0 -4.84,-2.17 -4.84,-4.84 v -15.16 c 0,-2.68 2.17,-4.84 4.84,-4.84 h 159.67 c 2.68,0 4.84,2.17 4.84,4.84 v 15.16 c 0,2.67 -2.17,4.84 -4.84,4.84 z"
            id="path184"
          />

          <path
            className={classes.st2}
            d="M 598.74,515.28 H 439.07 c -2.68,0 -4.84,-2.17 -4.84,-4.84 v -15.16 c 0,-2.68 2.17,-4.84 4.84,-4.84 h 159.67 c 2.68,0 4.84,2.17 4.84,4.84 v 15.16 c 0,2.67 -2.17,4.84 -4.84,4.84 z"
            id="path186"
          />

          <path
            className={classes.st2}
            d="m 682.87,515.28 h -41.74 c -2.68,0 -4.84,-2.17 -4.84,-4.84 v -65.97 c 0,-2.68 2.17,-4.84 4.84,-4.84 h 41.74 c 2.68,0 4.84,2.17 4.84,4.84 v 65.97 c 0,2.67 -2.17,4.84 -4.84,4.84 z"
            id="path188"
          />

          <path
            className={classes.st3}
            d="m 643.87,507.75 h -53.63 c -1.83,0 -3.31,-1.48 -3.31,-3.31 v -52.48 c 0,-1.83 1.48,-3.31 3.31,-3.31 h 53.63 c 1.83,0 3.31,1.48 3.31,3.31 v 52.48 c 0,1.83 -1.48,3.31 -3.31,3.31 z"
            id="path190"
          />

          <g id="XMLID_00000052094370623933958170000003594842737435665814_">
            <path
              id="XMLID_00000100343378237322338830000012068107819846125735_"
              className={classes.st4}
              d="m 444.78,452.81 v -6.04 c 0,-0.8 -0.65,-1.45 -1.45,-1.45 -0.8,0 -1.45,0.65 -1.45,1.45 v 6.04 c -1.04,0.54 -1.71,1.62 -1.71,2.8 0,1.74 1.42,3.16 3.16,3.16 1.74,0 3.16,-1.42 3.16,-3.16 0,-1.18 -0.67,-2.27 -1.71,-2.8 z m -1.44,-6.45 c 0.23,0 0.41,0.18 0.41,0.41 v 3.75 h -0.82 v -3.75 c 0,-0.23 0.18,-0.41 0.41,-0.41 z"
            />
          </g>

          <g id="XMLID_00000099646406826819563250000016097032526075459986_">
            <path
              id="XMLID_00000128478689706012497190000009356208829748505728_"
              className={classes.st4}
              d="m 444.78,401.25 v -6.04 c 0,-0.8 -0.65,-1.45 -1.45,-1.45 -0.8,0 -1.45,0.65 -1.45,1.45 v 6.04 c -1.04,0.54 -1.71,1.62 -1.71,2.8 0,1.74 1.42,3.16 3.16,3.16 1.74,0 3.16,-1.42 3.16,-3.16 0,-1.18 -0.67,-2.27 -1.71,-2.8 z m -1.44,-6.45 c 0.23,0 0.41,0.18 0.41,0.41 v 3.75 h -0.82 v -3.75 c 0,-0.22 0.18,-0.41 0.41,-0.41 z"
            />
          </g>

          <g id="XMLID_00000155856930002675124870000010776642566793046427_">
            <path
              id="XMLID_00000070109034245461305450000000582485049791083156_"
              className={classes.st4}
              d="m 548.61,359.55 v -6.04 c 0,-0.8 -0.65,-1.45 -1.45,-1.45 -0.8,0 -1.45,0.65 -1.45,1.45 v 6.04 c -1.04,0.54 -1.71,1.62 -1.71,2.8 0,1.74 1.42,3.16 3.16,3.16 1.74,0 3.16,-1.42 3.16,-3.16 0,-1.18 -0.67,-2.27 -1.71,-2.8 z m -1.44,-6.45 c 0.23,0 0.41,0.18 0.41,0.41 v 3.75 h -0.82 v -3.75 c 0,-0.23 0.18,-0.41 0.41,-0.41 z"
            />
          </g>

          <g id="XMLID_00000143619608586999597840000000689833668930540929_">
            <path
              id="XMLID_00000072962186239005055260000012664353406856745917_"
              className={classes.st4}
              d="m 443.5,500.4 h -3.31 v -1.34 h 3.31 c 0.04,0 0.05,-0.01 0.05,-0.01 0.04,-0.05 0.09,-0.3 0.07,-0.5 v -0.08 -0.65 h 1.34 v 0.61 c 0.02,0.24 0.05,0.99 -0.41,1.51 -0.26,0.31 -0.62,0.46 -1.05,0.46 z"
            />

            <path
              id="XMLID_00000145754134699560871650000017394339839724987829_"
              className={classes.st4}
              d="m 448.05,509.7 v -1.34 c 0.88,0 1.6,-0.72 1.6,-1.6 0,-0.88 -0.72,-1.6 -1.6,-1.6 h -5.81 v -1.34 h 5.81 c 1.62,0 2.94,1.32 2.94,2.94 0,1.62 -1.32,2.94 -2.94,2.94 z"
            />

            <path
              id="XMLID_00000084530234712333282900000003124602525160488361_"
              className={classes.st4}
              d="m 449.79,502.76 h -9.63 v -1.34 h 9.63 c 0.88,0 1.6,-0.72 1.6,-1.6 0,-0.88 -0.72,-1.6 -1.6,-1.6 v -1.34 c 1.62,0 2.94,1.32 2.94,2.94 0,1.62 -1.32,2.94 -2.94,2.94 z"
            />
          </g>

          <path
            className={classes.st0}
            d="m 642.34,507.75 h -50.57 c -2.68,0 -4.84,-2.17 -4.84,-4.84 v -49.42 c 0,-2.68 2.17,-4.84 4.84,-4.84 h 50.57 c 2.68,0 4.84,2.17 4.84,4.84 v 49.42 c 0,2.67 -2.17,4.84 -4.84,4.84 z"
            id="path202"
          />

          <g id="g214">
            <g id="g212">
              <path
                className={classes.st4}
                d="m 606.6,483.51 c -2.03,0 -3.68,1.65 -3.68,3.68 0,2.03 1.65,3.68 3.68,3.68 2.03,0 3.68,-1.65 3.68,-3.68 0,-2.03 -1.65,-3.68 -3.68,-3.68 z m 0,5.24 c -0.86,0 -1.56,-0.7 -1.56,-1.56 0,-0.86 0.7,-1.56 1.56,-1.56 0.86,0 1.56,0.7 1.56,1.56 0,0.86 -0.7,1.56 -1.56,1.56 z"
                id="path204"
              />

              <path
                className={classes.st4}
                d="m 638.33,476.74 v -10.8 h -41.84 v 17 h -2.37 v 3.91 h 2.37 1.12 3.85 l 1.54,-3.92 h 7.17 l 1.54,3.92 h 17.11 v -0.56 -4.73 l 3.72,-1.89 v 4.19 c -1.49,0.7 -2.43,2.36 -2.02,4.18 0.3,1.33 1.38,2.42 2.71,2.72 2.41,0.55 4.54,-1.26 4.54,-3.58 0,-1.47 -0.87,-2.74 -2.12,-3.33 v -5.77 z m -4.23,12.01 c -0.86,0 -1.56,-0.7 -1.56,-1.56 0,-0.86 0.7,-1.56 1.56,-1.56 0.86,0 1.56,0.7 1.56,1.56 -0.01,0.86 -0.7,1.56 -1.56,1.56 z m -17.43,-12.28 h 11.03 v 4.4 4.86 h -11.03 z m 11.03,-1.11 h -11.03 v -8.3 h 11.03 z m -31.21,10.37 h -1.25 v -1.68 h 1.25 z m 14.43,-3.92 h -8.69 l -1.54,3.92 h -3.09 v -2.79 -15.88 h 17.95 v 18.67 h -3.09 z m 17.89,-14.75 h 8.4 v 8.99 l -8.4,4.26 z"
                id="path206"
              />

              <rect
                x="602.23999"
                y="469"
                className={classes.st4}
                width="11.84"
                height="10.6"
                id="rect208"
              />

              <path
                className={classes.st4}
                d="m 600.63,469 h -1.48 c -0.37,0 -0.67,0.3 -0.67,0.67 v 5.59 c 0,0.37 0.3,0.67 0.67,0.67 h 1.48 c 0.37,0 0.66,-0.3 0.66,-0.67 v -5.59 c 0,-0.37 -0.3,-0.67 -0.66,-0.67 z"
                id="path210"
              />
            </g>
          </g>
        </g>
        {/* {ghostPlane()} */}
        {frontFacingPlaneWindowed()}
      </g>
    );
  };

  const convertFinalTemp = (temp: number) => {
    if (user.settings.temperatureUnit === pond.TemperatureUnit.TEMPERATURE_UNIT_FAHRENHEIT) {
      return temp * 1.8 + 32;
    }
    return temp;
  };

  const finalTempDisplay = (temp: number) => {
    let display = "--"
    if(pcaState === pond.PCAState.PCA_STATE_IN_BOUNDS || pcaState === pond.PCAState.PCA_STATE_OUT_BOUNDS){
      if(temp < 60 && temp > -40 && !isNaN(temp) && temp !== 0){
        display = convertFinalTemp(finalTemp).toFixed(2) + (user.settings.temperatureUnit === pond.TemperatureUnit.TEMPERATURE_UNIT_FAHRENHEIT ? "°F" : "°C")
      }
    }
    return display
  }

  const renderValues = () => {
    let values: JSX.Element[] = [];
    //add the final temp display to the array
    values.push(
      <g key={"finalTemp"} id={"finalTemp"} data-name={"finalTemp"}>
        <text fontSize={7} className={classes.fontBase} x={100} y={85}>
          {finalTempDisplay(finalTemp)}
        </text>
      </g>
    );
    //add the ambient temp display to the array
    values.push(
      <g key={"ambientTemp"} id={"ambientTemp"} data-name={"ambientTemp"}>
        <text fontSize={7} className={classes.fontBase} x={30} y={114}>
          Ambient: {ambientTemp}
          {user.settings.temperatureUnit === pond.TemperatureUnit.TEMPERATURE_UNIT_FAHRENHEIT
            ? "°F"
            : "°C"}
        </text>
      </g>
    );
    //add the inner temps display (t1,t2) to the array
    values.push(
      <g key={"tempChain"} id={"tempChain"} data-name={"tempChain"}>
        <text fontSize={7} className={classes.fontBase} x={30} y={149}>
          T1: {innerTemps.t1}
          {user.settings.temperatureUnit === pond.TemperatureUnit.TEMPERATURE_UNIT_FAHRENHEIT
            ? "°F"
            : "°C"}
          , T2: {innerTemps.t2}
          {user.settings.temperatureUnit === pond.TemperatureUnit.TEMPERATURE_UNIT_FAHRENHEIT
            ? "°F"
            : "°C"}
        </text>
      </g>
    );
    //add the inner temps display (t1,t2) to the array
    values.push(
      <g key={"pressureChain"} id={"pressureChain"} data-name={"pressureChain"}>
        <text fontSize={7} className={classes.fontBase} x={30} y={184}>
          P1: {innerPressures.p1}{" "}
          {user.settings.pressureUnit === pond.PressureUnit.PRESSURE_UNIT_INCHES_OF_WATER
            ? "iwg"
            : "kPa"}
          , P2: {innerPressures.p2}{" "}
          {user.settings.pressureUnit === pond.PressureUnit.PRESSURE_UNIT_INCHES_OF_WATER
            ? "iwg"
            : "kPa"}
        </text>
      </g>
    );
    return values;
  };

  const pcaRed = () => {
    return (
      <g key={"pcaRed"} id={"pcaRed"} data-name={"pcaRed"}>
        {/* <circle cx={175} cy={152} r={8} fill={(pcaFanState && pcaState === pond.PCAState.PCA_STATE_OUT_BOUNDS) ? "red" : "grey"} /> */}
        <circle cx={175} cy={152} r={8} fill={pcaState === pond.PCAState.PCA_STATE_OUT_BOUNDS ? "red" : "grey"} />
      </g>
    );
  };

  const pcaGreen = () => {
    return (
      <g key={"pcaGreen"} id={"pcaGreen"} data-name={"pcaGreen"}>
        <circle
          cx={175}
          cy={174}
          r={8}
          //fill={(pcaFanState && pcaState === pond.PCAState.PCA_STATE_IN_BOUNDS) ? "green" : "grey"}
          fill={pcaState === pond.PCAState.PCA_STATE_IN_BOUNDS ? "green" : "grey"}
        />
      </g>
    );
  };

  const pcaFan = () => {
    return (
      <g key={"fanStatus"}>
        <text x={125} y={180} fontSize={5} className={classes.fontBase}>
          {/* PCA Fan: {pcaFanState ? "ON" : "OFF"} */}
          PCA Fan: {pcaState === pond.PCAState.PCA_STATE_OFF ? "OFF" : "ON"}
        </text>
      </g>
    );
  };

  const deviceCheckIn = () => {
    return (
      <g key={"deviceCheckIn"}>
        <text x={85} y={12} fontSize={7} fontWeight={650} fill={"white"}>
          Last Checked In: {moment(checkInTime).fromNow()}
        </text>
      </g>
    );
  };

  return (
    <React.Fragment>
      <Box height={"100%"} maxWidth={isMobile ? 400 : 460} margin="auto">
        <svg
          width={"100%"}
          height={"100%"}
          viewBox="0 0 200 200"
          xmlns="http://www.w3.org/2000/svg"
          preserveAspectRatio="xMidYMid">
          <defs id="defs2" />
          <g id="layer1">
            {display()}
            {renderValues()}
          </g>
          <foreignObject height={20} width={120} x={10} y={83}>
            <Box sx={{ position: "fixed" }}>{ambientSelector()}</Box>
          </foreignObject>
          <foreignObject height={20} width={120} x={10} y={118}>
            <Box sx={{ position: "fixed" }}>{tempChainSelector()}</Box>
          </foreignObject>
          <foreignObject height={20} width={120} x={10} y={153}>
            <Box sx={{ position: "fixed" }}>{pressureChainSelector()}</Box>
          </foreignObject>
          {pcaRed()}
          {pcaGreen()}
          {pcaFan()}
          {deviceCheckIn()}
        </svg>
      </Box>
    </React.Fragment>
  );
}
