{"remainingRequest":"/home/cmiss/Jenkins/workspace/mapintegratedvuer/node_modules/babel-loader/lib/index.js!/home/cmiss/Jenkins/workspace/mapintegratedvuer/node_modules/eslint-loader/index.js??ref--14-0!/home/cmiss/Jenkins/workspace/mapintegratedvuer/src/components/scripts/utilities.js","dependencies":[{"path":"/home/cmiss/Jenkins/workspace/mapintegratedvuer/src/components/scripts/utilities.js","mtime":1684565818325},{"path":"/home/cmiss/Jenkins/workspace/mapintegratedvuer/babel.config.js","mtime":1684261475125},{"path":"/home/cmiss/Jenkins/workspace/mapintegratedvuer/node_modules/cache-loader/dist/cjs.js","mtime":499162500000},{"path":"/home/cmiss/Jenkins/workspace/mapintegratedvuer/node_modules/babel-loader/lib/index.js","mtime":456789000000},{"path":"/home/cmiss/Jenkins/workspace/mapintegratedvuer/node_modules/eslint-loader/index.js","mtime":499162500000}],"contextDependencies":[],"result":[{"type":"Buffer","data":"base64:cmVxdWlyZSgiY29yZS1qcy9tb2R1bGVzL2VzLmFycmF5LnNsaWNlLmpzIik7Ci8qCiAqIEluaXRpYWwgc3RhdGUgZm9yIHRoZSBzcGxpdCBmbG93CiAqLwp2YXIgaW5pdGlhbFN0YXRlID0gZnVuY3Rpb24gaW5pdGlhbFN0YXRlKCkgewogIHJldHVybiB7CiAgICBtYWluVGFiTmFtZTogIkZsYXRtYXAiLAogICAgekluZGV4OiAxLAogICAgc2hvd0RpYWxvZ0ljb25zOiBmYWxzZSwKICAgIGFjdGl2ZURvY2tlZElkOiAxLAogICAgY3VycmVudENvdW50OiAxLAogICAgZW50cmllczogW3sKICAgICAgcmVzb3VyY2U6ICJSYXQiLAogICAgICB0eXBlOiAiTXVsdGlGbGF0bWFwIiwKICAgICAgekluZGV4OiAxLAogICAgICBtb2RlOiAibWFpbiIsCiAgICAgIGlkOiAxLAogICAgICBzdGF0ZTogdW5kZWZpbmVkLAogICAgICBsYWJlbDogIiIsCiAgICAgIGRpc2NvdmVySWQ6IHVuZGVmaW5lZAogICAgfV0sCiA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ydHMuY2FwaXRhbGlzZSA9IGNhcGl0YWxpc2U7CmV4cG9ydHMuZmluZFNwZWNpZXNLZXkgPSBmaW5kU3BlY2llc0tleTsKZXhwb3J0cy5pbml0aWFsU3RhdGUgPSBpbml0aWFsU3RhdGU7"},{"version":3,"names":["initialState","mainTabName","zIndex","showDialogIcons","activeDockedId","currentCount","entries","resource","type","mode","id","state","undefined","label","discoverId","sideBarVisibility","search","startUp","capitalise","term","charAt","toUpperCase","slice","availableSpecies","taxo","biologicalSex","iconClass","displayWarning","displayLatestChanges","findSpeciesKey","condition","list","key","exports"],"sources":["/home/cmiss/Jenkins/workspace/mapintegratedvuer/src/components/scripts/utilities.js"],"sourcesContent":["/*\n * Initial state for the split flow\n */\nconst initialState = () => {\n return {\n mainTabName: \"Flatmap\",\n zIndex: 1,\n showDialogIcons: false, \n activeDockedId: 1,\n currentCount: 1,\n entries: [\n {\n resource: \"Rat\",\n type: \"MultiFlatmap\",\n zIndex:1,\n mode: \"main\",\n id: 1,\n state: undefined,\n label: \"\",\n discoverId: undefined\n }\n ],\n sideBarVisibility: true,\n search: '',\n startUp: true\n }\n}\n\nconst capitalise = term => {\n if (term)\n return term.charAt(0).toUpperCase() + term.slice(1);\n return term;\n};\n\n/*\n * Provide a list of available species for the flatmap\n */\nconst availableSpecies = () => {\n return {\n \"Human Female\":{taxo: \"NCBITaxon:9606\", biologicalSex: \"PATO:0000383\", iconClass:\"mapicon-icon_human\", displayWarning:true},\n \"Human Male\":{taxo: \"NCBITaxon:9606\", biologicalSex: \"PATO:0000384\", iconClass:\"mapicon-icon_human\", displayWarning:true},\n \"Rat\":{taxo: \"NCBITaxon:10114\", iconClass:\"mapicon-icon_rat\", displayLatestChanges: true},\n \"Mouse\":{taxo: \"NCBITaxon:10090\", iconClass:\"mapicon-icon_mouse\", displayWarning: true},\n \"Pig\":{taxo: \"NCBITaxon:9823\", iconClass:\"mapicon-icon_pig\", displayWarning: true},\n \"Cat\":{taxo: \"NCBITaxon:9685\", iconClass:\"mapicon-icon_cat\", displayWarning: true},\n }\n}\n\n/*\n * Look for the key in availableSpecies with the provided condition\n */\nconst findSpeciesKey = condition => {\n if (condition) {\n const list = availableSpecies();\n for (let key in list) {\n if (condition.taxo === list[key].taxo) {\n if (condition.biologicalSex && list[key].biologicalSex) {\n if (condition.biologicalSex === list[key].biologicalSex)\n return key;\n } else {\n return key;\n }\n }\n }\n }\n return \"\";\n}\n\nexports.availableSpecies = availableSpecies;\nexports.capitalise = capitalise;\nexports.findSpeciesKey = findSpeciesKey;\nexports.initialState = initialState;\n"],"mappings":";AAAA;AACA;AACA;AACA,IAAMA,YAAY,GAAG,SAAfA,YAAYA,CAAA,EAAS;EACzB,OAAO;IACLC,WAAW,EAAE,SAAS;IACtBC,MAAM,EAAE,CAAC;IACTC,eAAe,EAAE,KAAK;IACtBC,cAAc,EAAE,CAAC;IACjBC,YAAY,EAAE,CAAC;IACfC,OAAO,EAAE,CACP;MACEC,QAAQ,EAAE,KAAK;MACfC,IAAI,EAAE,cAAc;MACpBN,MAAM,EAAC,CAAC;MACRO,IAAI,EAAE,MAAM;MACZC,EAAE,EAAE,CAAC;MACLC,KAAK,EAAEC,SAAS;MAChBC,KAAK,EAAE,EAAE;MACTC,UAAU,EAAEF;IACd,CAAC,CACF;IACDG,iBAAiB,EAAE,IAAI;IACvBC,MAAM,EAAE,EAAE;IACVC,OAAO,EAAE;EACX,CAAC;AACH,CAAC;AAED,IAAMC,UAAU,GAAG,SAAbA,UAAUA,CAAGC,IAAI,EAAK;EAC1B,IAAIA,IAAI,EACN,OAAOA,IAAI,CAACC,MAAM,CAAC,CAAC,CAAC,CAACC,WAAW,EAAE,GAAGF,IAAI,CAACG,KAAK,CAAC,CAAC,CAAC;EACrD,OAAOH,IAAI;AACb,CAAC;;AAED;AACA;AACA;AACA,IAAMI,gBAAgB,GAAG,SAAnBA,gBAAgBA,CAAA,EAAS;EAC7B,OAAO;IACL,cAAc,EAAC;MAACC,IAAI,EAAE,gBAAgB;MA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