const dataModel=function(){function initialServerData(){return dataModelGlobal.getAllInstantsFetch().then((instantsData=>dataModelGlobal.getAllPlansFetch().then((allPlansData=>{const buttons=document.querySelectorAll("button[data-servers-type]");const tables=document.querySelectorAll(".table-configuration-container[data-instants-type]");const customTables=document.querySelectorAll(".table-custom-configurations");const switchStatus=document.querySelector("#planTypeInput");buttons.forEach((item=>{if(item.attributes[1].value==="all-servers"&&item.attributes[0].value.includes("current")){tables.forEach((item=>{if(item.attributes[1].value==="without-gpu"&&!switchStatus.checked){item.parentElement.style.display="flex"}else if(item.attributes[1].value==="with-gpu"&&!switchStatus.checked){item.parentElement.style.display="flex"}else{item.parentElement.style.display="none"}customTables.forEach((item=>{if(item.id==="table-custom"&&switchStatus.checked){item.style.display="block"}else{item.style.display="none"}}))}))}else if(item.attributes[1].value==="5-bare-metal"&&item.attributes[0].value.includes("current")){tables.forEach((item=>{if(item.attributes[1].value==="5-bare-metal"&&!switchStatus.checked){item.parentElement.style.display="flex"}else{item.parentElement.style.display="none"}customTables.forEach((item=>{if(item.id==="five-bare-metal-custom"&&switchStatus.checked){item.style.display="block"}else{item.style.display="none"}}))}))}else if(item.attributes[1].value==="entry-level"&&item.attributes[0].value.includes("current")){tables.forEach((item=>{if(item.attributes[1].value==="entry-level"&&!switchStatus.checked){item.parentElement.style.display="flex"}else if(item.attributes[1].value==="entry-level-gpu"&&!switchStatus.checked){item.parentElement.style.display="flex"}else{item.parentElement.style.display="none"}customTables.forEach((item=>{if(item.id==="entry-level-custom"&&switchStatus.checked){item.style.display="block"}else{item.style.display="none"}}))}))}else if(item.attributes[1].value==="nvme"&&item.attributes[0].value.includes("current")){tables.forEach((item=>{if(item.attributes[1].value==="nvme"&&!switchStatus.checked){item.parentElement.style.display="flex"}else if(item.attributes[1].value==="nvmeGPU"&&!switchStatus.checked){item.parentElement.style.display="flex"}else{item.parentElement.style.display="none"}customTables.forEach((item=>{if(item.id==="nvme-custom"&&switchStatus.checked){item.style.display="block"}else{item.style.display="none"}}))}))}else if(item.attributes[1].value==="dual-cpu"&&item.attributes[0].value.includes("current")){tables.forEach((item=>{if(item.attributes[1].value==="dual-cpu"&&!switchStatus.checked){item.parentElement.style.display="flex"}else{item.parentElement.style.display="none"}customTables.forEach((item=>{if(item.id==="dual-cpu-custom"&&switchStatus.checked){item.style.display="block"}else{item.style.display="none"}}))}))}else if(item.attributes[1].value==="quad-cpu"&&item.attributes[0].value.includes("current")){tables.forEach((item=>{if(item.attributes[1].value==="quad-cpu"&&!switchStatus.checked){item.parentElement.style.display="flex"}else{item.parentElement.style.display="none"}customTables.forEach((item=>{if(item.id==="quad-cpu-custom"&&switchStatus.checked){item.style.display="block"}else{item.style.display="none"}}))}))}else if(item.attributes[1].value==="gpu"&&item.attributes[0].value.includes("current")){tables.forEach((item=>{if(item.attributes[1].value==="custom-gpu"&&!switchStatus.checked){item.parentElement.style.display="flex"}else{item.parentElement.style.display="none"}customTables.forEach((item=>{if(item.id==="gpu-custom"&&switchStatus.checked){item.style.display="block"}else{item.style.display="none"}}))}))}}));dataModelGlobal.setInstantServersConfigurations({...instantsData});dataModelGlobal.setCustomServersConfigurations({allPlansData:allPlansData});return{...instantsData,allPlansData:allPlansData}}))))}return{initialServerData:initialServerData}}();