Spaces:
Running
Running
Add 3 files
Browse filesFiles changed (3)
- README.md+7-5
- index.html+1069-19
- prompts.txtAdded+3
12345678910---title: Meus Estudosemoji: 🌖colorFrom: pinkcolorTo: indigosdk: staticpinned: false---Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference123456789101112---title: meus-estudosemoji: 🐳colorFrom: yellowcolorTo: bluesdk: staticpinned: falsetags:- deepsite---Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
12345678910111213141516171819<!doctype html><html><head><meta charset="utf-8" /><meta name="viewport" content="width=device-width" /><title>My static Space</title><link rel="stylesheet" href="style.css" /></head><body><div class="card"><h1>Welcome to your static Space!</h1><p>You can modify this app directly by editing <i>index.html</i> in the Files and versions tab.</p><p>Also don't forget to check the<a href="https://huggingface.co/docs/hub/spaces" target="_blank">Spaces documentation</a>.</p></div></body></html>1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069<!DOCTYPE html><html lang="pt-BR"><head><meta charset="UTF-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><title>TechCalc - Calculadora Avançada</title><script src="https://cdn.tailwindcss.com"></script><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css"><style>@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@400;700&family=Roboto:wght@300;400;500&display=swap');body {font-family: 'Roboto', sans-serif;background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);min-height: 100vh;color: #e2e8f0;}.calculator-display {font-family: 'Orbitron', sans-serif;text-shadow: 0 0 5px rgba(79, 192, 210, 0.7);}.glow-effect {box-shadow: 0 0 15px rgba(79, 192, 210, 0.5);}.btn-operator {background: linear-gradient(145deg, #334155, #1e293b);}.btn-number {background: linear-gradient(145deg, #1e293b, #0f172a);}.btn-special {background: linear-gradient(145deg, #7c3aed, #5b21b6);}.btn:hover {transform: translateY(-2px);box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);}.tab-active {border-bottom: 3px solid #7c3aed;color: #7c3aed;}.cyber-border {position: relative;}.cyber-border::before {content: '';position: absolute;top: -2px;left: -2px;right: -2px;bottom: -2px;background: linear-gradient(45deg, #7c3aed, #5b21b6, #4f46e5);z-index: -1;border-radius: inherit;}.pulse {animation: pulse 2s infinite;}@keyframes pulse {0% {box-shadow: 0 0 0 0 rgba(79, 192, 210, 0.4);}70% {box-shadow: 0 0 0 10px rgba(79, 192, 210, 0);}100% {box-shadow: 0 0 0 0 rgba(79, 192, 210, 0);}}.loading {display: inline-block;width: 20px;height: 20px;border: 3px solid rgba(255,255,255,.3);border-radius: 50%;border-top-color: #7c3aed;animation: spin 1s ease-in-out infinite;}@keyframes spin {to { transform: rotate(360deg); }}.result-card {background: linear-gradient(145deg, #1e293b, #0f172a);border-left: 4px solid #7c3aed;}.info-tooltip {position: relative;display: inline-block;}.info-tooltip .tooltip-text {visibility: hidden;width: 200px;background-color: #1e293b;color: #fff;text-align: center;border-radius: 6px;padding: 5px;position: absolute;z-index: 1;bottom: 125%;left: 50%;margin-left: -100px;opacity: 0;transition: opacity 0.3s;font-size: 12px;box-shadow: 0 0 10px rgba(0,0,0,0.3);}.info-tooltip:hover .tooltip-text {visibility: visible;opacity: 1;}.logo-img {max-width: 180px;margin: 0 auto 10px;filter: drop-shadow(0 0 8px rgba(124, 58, 237, 0.7));border-radius: 50%;border: 3px solid #7c3aed;}</style></head><body class="flex items-center justify-center p-4"><div class="w-full max-w-md"><div class="text-center mb-6"><!-- Nova imagem adicionada aqui --><img src="https://raw.githubusercontent.com/DiegoShadow/meu-lab-devops/refs/heads/main/DevDog.png" alt="TechCalc Logo" class="logo-img"><h1 class="text-3xl font-bold text-transparent bg-clip-text bg-gradient-to-r from-purple-400 to-cyan-400 mb-2">TECHCALC PRO</h1><p class="text-sm text-gray-400">Sistema Avançado de Cálculos</p></div><div class="cyber-border rounded-xl overflow-hidden bg-gray-900 p-1 mb-6"><div class="bg-gray-800 rounded-lg overflow-hidden"><!-- Tabs --><div class="flex border-b border-gray-700"><button id="standard-tab" class="flex-1 py-3 font-medium tab-active"><i class="fas fa-calculator mr-2"></i> Padrão</button><button id="currency-tab" class="flex-1 py-3 font-medium text-gray-400"><i class="fas fa-exchange-alt mr-2"></i> Câmbio</button><button id="labor-tab" class="flex-1 py-3 font-medium text-gray-400"><i class="fas fa-briefcase mr-2"></i> Trabalhista</button></div><!-- Standard Calculator --><div id="standard-calc" class="p-4"><!-- Display --><div class="calculator-display bg-gray-900 rounded-lg p-4 mb-4 text-right text-3xl font-bold h-20 overflow-x-auto flex items-center justify-end"><span id="display">0</span></div><!-- Keypad --><div class="grid grid-cols-4 gap-3"><!-- Row 1 --><button class="btn-special rounded-lg p-4 text-white font-bold glow-effect" onclick="clearAll()">AC</button><button class="btn-special rounded-lg p-4 text-white font-bold glow-effect" onclick="clearEntry()">CE</button><button class="btn-special rounded-lg p-4 text-white font-bold glow-effect" onclick="percentage()">%</button><button class="btn-operator rounded-lg p-4 text-purple-400 font-bold glow-effect" onclick="appendOperator('/')">/</button><!-- Row 2 --><button class="btn-number rounded-lg p-4 text-white font-bold glow-effect" onclick="appendNumber('7')">7</button><button class="btn-number rounded-lg p-4 text-white font-bold glow-effect" onclick="appendNumber('8')">8</button><button class="btn-number rounded-lg p-4 text-white font-bold glow-effect" onclick="appendNumber('9')">9</button><button class="btn-operator rounded-lg p-4 text-purple-400 font-bold glow-effect" onclick="appendOperator('*')">×</button><!-- Row 3 --><button class="btn-number rounded-lg p-4 text-white font-bold glow-effect" onclick="appendNumber('4')">4</button><button class="btn-number rounded-lg p-4 text-white font-bold glow-effect" onclick="appendNumber('5')">5</button><button class="btn-number rounded-lg p-4 text-white font-bold glow-effect" onclick="appendNumber('6')">6</button><button class="btn-operator rounded-lg p-4 text-purple-400 font-bold glow-effect" onclick="appendOperator('-')">-</button><!-- Row 4 --><button class="btn-number rounded-lg p-4 text-white font-bold glow-effect" onclick="appendNumber('1')">1</button><button class="btn-number rounded-lg p-4 text-white font-bold glow-effect" onclick="appendNumber('2')">2</button><button class="btn-number rounded-lg p-4 text-white font-bold glow-effect" onclick="appendNumber('3')">3</button><button class="btn-operator rounded-lg p-4 text-purple-400 font-bold glow-effect" onclick="appendOperator('+')">+</button><!-- Row 5 --><button class="btn-number rounded-lg p-4 text-white font-bold glow-effect col-span-2" onclick="appendNumber('0')">0</button><button class="btn-number rounded-lg p-4 text-white font-bold glow-effect" onclick="appendDecimal()">.</button><button class="btn-operator rounded-lg p-4 text-purple-400 font-bold glow-effect pulse" onclick="calculate()">=</button></div></div><!-- Currency Converter --><div id="currency-calc" class="p-4 hidden"><div class="mb-4"><label class="block text-gray-400 text-sm mb-2">Valor</label><input type="number" id="currency-amount" class="w-full bg-gray-7 rounded-lg p-3 text-white focus:outline-none focus:ring-2 focus:ring-purple-500" placeholder="Digite o valor" value="1"></div><div class="grid grid-cols-2 gap-4 mb-4"><div><label class="block text-gray-400 text-sm mb-2">De</label><select id="from-currency" class="w-full bg-gray-700 rounded-lg p-3 text-white focus:outline-none focus:ring-2 focus:ring-purple-500"><option value="USD">USD - Dólar Americano</option><option value="EUR">EUR - Euro</option><option value="GBP">GBP - Libra Esterlina</option><option value="JPY">JPY - Iene Japonês</option><option value="BRL" selected>BRL - Real Brasileiro</option><option value="CAD">CAD - Dólar Canadense</option><option value="AUD">AUD - Dólar Australiano</option><option value="CNY">CNY - Yuan Chinês</option></select></div><div><label class="block text-gray-400 text-sm mb-2">Para</label><select id="to-currency" class="w-full bg-gray-700 rounded-lg p-3 text-white focus:outline-none focus:ring-2 focus:ring-purple-500"><option value="USD" selected>USD - Dólar Americano</option><option value="EUR">EUR - Euro</option><option value="GBP">GBP - Libra Esterlina</option><option value="JPY">JPY - Iene Japonês</option><option value="BRL">BRL - Real Brasileiro</option><option value="CAD">CAD - Dólar Canadense</option><option value="AUD">AUD - Dólar Australiano</option><option value="CNY">CNY - Yuan Chinês</option></select></div></div><div class="flex items-center justify-between mb-4"><div class="text-sm text-gray-400"><span id="last-update">Última atualização: --/--/----</span></div><button id="refresh-rates" class="text-purple-400 hover:text-purple-300"><i class="fas fa-sync-alt"></i></button></div><button id="convert-btn" class="w-full bg-gradient-to-r from-purple-600 to-blue-500 rounded-lg p-3 text-white font-bold glow-effect hover:from-purple-700 hover:to-blue-600 transition-all duration-300 flex items-center justify-center"><span id="convert-text">Converter</span><span id="convert-loader" class="loading ml-2 hidden"></span></button><div id="currency-result" class="mt-6 bg-gray-900 rounded-lg p-4 text-center hidden"><div class="text-2xl font-bold mb-2" id="converted-amount">0</div><div class="text-gray-400 text-sm" id="conversion-rate">1 BRL = 0.20 USD</div><div class="text-xs text-gray-500 mt-2" id="api-source">Dados fornecidos por ExchangeRate-API</div></div></div><!-- Labor Calculator --><div id="labor-calc" class="p-4 hidden"><div class="mb-4"><label class="block text-gray-400 text-sm mb-2">Tipo de Cálculo</label><select id="labor-type" class="w-full bg-gray-700 rounded-lg p-3 text-white focus:outline-none focus:ring-2 focus:ring-purple-500"><option value="ferias">Férias</option><option value="rescisao">Rescisão</option><option value="aposentadoria">Aposentadoria</option></select></div><!-- Common Fields --><div class="mb-4"><label class="block text-gray-400 text-sm mb-2">Salário Bruto (R$)</label><input type="number" id="salary", class="w-full bg-gray-700 rounded-lg p-3 text-white focus:outline-none focus:ring-2 focus:ring-purple-500" placeholder="Digite o salário bruto"></div><!-- Férias Fields --><div id="ferias-fields"><div class="grid grid-cols-2 gap-4 mb-4"><div><label class="block text-gray-400 text-sm mb-2">Tempo de Serviço (meses)</label><input type="number" id="service-time", class="w-full bg-gray-700 rounded-lg p-3 text-white focus:outline-none focus:ring-2 focus:ring-purple-500" placeholder="Meses trabalhados", min="1", max="12", value="12"></div><div><label class="block text-gray-400 text-sm mb-2">Abono Pecuniário</label><select id="abono", class="w-full bg-gray-700 rounded-lg p-3 text-white focus:outline-none focus:ring-2 focus:ring-purple-500"><option value="0">Não</option><option value="1">Sim (1/3)</option></select></div></div></div><!-- Rescisão Fields --><div id="rescisao-fields" class="hidden"><div class="grid grid-cols-2 gap-4 mb-4"><div><label class="block text-gray-400 text-sm mb-2">Tipo de Demissão</label><select id="demission-type", class="w-full bg-gray-700 rounded-lg p-3 text-white focus:outline-none focus:ring-2 focus:ring-purple-500"><option value="semJustaCausa">Sem justa causa</option><option value="comJustaCausa">Com justa causa</option><option value="pedidoDemissao">Pedido de demissão</option></select></div><div><label class="block text-gray-400 text-sm mb-2">Tempo de Serviço (anos)</label><input type="number" id="service-years", class="w-full bg-gray-700 rounded-lg p-3 text-white focus:outline-none focus:ring-2 focus:ring-purple-500" placeholder="Anos trabalhados", min="0", value="1"></div></div><div class="mb-4"><label class="block text-gray-400 text-sm mb-2">Aviso Prévio</label><select id="aviso-previo", class="w-full bg-gray-700 rounded-lg p-3 text-white focus:outline-none focus:ring-2 focus:ring-purple-500"><option value="trabalhado">Trabalhado</option><option value="indenizado">Indenizado</option></select></div><div class="mb-4"><label class="block text-gray-400 text-sm mb-2">Saldo FGTS + Multa</label><select id="fgts", class="w-full bg-gray-700 rounded-lg p-3 text-white focus:outline-none focus:ring-2 focus:ring-purple-500"><option value="1">Sim</option><option value="0">Não</option></select></div></div><!-- Aposentadoria Fields --><div id="aposentadoria-fields" class="hidden"><div class="grid grid-cols-2 gap-4 mb-4"><div><label class="block text-gray-400 text-sm mb-2">Idade</label><input type="number" id="age", class="w-full bg-gray-700 rounded-lg p-3 text-white focus:outline-none focus:ring-2 focus:ring-purple-500" placeholder="Idade atual", min="18", value="30"></div><div><label class="block text-gray-400 text-sm mb-2">Tempo de Contribuição</label><input type="number" id="contribution-time", class="w-full bg-gray-700 rounded-lg p-3 text-white focus:outline-none focus:ring-2 focus:ring-purple-500" placeholder="Anos contribuídos", min="0", value="5"></div></div><div class="mb-4"><label class="block text-gray-400 text-sm mb-2">Gênero</label><select id="gender", class="w-full bg-gray-700 rounded-lg p-3 text-white focus:outline-none focus:ring-2 focus:ring-purple-500"><option value="masculino">Masculino</option><option value="feminino">Feminino</option></select></div><div class="mb-4"><label class="block text-gray-400 text-sm mb-2">Regime</label><select id="regime", class="w-full bg-gray-700 rounded-lg p-3 text-white focus:outline-none focus:ring-2 focus:ring-purple-500"><option value="INSS">INSS</option><option value="RPPS">RPPS (Servidor Público)</option></select></div></div><button id="calculate-labor", class="w-full bg-gradient-to-r from-purple-600 to-blue-500 rounded-lg p-3 text-white font-bold glow-effect hover:from-purple-700 hover:to-blue-600 transition-all duration-300 flex items-center justify-center"><span id="labor-text">Calcular</span><span id="labor-loader", class="loading ml-2 hidden"></span></button><div id="labor-result", class="mt-6 hidden"><div class="result-card rounded-lg p-4 mb-3"><h3 class="font-bold text-lg mb-2 text-purple-400" id="labor-title">Resultado</h3><div class="space-y-2"><div class="flex justify-between"><span>Valor Bruto:</span><span class="font-bold" id="gross-value">R$ 0,00</span></div><div class="flex justify-between"><span>Descontos:</span><span class="font-bold" id="discounts">R$ 0,00</span></div><div class="flex justify-between"><span>Valor Líquido:</span><span class="font-bold text-green-400" id="net-value">R$ 0,00</span></div></div></div><div id="ferias-details", class="hidden"><div class="result-card rounded-lg p-4 mb-3"><h4 class="font-bold mb-2">Detalhes das Férias</h4><div class="space-y-2 text-sm"><div class="flex justify-between"><span>1/3 de Férias:</span><span id="one-third">R$ 0,00</span></div><div class="flex justify-between"><span>Abono Pecuniário:</span><span id="abono-value">R$ 0,00</span></div><div class="flex justify-between"><span>INSS:</span><span id="inss-ferias">R$ 0,00</span></div><div class="flex justify-between"><span>IRRF:</span><span id="irrf-ferias">R$ 0,00</span></div></div></div></div><div id="rescisao-details", class="hidden"><div class="result-card rounded-lg p-4 mb-3"><h4 class="font-bold mb-2">Detalhes da Rescisão</h4><div class="space-y-2 text-sm"><div class="flex justify-between"><span>Saldo Salário:</span><span id="saldo-salario">R$ 0,00</span></div><div class="flex justify-between"><span>Férias Proporcionais:</span><span id="ferias-proporcionais">R$ 0,00</span></div><div class="flex justify-between"><span>13º Proporcional:</span><span id="decimo-terceiro">R$ 0,00</span></div><div class="flex justify-between"><span>Aviso Prévio:</span><span id="aviso-previo-value">R$ 0,00</span></div><div class="flex justify-between"><span>Multa FGTS (40%):</span><span id="fgts-multa">R$ 0,00</span></div></div></div></div><div id="aposentadoria-details", class="hidden"><div class="result-card rounded-lg p-4"><h4 class="font-bold mb-2">Detalhes da Aposentadoria</h4><div class="space-y-2 text-sm"><div class="flex justify-between"><span>Tempo Restante:</span><span id="remaining-time">0 anos</span></div><div class="flex justify-between"><span>Idade Mínima:</span><span id="min-age">65 anos</span></div><div class="flex justify-between"><span>Tempo Mínimo:</span><span id="min-contribution">15 anos</span></div><div class="flex justify-between"><span>Valor Estimado:</span><span id="estimated-pension">R$ 0,00</span></div></div></div></div></div></div></div></div><div class="text-center text-gray-500 text-xs"><p>TechCalc Pro v3.0 | Cálculos Trabalhistas Atualizados 2024</p></div></div><script>// Calculator logiclet currentInput = '0';let previousInput = '';let operation = null;let resetScreen = false;const display = document.getElementById('display');const standardCalc = document.getElementById('standard-calc');const currencyCalc = document.getElementById('currency-calc');const laborCalc = document.getElementById('labor-calc');const standardTab = document.getElementById('standard-tab');const currencyTab = document.getElementById('currency-tab');const laborTab = document.getElementById('labor-tab');// Tab switchingstandardTab.addEventListener('click', () => {standardTab.classList.add('tab-active');standardTab.classList.remove('text-gray-400');currencyTab.classList.remove('tab-active');currencyTab.classList.add('text-gray-400');laborTab.classList.remove('tab-active');laborTab.classList.add('text-gray-400');standardCalc.classList.remove('hidden');currencyCalc.classList.add('hidden');laborCalc.classList.add('hidden');});currencyTab.addEventListener('click', () => {currencyTab.classList.add('tab-active');currencyTab.classList.remove('text-gray-400');standardTab.classList.remove('tab-active');standardTab.classList.add('text-gray-400');laborTab.classList.remove('tab-active');laborTab.classList.add('text-gray-400');currencyCalc.classList.remove('hidden');standardCalc.classList.add('hidden');laborCalc.classList.add('hidden');// Fetch rates when currency tab is openedfetchExchangeRates();});laborTab.addEventListener('click', () => {laborTab.classList.add('tab-active');laborTab.classList.remove('text-gray-400');standardTab.classList.remove('tab-active');standardTab.classList.add('text-gray-400');currencyTab.classList.remove('tab-active');currencyTab.classList.add('text-gray-400');laborCalc.classList.remove('hidden');standardCalc.classList.add('hidden');currencyCalc.classList.add('hidden');// Reset labor calculator fieldsresetLaborFields();});// Update displayfunction updateDisplay() {display.textContent = currentInput;}// Append numberfunction appendNumber(number) {if (currentInput === '0' || resetScreen) {currentInput = number;resetScreen = false;} else {currentInput += number;}updateDisplay();}// Append decimalfunction appendDecimal() {if (resetScreen) {currentInput = '0.';resetScreen = false;updateDisplay();return;}if (!currentInput.includes('.')) {currentInput += '.';updateDisplay();}}// Append operatorfunction appendOperator(op) {if (operation !== null) calculate();previousInput = currentInput;operation = op;resetScreen = true;}// Calculatefunction calculate() {if (operation === null || resetScreen) return;let result;const prev = parseFloat(previousInput);const current = parseFloat(currentInput);switch (operation) {case '+':result = prev + current;break;case '-':result = prev - current;break;case '*':result = prev * current;break;case '/':result = prev / current;break;default:return;}currentInput = result.toString();operation = null;updateDisplay();}// Clear allfunction clearAll() {currentInput = '0';previousInput = '';operation = null;updateDisplay();}// Clear entryfunction clearEntry() {currentInput = '0';updateDisplay();}// Percentagefunction percentage() {currentInput = (parseFloat(currentInput) / 100).toString();updateDisplay();}// InitializeupdateDisplay();// Currency converter logicconst convertBtn = document.getElementById('convert-btn');const currencyResult = document.getElementById('currency-result');const convertedAmount = document.getElementById('converted-amount');const conversionRate = document.getElementById('conversion-rate');const lastUpdate = document.getElementById('last-update');const refreshRates = document.getElementById('refresh-rates');const convertText = document.getElementById('convert-text');const convertLoader = document.getElementById('convert-loader');let exchangeRates = {};let lastUpdated = null;// Fetch exchange rates from APIasync function fetchExchangeRates() {try {showLoading(true);// Using ExchangeRate-API (free tier)const response = await fetch('https://api.exchangerate-api.com/v4/latest/BRL');if (!response.ok) {throw new Error('Falha ao obter taxas de câmbio');}const data = await response.json();exchangeRats = data.rates;lastUpdated = new Date(data.time_last_updated * 1000);// Update last updated timeconst options = { day: '2-digit', month: '2-digit', year: 'numeric', hour: '2-digit', minute: '2-digit' };lastUpdate.textContent = `Última atualização: ${lastUpdated.toLocaleDateString('pt-BR', options)}`;// Perform conversion with updated ratesperformConversion();} catch (error) {console.error('Erro ao buscar taxas:', error);alert('Erro ao buscar taxas de câmbio. Usando dados locais como fallback.');useFallbackRates();} finally {showLoading(false);}}// Fallback rates if API failsfunction useFallbackRates() {exchangeRates = {USD: 0.20,EUR: 0.18,GBP: 0.16,JPY: 30.30,BRL: 1,CAD: 0.27,AUD: 0.30,CNY: 1.43};lastUpdated = new Date();const options = { day: '2-digit', month: '2-digit', year: 'numeric', hour: '2-digit', minute: '2-digit' };lastUpdate.textContent = `Última atualização: ${lastUpdated.toLocaleDateString('pt-BR', options)} (offline)`;performConversion();}// Perform the currency conversionfunction performConversion() {const amount = parseFloat(document.getElementById('currency-amount').value);const fromCurrency = document.getElementById('from-currency').value;const toCurrency = document.getElementById('to-currency').value;if (isNaN(amount)) {alert('Por favor, digite um valor válido');return;}if (fromCurrency === toCurrency) {convertedAmount.textContent = amount.toFixed(2);conversionRate.textContent = `1 ${fromCurrency} = 1 ${toCurrency}`;} else {// Convert via USD as base if needed (since free API often has USD as base)let rate;if (fromCurrency === 'BRL') {rate = exchangeRates[toCurrency];} else if (toCurrency === 'BRL') {rate = 1 / exchangeRates[fromCurrency];} else {// Convert fromCurrency -> BRL -> toCurrencyrate = (1 / exchangeRates[fromCurrency]) * exchangeRates[toCurrency];}const result = amount * rate;convertedAmount.textContent = result.toFixed(2);conversionRate.textContent = `1 ${fromCurrency} = ${rate.toFixed(6)} ${toCurrency}`;}currencyResult.classList.remove('hidden');}// Show loading statefunction showLoading(isLoading) {if (isLoading) {convertText.textContent = 'Buscando dados...';convertLoader.classList.remove('hidden');convertBtn.disabled = true;} else {convertText.textContent = 'Converter';convertLoader.classList.add('hidden');convertBtn.disabled = false;}}// Labor calculator logicconst laborType = document.getElementById('labor-type');const feriasFields = document.getElementById('ferias-fields');const rescisaoFields = document.getElementById('rescisao-fields');const aposentadoriaFields = document.getElementById('aposentadoria-fields');const calculateLaborBtn = document.getElementById('calculate-labor');const laborResult = document.getElementById('labor-result');const laborText = document.getElementById('labor-text');const laborLoader = document.getElementById('labor-loader');// Show/hide fields based on labor typelaborType.addEventListener('change', function() {resetLaborFields();const type = this.value;feriasFields.classList.add('hidden');rescisaoFields.classList.add('hidden');aposentadoriaFields.classList.add('hidden');if (type === 'ferias') {feriasFields.classList.remove('hidden');} else if (type === 'rescisao') {rescisaoFields.classList.remove('hidden');} else if (type === 'aposentadoria') {aposentadoriaFields.classList.remove('hidden');}});// Reset labor fieldsfunction resetLaborFields() {document.getElementById('ferias-details').classList.add('hidden');document.getElementById('rescisao-details').classList.add('hidden');document.getElementById('aposentadoria-details').classList.add('hidden');laborResult.classList.add('hidden');}// Format currencyfunction formatCurrency(value) {return new Intl.NumberFormat('pt-BR', { style: 'currency', currency: 'BRL' }).format(value);}// Calculate labor valuescalculateLaborBtn.addEventListener('click', function() {const type = laborType.value;const salary = parseFloat(document.getElementById('salary').value);if (isNaN(salary) || salary <= 0) {alert('Por favor, digite um salário válido');return;}showLaborLoading(true);// Simulate calculation delaysetTimeout(() => {if (type === 'ferias') {calculateFerias(salary);} else if (type === 'rescisao') {calculateRescisao(salary);} else if (type === 'aposentadoria') {calculateAposentadoria(salary);}showLaborLoading(false);laborResult.classList.remove('hidden');}, 500);});// Calculate fériasfunction calculateFerias(salary) {const serviceTime = parseInt(document.getElementById('service-time').value);const abono = parseInt(document.getElementById('abono').value);// Validate service time (1-12 months)const months = Math.min(Math.max(serviceTime, 1), 12);// Calculate proportional valueconst proportionalValue = (salary * months) / 12;// 1/3 of férias (constitutional right)const oneThird = proportionalValue / 3;// Abono pecuniário (optional 1/3 more)const abonoValue = abono ? proportionalValue / 3 : 0;// Total gross valueconst grossValue = proportionalValue + oneThird + abonoValue;// Calculate INSS (using 2024 rates)let inss = 0;if (grossValue <= 1412.00) {inss = grossValue * 0.075;} else if (grossValue <= 2666.68) {inss = (1412.00 * 0.075) + ((grossValue - 1412.00) * 0.09);} else if (grossValue <= 4000.03) {inss = (1412.00 * 0.075) + ((2666.68 - 1412.00) * 0.09) + ((grossValue - 2666.68) * 0.12);} else if (grossValue <= 7786.02) {inss = (1412.00 * 0.075) + ((2666.68 - 1412.00) * 0.09) + ((4000.03 - 2666.68) * 0.12) + ((grossValue - 4000.03) * 0.14);} else {inss = 7786.02 * 0.14;}// Calculate IRRF (using 2024 rates)const baseIR = grossValue - inss;let irrf = 0;if (baseIR <= 2112.00) {irrf = 0;} else if (baseIR <= 2826.65) {irrf = (baseIR * 0.075) - 158.40;} else if (baseIR <= 3751.05) {irrf = (baseIR * 0.15) - 370.40;} else if (baseIR <= 4664.68) {irrf = (baseIR * 0.225) - 651.73;} else {irrf = (baseIR * 0.275) - 884.96;}// Ensure IRRF is not negativeirrf = Math.max(irrf, 0);// Net valueconst netValue = grossValue - inss - irrf;// Update UIdocument.getElementById('labor-title').textContent = 'Cálculo de Férias';document.getElementById('gross-value').textContent = formatCurrency(grossValue);document.getElementById('discounts').textContent = formatCurrency(inss + irrf);document.getElementById('net-value').textContent = formatCurrency(netValue);// Show detailsdocument.getElementById('ferias-details').classList.remove('hidden');document.getElementById('rescisao-details').classList.add('hidden');document.getElementById('aposentadoria-details').classList.add('hidden');// Update detailsdocument.getElementById('one-third').textContent = formatCurrency(oneThird);document.getElementById('abono-value').textContent = formatCurrency(abonoValue);document.getElementById('inss-ferias').textContent = formatCurrency(inss);document.getElementById('irrf-ferias').textContent = formatCurrency(irrf);}// Calculate rescisãofunction calculateRescisao(salary) {const demissionType = document.getElementById('demission-type').value;const serviceYears = parseInt(document.getElementById('service-years').value);const avisoPrevio = document.getElementById('aviso-previo').value;const fgts = document.getElementById('fgts').value === '1';// Calculate proportional 13th salaryconst decimoTerceiro = (salary * serviceYears) / 12;// Calculate proportional vacation + 1/3const feriasProporcionais = (salary * serviceYears) / 12;const oneThirdFerias = feriasProporcionais / 3;// Calculate saldo de salário (assuming 1 month)const saldoSalario = salary;// Calculate aviso prévio (1 month salary)const avisoPrevioValue = avisoPrevio === 'indenizado' ? salary : 0;// Calculate FGTS + 40% multa (if applicable)let fgtsMulta = 0;if (fgts && demissionType === 'semJustaCausa') {// 8% of salary per year + 40% of total FGTSconst totalFGTS = salary * 0.08 * serviceYears;fgtsMulta = totalFGTS * 0.4;}// Calculate total based on demission typelet grossValue = 0;if (demissionType === 'semJustaCausa') {grossValue = saldoSalario + decimoTerceiro + feriasProporcionais + oneThirdFerias + avisoPrevioValue + fgtsMulta;} else if (demissionType === 'comJustaCausa') {grossValue = saldoSalario + decimoTerceiro + feriasProporcionais + oneThirdFerias;} else { // pedidoDemissaogrossValue = saldoSalario + decimoTerceiro + feriasProporcionais + oneThirdFerias;}// Calculate INSS (using 2024 rates)let inss = 0;if (grossValue <= 1412.00) {inss = grossValue * 0.075;} else if (grossValue <= 2666.68) {inss = (1412.00 * 0.075) + ((grossValue - 1412.00) * 0.09);} else if (grossValue <= 4000.03) {inss = (1412.00 * 0.075) + ((2666.68 - 1412.00) * 0.09) + ((grossValue - 2666.68) * 0.12);} else if (grossValue <= 7786.02) {inss = (1412.00 * 0.075) + ((2666.68 - 1412.00) * 0.09) + ((4000.03 - 2666.68) * 0.12) + ((grossValue - 4000.03) * 0.14);} else {inss = 7786.02 * 0.14;}// Calculate IRRF (using 2024 rates)const baseIR = grossValue - inss;let irrf = 0;if (baseIR <= 2112.00) {irrf = 0;} else if (baseIR <= 2826.65) {irrf = (baseIR * 0.075) - 158.40;} else if (baseIR <= 3751.05) {irrf = (baseIR * 0.15) - 370.40;} else if (baseIR <= 4664.68) {irrf = (baseIR * 0.225) - 651.73;} else {irrf = (baseIR * 0.275) - 884.96;}// Ensure IRRF is not negativeirrf = Math.max(irrf, 0);// Net valueconst netValue = grossValue - inss - irrf;// Update UIdocument.getElementById('labor-title').textContent = 'Cálculo de Rescisão';document.getElementById('gross-value').textContent = formatCurrency(grossValue);document.getElementById('discounts').textContent = formatCurrency(inss + irrf);document.getElementById('net-value').textContent = formatCurrency(netValue);// Show detailsdocument.getElementById('ferias-details').classList.add('hidden');document.getElementById('rescisao-details').classList.remove('hidden');document.getElementById('aposentadoria-details').classList.add('hidden');// Update detailsdocument.getElementById('saldo-salario').textContent = formatCurrency(saldoSalario);document.getElementById('ferias-proporcionais').textContent = formatCurrency(feriasProporcionais + oneThirdFerias);document.getElementById('decimo-terceiro').textContent = formatCurrency(decimoTerceiro);document.getElementById('aviso-previo-value').textContent = formatCurrency(avisoPrevioValue);document.getElementById('fgts-multa').textContent = formatCurrency(fgtsMulta);}// Calculate aposentadoriafunction calculateAposentadoria(salary) {const age = parseInt(document.getElementById('age').value);const contributionTime = parseInt(document.getElementById('contribution-time').value);const gender = document.getElementById('gender').value;const regime = document.getElementById('regime').value;// Calculate remaining time based on current rules (2024)let minAge, minContribution;if (regime === 'INSS') {// INSS rules (after 2019 reform)if (gender === 'masculino') {minAge = 65;minContribution = 20;} else {minAge = 62;minContribution = 15;}} else {// RPPS rules (more favorable for public servants)if (gender === 'masculino') {minAge = 60;minContribution = 25;} else {minAge = 55;minContribution = 20;}}const remainingAge = Math.max(0, minAge - age);const remainingContribution = Math.max(0, minContribution - contributionTime);const remainingTime = Math.max(remainingAge, remainingContribution);// Calculate estimated pension (average of last salaries with limit)const averageSalary = salary; // Simplified for this exampleconst pensionLimit = regime === 'INSS' ? 7786.02 : averageSalary * 0.8; // 80% for RPPSconst estimatedPension = Math.min(averageSalary, pensionLimit);// Update UIdocument.getElementById('labor-title').textContent = 'Cálculo de Aposentadoria';document.getElementById('gross-value').textContent = formatCurrency(estimatedPension);document.getElementById('discounts').textContent = formatCurrency(0); // No discounts in pensiondocument.getElementById('net-value').textContent = formatCurrency(estimatedPension);// Show detailsdocument.getElementById('ferias-details').classList.add('hidden');document.getElementById('rescisao-details').classList.add('hidden');document.getElementById('aposentadoria-details').classList.remove('hidden');// Update detailsdocument.getElementById('remaining-time').textContent = `${remainingTime} anos`;document.getElementById('min-age').textContent = `${minAge} anos`;document.getElementById('min-contribution').textContent = `${minContribution} anos`;document.getElementById('estimated-pension').textContent = formatCurrency(estimatedPension);}// Show loading state for labor calculatorfunction showLaborLoading(isLoading) {if (isLoading) {laborText.textContent = 'Calculando...';laborLoader.classList.remove('hidden');calculateLaborBtn.disabled = true;} else {laborText.textContent = 'Calcular';laborLoader.classList.add('hidden');calculateLaborBtn.disabled = false;}}// Event listenersconvertBtn.addEventListener('click', performConversion);refreshRates.addEventListener('click', fetchExchangeRates);// When currency inputs change, update conversiondocument.getElementById('currency-amount').addEventListener('input', performConversion);document.getElementById('from-currency').addEventListener('change', performConversion);document.getElementById('to-currency').addEventListener('change', performConversion);// Keyboard supportdocument.addEventListener('keydown', (e) => {if (standardCalc.classList.contains('hidden')) return;if (e.key >= '0' && e.key <= '9') {appendNumber(e.key);} else if (e.key === '.') {appendDecimal();} else if (e.key === '+' || e.key === '-' || e.key === '*' || e.key === '/') {appendOperator(e.key);} else if (e.key === 'Enter' || e.key === '=') {calculate();} else if (e.key === 'Escape') {clearAll();} else if (e.key === 'Backspace') {if (currentInput.length === 1) {currentInput = '0';} else {currentInput = currentInput.slice(0, -1);}updateDisplay();} else if (e.key === '%') {percentage();}});</script><p style="border-radius: 8px; text-align: center; font-size: 12px; color: #fff; margin-top: 16px;position: fixed; left: 8px; bottom: 8px; z-index: 10; background: rgba(0, 0, 0, 0.8); padding: 4px 8px;">Made with <img src="https://enzostvs-deepsite.hf.space/logo.svg" alt="DeepSite Logo" style="width: 16px; height: 16px; vertical-align: middle;display:inline-block;margin-right:3px;filter:brightness(0) invert(1);"><a href="https://enzostvs-deepsite.hf.space" style="color: #fff;text-decoration: underline;" target="_blank" >DeepSite</a> - 🧬 <a href="https://enzostvs-deepsite.hf.space?remix=vikingrancoroso/meus-estudos" style="color: #fff;text-decoration: underline;" target="_blank" >Remix</a></p></body></html>
123adicione também cálculos trabalhistas, como simulaçÃO de férias, demissão, aposentadoria de acordo com as regras brasileiras atualizadasAdicione essa imagem https://drive.google.com/file/d/10aKazr1szDD8wQux_paD_asbPifq8dmL/view?usp=sharing no topo do site, ligo acima do texto TECHCALC PROAltere a imagem enviada anteriormente para essa https://raw.githubusercontent.com/DiegoShadow/meu-lab-devops/refs/heads/main/DevDog.pngREADME.md+7-5
index.html+1069-19
prompts.txtAdded+3