@jjlmoya/utils-finance 1.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (133) hide show
  1. package/package.json +64 -0
  2. package/src/category/i18n/en.ts +159 -0
  3. package/src/category/i18n/es.ts +159 -0
  4. package/src/category/i18n/fr.ts +159 -0
  5. package/src/category/index.ts +24 -0
  6. package/src/category/seo.astro +15 -0
  7. package/src/components/PreviewNavSidebar.astro +116 -0
  8. package/src/components/PreviewToolbar.astro +143 -0
  9. package/src/data.ts +11 -0
  10. package/src/env.d.ts +5 -0
  11. package/src/index.ts +32 -0
  12. package/src/layouts/PreviewLayout.astro +117 -0
  13. package/src/pages/[locale]/[slug].astro +146 -0
  14. package/src/pages/[locale].astro +251 -0
  15. package/src/pages/index.astro +4 -0
  16. package/src/tests/faq_count.test.ts +19 -0
  17. package/src/tests/locale_completeness.test.ts +39 -0
  18. package/src/tests/mocks/astro_mock.js +2 -0
  19. package/src/tests/no_h1_in_components.test.ts +48 -0
  20. package/src/tests/schemas_fulfillment.test.ts +23 -0
  21. package/src/tests/seo_length.test.ts +23 -0
  22. package/src/tests/title_quality.test.ts +55 -0
  23. package/src/tests/tool_validation.test.ts +17 -0
  24. package/src/tool/compoundInterest/bibliography.astro +14 -0
  25. package/src/tool/compoundInterest/component.astro +697 -0
  26. package/src/tool/compoundInterest/i18n/en.ts +212 -0
  27. package/src/tool/compoundInterest/i18n/es.ts +212 -0
  28. package/src/tool/compoundInterest/i18n/fr.ts +212 -0
  29. package/src/tool/compoundInterest/index.ts +34 -0
  30. package/src/tool/compoundInterest/logic.ts +40 -0
  31. package/src/tool/compoundInterest/seo.astro +14 -0
  32. package/src/tool/compoundInterest/ui.ts +19 -0
  33. package/src/tool/courtFeeCalculator/bibliography.astro +14 -0
  34. package/src/tool/courtFeeCalculator/component.astro +427 -0
  35. package/src/tool/courtFeeCalculator/i18n/en.ts +268 -0
  36. package/src/tool/courtFeeCalculator/i18n/es.ts +268 -0
  37. package/src/tool/courtFeeCalculator/i18n/fr.ts +268 -0
  38. package/src/tool/courtFeeCalculator/index.ts +33 -0
  39. package/src/tool/courtFeeCalculator/logic.ts +86 -0
  40. package/src/tool/courtFeeCalculator/seo.astro +14 -0
  41. package/src/tool/courtFeeCalculator/ui.ts +31 -0
  42. package/src/tool/debtSnowball/bibliography.astro +14 -0
  43. package/src/tool/debtSnowball/component.astro +1052 -0
  44. package/src/tool/debtSnowball/i18n/en.ts +288 -0
  45. package/src/tool/debtSnowball/i18n/es.ts +288 -0
  46. package/src/tool/debtSnowball/i18n/fr.ts +288 -0
  47. package/src/tool/debtSnowball/index.ts +37 -0
  48. package/src/tool/debtSnowball/logic.ts +156 -0
  49. package/src/tool/debtSnowball/seo.astro +14 -0
  50. package/src/tool/debtSnowball/ui.ts +49 -0
  51. package/src/tool/fireCalculator/bibliography.astro +14 -0
  52. package/src/tool/fireCalculator/component.astro +689 -0
  53. package/src/tool/fireCalculator/i18n/en.ts +261 -0
  54. package/src/tool/fireCalculator/i18n/es.ts +261 -0
  55. package/src/tool/fireCalculator/i18n/fr.ts +261 -0
  56. package/src/tool/fireCalculator/index.ts +33 -0
  57. package/src/tool/fireCalculator/logic.ts +108 -0
  58. package/src/tool/fireCalculator/seo.astro +14 -0
  59. package/src/tool/fireCalculator/ui.ts +33 -0
  60. package/src/tool/ibanBicSwiftConverter/bibliography.astro +14 -0
  61. package/src/tool/ibanBicSwiftConverter/component.astro +581 -0
  62. package/src/tool/ibanBicSwiftConverter/i18n/en.ts +167 -0
  63. package/src/tool/ibanBicSwiftConverter/i18n/es.ts +216 -0
  64. package/src/tool/ibanBicSwiftConverter/i18n/fr.ts +167 -0
  65. package/src/tool/ibanBicSwiftConverter/index.ts +33 -0
  66. package/src/tool/ibanBicSwiftConverter/logic.ts +101 -0
  67. package/src/tool/ibanBicSwiftConverter/seo.astro +14 -0
  68. package/src/tool/ibanBicSwiftConverter/ui.ts +17 -0
  69. package/src/tool/inflation/bibliography.astro +14 -0
  70. package/src/tool/inflation/component.astro +400 -0
  71. package/src/tool/inflation/i18n/en.ts +301 -0
  72. package/src/tool/inflation/i18n/es.ts +301 -0
  73. package/src/tool/inflation/i18n/fr.ts +301 -0
  74. package/src/tool/inflation/index.ts +34 -0
  75. package/src/tool/inflation/logic.ts +92 -0
  76. package/src/tool/inflation/seo.astro +14 -0
  77. package/src/tool/inflation/ui.ts +17 -0
  78. package/src/tool/lateInterest/bibliography.astro +14 -0
  79. package/src/tool/lateInterest/component.astro +655 -0
  80. package/src/tool/lateInterest/i18n/en.ts +255 -0
  81. package/src/tool/lateInterest/i18n/es.ts +224 -0
  82. package/src/tool/lateInterest/i18n/fr.ts +224 -0
  83. package/src/tool/lateInterest/index.ts +34 -0
  84. package/src/tool/lateInterest/logic.ts +89 -0
  85. package/src/tool/lateInterest/seo.astro +14 -0
  86. package/src/tool/lateInterest/ui.ts +33 -0
  87. package/src/tool/legalInterestRate/bibliography.astro +14 -0
  88. package/src/tool/legalInterestRate/component.astro +650 -0
  89. package/src/tool/legalInterestRate/i18n/en.ts +159 -0
  90. package/src/tool/legalInterestRate/i18n/es.ts +159 -0
  91. package/src/tool/legalInterestRate/i18n/fr.ts +159 -0
  92. package/src/tool/legalInterestRate/index.ts +33 -0
  93. package/src/tool/legalInterestRate/logic.ts +29 -0
  94. package/src/tool/legalInterestRate/seo.astro +14 -0
  95. package/src/tool/legalInterestRate/ui.ts +23 -0
  96. package/src/tool/lotteryOptimizer/bibliography.astro +14 -0
  97. package/src/tool/lotteryOptimizer/component.astro +863 -0
  98. package/src/tool/lotteryOptimizer/i18n/en.ts +188 -0
  99. package/src/tool/lotteryOptimizer/i18n/es.ts +281 -0
  100. package/src/tool/lotteryOptimizer/i18n/fr.ts +188 -0
  101. package/src/tool/lotteryOptimizer/index.ts +33 -0
  102. package/src/tool/lotteryOptimizer/logic.ts +133 -0
  103. package/src/tool/lotteryOptimizer/seo.astro +14 -0
  104. package/src/tool/lotteryOptimizer/ui.ts +33 -0
  105. package/src/tool/mortgage/bibliography.astro +14 -0
  106. package/src/tool/mortgage/component.astro +1030 -0
  107. package/src/tool/mortgage/i18n/en.ts +227 -0
  108. package/src/tool/mortgage/i18n/es.ts +227 -0
  109. package/src/tool/mortgage/i18n/fr.ts +227 -0
  110. package/src/tool/mortgage/index.ts +34 -0
  111. package/src/tool/mortgage/logic.ts +118 -0
  112. package/src/tool/mortgage/seo.astro +14 -0
  113. package/src/tool/mortgage/ui.ts +35 -0
  114. package/src/tool/percentageCalculator/bibliography.astro +14 -0
  115. package/src/tool/percentageCalculator/component.astro +640 -0
  116. package/src/tool/percentageCalculator/i18n/en.ts +233 -0
  117. package/src/tool/percentageCalculator/i18n/es.ts +233 -0
  118. package/src/tool/percentageCalculator/i18n/fr.ts +233 -0
  119. package/src/tool/percentageCalculator/index.ts +34 -0
  120. package/src/tool/percentageCalculator/logic.ts +48 -0
  121. package/src/tool/percentageCalculator/seo.astro +14 -0
  122. package/src/tool/percentageCalculator/ui.ts +30 -0
  123. package/src/tool/rentIncreaseCalculator/bibliography.astro +14 -0
  124. package/src/tool/rentIncreaseCalculator/component.astro +587 -0
  125. package/src/tool/rentIncreaseCalculator/i18n/en.ts +159 -0
  126. package/src/tool/rentIncreaseCalculator/i18n/es.ts +220 -0
  127. package/src/tool/rentIncreaseCalculator/i18n/fr.ts +159 -0
  128. package/src/tool/rentIncreaseCalculator/index.ts +33 -0
  129. package/src/tool/rentIncreaseCalculator/logic.ts +43 -0
  130. package/src/tool/rentIncreaseCalculator/seo.astro +14 -0
  131. package/src/tool/rentIncreaseCalculator/ui.ts +19 -0
  132. package/src/tools.ts +16 -0
  133. package/src/types.ts +74 -0
@@ -0,0 +1,233 @@
1
+ import type { WithContext, FAQPage, HowTo, SoftwareApplication } from 'schema-dts';
2
+ import type { ToolLocaleContent } from '../../../types';
3
+ import type { PercentageCalculatorUI } from '../ui';
4
+
5
+ const slug = 'percentage-calculator';
6
+ const title = 'Percentage Calculator: 4 in 1 for Discounts, Tax and Markups';
7
+ const description =
8
+ 'Calculate percentages online for free. 4 tools in 1 to find X% of Y, percentage difference, add or subtract VAT, discounts and tip calculations automatically.';
9
+
10
+ const faqData = [
11
+ {
12
+ question: 'How does the calculator work?',
13
+ answer:
14
+ 'Simply type the values in the fields of the use case that matches your problem and our calculator processes the formula without needing to press a calculate button.',
15
+ },
16
+ {
17
+ question: 'Is it valid for calculating VAT or taxes?',
18
+ answer:
19
+ 'Yes, Case 4 (Add or subtract percentage) is designed precisely for cases like applying a 21% VAT to a base price or calculating negative income tax.',
20
+ },
21
+ {
22
+ question: 'Does it handle decimals and negative numbers?',
23
+ answer:
24
+ 'Of course. You can enter decimal numbers (using a period) and it will also work with negative values if you need to analyze accounting balances in losses.',
25
+ },
26
+ {
27
+ question: 'Can I copy the results?',
28
+ answer:
29
+ 'Yes, each case has a button in the result box that instantly copies the number to your device\'s clipboard so you can paste it in another app or document.',
30
+ },
31
+ ];
32
+
33
+ const howToData = [
34
+ {
35
+ name: 'Identify your math problem',
36
+ text: 'Read the titles of the 4 cases and choose the one that matches what you want to know (Ex. What is 20% of 50? → Case 1).',
37
+ },
38
+ {
39
+ name: 'Enter the numbers',
40
+ text: 'Fill in the X and Y fields. Do not worry about the order, the text of each case guides you visually.',
41
+ },
42
+ {
43
+ name: 'Copy the instant result',
44
+ text: 'The number will appear in real time below as you type. Click the copy icon if you want to take it elsewhere.',
45
+ },
46
+ ];
47
+
48
+ const faqSchema: WithContext<FAQPage> = {
49
+ '@context': 'https://schema.org',
50
+ '@type': 'FAQPage',
51
+ mainEntity: faqData.map((item) => ({
52
+ '@type': 'Question',
53
+ name: item.question,
54
+ acceptedAnswer: { '@type': 'Answer', text: item.answer },
55
+ })),
56
+ };
57
+
58
+ const howToSchema: WithContext<HowTo> = {
59
+ '@context': 'https://schema.org',
60
+ '@type': 'HowTo',
61
+ name: title,
62
+ description,
63
+ step: howToData.map((step, i) => ({
64
+ '@type': 'HowToStep',
65
+ position: i + 1,
66
+ name: step.name,
67
+ text: step.text,
68
+ })),
69
+ };
70
+
71
+ const appSchema: WithContext<SoftwareApplication> = {
72
+ '@context': 'https://schema.org',
73
+ '@type': 'SoftwareApplication',
74
+ name: title,
75
+ description,
76
+ applicationCategory: 'FinanceApplication',
77
+ operatingSystem: 'All',
78
+ offers: { '@type': 'Offer', price: '0', priceCurrency: 'USD' },
79
+ inLanguage: 'en',
80
+ };
81
+
82
+ export const content: ToolLocaleContent<PercentageCalculatorUI> = {
83
+ slug,
84
+ title,
85
+ description,
86
+ faqTitle: 'Frequently Asked Questions',
87
+ faq: faqData,
88
+ bibliographyTitle: 'Sources & References',
89
+ bibliography: [
90
+ {
91
+ name: 'Percentage Calculation: Wikipedia',
92
+ url: 'https://en.wikipedia.org/wiki/Percentage',
93
+ },
94
+ {
95
+ name: 'Basic Math Concepts: Khan Academy',
96
+ url: 'https://www.khanacademy.org/math/pre-algebra',
97
+ },
98
+ {
99
+ name: 'IRS: Tax Guide and Calculation Methods',
100
+ url: 'https://www.irs.gov/',
101
+ },
102
+ ],
103
+ howTo: howToData,
104
+ schemas: [faqSchema, howToSchema, appSchema],
105
+ seo: [
106
+ {
107
+ type: 'title',
108
+ text: '4-in-1 Percentage Calculator: Master Quick Calculations',
109
+ level: 2,
110
+ },
111
+ {
112
+ type: 'title',
113
+ text: 'Why You Need a Multi-Purpose Percentage Calculator',
114
+ level: 3,
115
+ },
116
+ {
117
+ type: 'paragraph',
118
+ html: 'Calculating percentages is one of the most common mathematical operations in our daily lives. From figuring out discounts during a sale, to calculating the right tip at a restaurant, determining profit margins in business, or understanding loan interest. Despite being everyday operations, it\'s not always easy to do them mentally or remember the exact formula.',
119
+ },
120
+ {
121
+ type: 'paragraph',
122
+ html: 'Our 4-in-1 percentage calculator bundles the most common scenarios you\'ll face. No more searching Google for "how to calculate 20 percent" or "percentage formula." You have all four essential operations in one place, interactive and with instant results.',
123
+ },
124
+ {
125
+ type: 'title',
126
+ text: 'Exploring the 4 Most Common Use Cases',
127
+ level: 3,
128
+ },
129
+ {
130
+ type: 'paragraph',
131
+ html: 'To make your life easier, we\'ve separated the tool into four clear visual blocks that solve real-world problems you encounter daily:',
132
+ },
133
+ {
134
+ type: 'card',
135
+ icon: 'mdi:percent',
136
+ title: '1. What is X% of Y?',
137
+ html: '<p><strong>The classic case.</strong> Perfect for calculating discounts or tips. If you want to know what 15% of $120 is, this is your tool. The underlying formula simply divides the percentage by 100 and multiplies it by the total value.</p>',
138
+ },
139
+ {
140
+ type: 'card',
141
+ icon: 'mdi:division',
142
+ title: '2. What Percentage is X of Y?',
143
+ html: '<p><strong>Ideal for proportions.</strong> If you scored 45 points on a 60-point exam, what\'s your percentage score? This function divides the part by the total and multiplies by 100, giving you the exact relative weight.</p>',
144
+ },
145
+ {
146
+ type: 'card',
147
+ icon: 'mdi:chart-line-variant',
148
+ title: '3. Percentage Increase or Decrease',
149
+ html: '<p><strong>Perfect for finance and analytics.</strong> How much has your rent increased since last year? If you paid $800 before and $840 now, this function tells you it\'s a 5% increase. It measures growth or decline between two numbers.</p>',
150
+ },
151
+ {
152
+ type: 'card',
153
+ icon: 'mdi:calculator',
154
+ title: '4. Add or Subtract Percentage from a Value',
155
+ html: '<p><strong>Super useful for sales tax.</strong> If you have a base price (e.g., $100) and need to add 8.5% sales tax, this calculator gives you the $108.50 final total instantly without intermediate steps. Similarly, it works for applying discounts directly (e.g., subtract 20%).</p>',
156
+ },
157
+ {
158
+ type: 'title',
159
+ text: 'Common Myths About Percentage Calculations',
160
+ level: 3,
161
+ },
162
+ {
163
+ type: 'paragraph',
164
+ html: 'We often get stuck when we see large percentages or decimals, but there are some math "tricks" that can make your life easier. The most famous is <strong>percentage reversibility</strong>.',
165
+ },
166
+ {
167
+ type: 'tip',
168
+ title: 'The Reversibility Trick',
169
+ html: '<p>Did you know that X% of Y equals Y% of X exactly? For example, if you\'re asked to calculate 18% of 50 in your head, it sounds complicated. But flip it around—50% of 18 is easy: it\'s 9! This works for absolutely any numbers and is an amazing lifesaver in daily calculations.</p>',
170
+ },
171
+ {
172
+ type: 'title',
173
+ text: 'Why We Fail at Calculating Growth',
174
+ level: 3,
175
+ },
176
+ {
177
+ type: 'paragraph',
178
+ html: 'One of the most common mistakes happens in Case 3: percentage increase or decrease. Imagine a stock costs $100, drops 50%, and then rises 50% the next day. Your intuition says it\'s back to $100, but it\'s not.',
179
+ },
180
+ {
181
+ type: 'paragraph',
182
+ html: 'If it drops 50% from $100, the new value is $50. If it then rises 50% from that $50, the gain is half of $50 (which is $25). So the final price is $75. This classic example shows why percentage increases and decreases aren\'t symmetrical, and why dynamic calculators like this prevent serious financial mistakes.',
183
+ },
184
+ {
185
+ type: 'title',
186
+ text: 'Professional and Academic Use',
187
+ level: 3,
188
+ },
189
+ {
190
+ type: 'paragraph',
191
+ html: 'Our interface is distraction-free and designed to <strong>work fast</strong>. Pin it as a browser tab, quickly tab between fields, and use the copy button next to results to transfer exact figures to Excel or Google Sheets without typo risk.',
192
+ },
193
+ {
194
+ type: 'list',
195
+ items: [
196
+ 'E-commerce and retail stores: Quick calculation of retail prices by applying profit margins and sales tax.',
197
+ 'Human resources: Determining wage gaps, tax withholdings, and salary increases tied to inflation.',
198
+ 'Higher education: Teachers grading curves or STEM students analyzing experimental deviation.',
199
+ 'Digital marketing: Measuring CTR (Click Through Rate), ROAS (Return on Ad Spend), or eCommerce conversion rates.',
200
+ ],
201
+ },
202
+ ],
203
+ ui: {
204
+ labelTitle: 'Percentage Calculator',
205
+ labelCase1Title: 'Case 1',
206
+ labelCase1Question: 'What is X% of Y?',
207
+ labelCase1Placeholder1: 'X',
208
+ labelCase1Placeholder2: 'Y',
209
+ labelCase1Formula: 'Formula: (X / 100) × Y',
210
+ labelCase2Title: 'Case 2',
211
+ labelCase2Question: 'What percentage is X of Y?',
212
+ labelCase2Placeholder1: 'X',
213
+ labelCase2Placeholder2: 'Y',
214
+ labelCase2Formula: 'Formula: (X / Y) × 100',
215
+ labelCase3Title: 'Case 3',
216
+ labelCase3Question: 'Percentage difference between two values',
217
+ labelCase3Placeholder1: 'Value 1',
218
+ labelCase3Placeholder2: 'Value 2',
219
+ labelCase3Formula: 'Formula: ((Value 2 - Value 1) / |Value 1|) × 100',
220
+ labelCase4Title: 'Case 4',
221
+ labelCase4Question: 'Add or subtract a percentage to a value',
222
+ labelCase4Placeholder1: 'Value',
223
+ labelCase4Placeholder2: '%',
224
+ labelCase4Formula: 'Formula: Value ± (Value × (% / 100))',
225
+ labelCase4AddLabel: 'Add (Value + %)',
226
+ labelCase4SubtractLabel: 'Subtract (Value - %)',
227
+ labelResult: 'Result',
228
+ labelDifference: 'Difference',
229
+ labelCopyTooltip: 'Copy result',
230
+ labelFormula: 'Formula',
231
+ percentSymbol: '%',
232
+ },
233
+ };
@@ -0,0 +1,233 @@
1
+ import type { WithContext, FAQPage, HowTo, SoftwareApplication } from 'schema-dts';
2
+ import type { ToolLocaleContent } from '../../../types';
3
+ import type { PercentageCalculatorUI } from '../ui';
4
+
5
+ const slug = 'calculadora-porcentajes';
6
+ const title = 'Calculadora de Porcentajes 4 en 1: Descuentos, Subidas y Rebajas';
7
+ const description =
8
+ 'Calcula fácilmente porcentajes online gratis. 4 herramientas en 1 para sacar el X% de Y, diferencia porcentual, sumar o restar IVA, rebajas y propinas automáticas.';
9
+
10
+ const faqData = [
11
+ {
12
+ question: '¿Cómo funciona la calculadora?',
13
+ answer:
14
+ 'Simplemente escribe los valores en los cuadros del caso de uso correspondiente a tu problema y nuestra calculadora procesa la fórmula sin necesidad de apretar ningún botón de calcular.',
15
+ },
16
+ {
17
+ question: '¿Es válida para calcular el IVA o impuestos?',
18
+ answer:
19
+ 'Sí, el bloque 4 (\'Sumar o restar porcentaje\') está diseñado precisamente para casos como aplicar un IVA del 21% a un precio base o calcular un IRPF negativo.',
20
+ },
21
+ {
22
+ question: '¿Maneja números decimales y negativos?',
23
+ answer:
24
+ 'Por supuesto. Puedes introducir números decimales (utilizando punto) y también funcionará con valores negativos si necesitas analizar balances contables en pérdidas.',
25
+ },
26
+ {
27
+ question: '¿Puedo copiar los resultados?',
28
+ answer:
29
+ 'Sí, cada bloque cuenta con un botón en el recuadro del resultado que copia instantáneamente la cifra al portapapeles de tu dispositivo para poder pegarla en otra app o documento.',
30
+ },
31
+ ];
32
+
33
+ const howToData = [
34
+ {
35
+ name: 'Identifica tu problema matemático',
36
+ text: 'Lee los títulos de los 4 bloques y elige el que coincida con lo que quieres saber (Ej. ¿Cuánto es el 20% de 50? -> Bloque 1).',
37
+ },
38
+ {
39
+ name: 'Introduce las cifras',
40
+ text: 'Rellena los campos \'X\' e \'Y\'. No te preocupes por el orden, la frase de cada bloque te guía visualmente.',
41
+ },
42
+ {
43
+ name: 'Copia el resultado instantáneo',
44
+ text: 'La cifra aparecerá en tiempo real abajo a medida que escribes. Pulsa el icono de copiar si deseas llevártelo a otra parte.',
45
+ },
46
+ ];
47
+
48
+ const faqSchema: WithContext<FAQPage> = {
49
+ '@context': 'https://schema.org',
50
+ '@type': 'FAQPage',
51
+ mainEntity: faqData.map((item) => ({
52
+ '@type': 'Question',
53
+ name: item.question,
54
+ acceptedAnswer: { '@type': 'Answer', text: item.answer },
55
+ })),
56
+ };
57
+
58
+ const howToSchema: WithContext<HowTo> = {
59
+ '@context': 'https://schema.org',
60
+ '@type': 'HowTo',
61
+ name: title,
62
+ description,
63
+ step: howToData.map((step, i) => ({
64
+ '@type': 'HowToStep',
65
+ position: i + 1,
66
+ name: step.name,
67
+ text: step.text,
68
+ })),
69
+ };
70
+
71
+ const appSchema: WithContext<SoftwareApplication> = {
72
+ '@context': 'https://schema.org',
73
+ '@type': 'SoftwareApplication',
74
+ name: title,
75
+ description,
76
+ applicationCategory: 'FinanceApplication',
77
+ operatingSystem: 'All',
78
+ offers: { '@type': 'Offer', price: '0', priceCurrency: 'EUR' },
79
+ inLanguage: 'es',
80
+ };
81
+
82
+ export const content: ToolLocaleContent<PercentageCalculatorUI> = {
83
+ slug,
84
+ title,
85
+ description,
86
+ faqTitle: 'Preguntas Frecuentes',
87
+ faq: faqData,
88
+ bibliographyTitle: 'Fuentes y Referencias',
89
+ bibliography: [
90
+ {
91
+ name: 'Cálculo de Porcentajes - Wikipedia',
92
+ url: 'https://es.wikipedia.org/wiki/Porcentaje',
93
+ },
94
+ {
95
+ name: 'Conceptos Matemáticos Básicos - Khan Academy',
96
+ url: 'https://es.khanacademy.org/math/pre-algebra/pre-algebra-ratios-rates/pre-algebra-percents/v/describing-the-meaning-of-percent',
97
+ },
98
+ {
99
+ name: 'Guía de la AEAT para tipos impositivos en España (IVA)',
100
+ url: 'https://sede.agenciatributaria.gob.es/',
101
+ },
102
+ ],
103
+ howTo: howToData,
104
+ schemas: [faqSchema, howToSchema, appSchema],
105
+ seo: [
106
+ {
107
+ type: 'title',
108
+ text: 'Calculadora de Porcentajes 4 en 1: Domina los Cálculos Rápidos',
109
+ level: 2,
110
+ },
111
+ {
112
+ type: 'title',
113
+ text: '¿Para qué sirve una calculadora de porcentajes múltiple?',
114
+ level: 3,
115
+ },
116
+ {
117
+ type: 'paragraph',
118
+ html: 'Calcular porcentajes es una de las operaciones matemáticas más comunes en nuestro día a día. Desde calcular el descuento en unas rebajas, conocer la propina adecuada en un restaurante, hasta determinar el margen de beneficio en un negocio o el interés de un préstamo. A pesar de ser operaciones cotidianas, no siempre es fácil realizarlas mentalmente o recordar la fórmula exacta.',
119
+ },
120
+ {
121
+ type: 'paragraph',
122
+ html: 'Nuestra calculadora de porcentajes 4 en 1 agrupa los escenarios más demandados. Ya no necesitas buscar en Google "cómo sacar el 20 por ciento" o "fórmula para cálculo de porcentaje". Tienes las cuatro operaciones esenciales en un solo lugar, de forma interactiva y con resultados instantáneos.',
123
+ },
124
+ {
125
+ type: 'title',
126
+ text: 'Revisando los 4 casos de uso más habituales',
127
+ level: 3,
128
+ },
129
+ {
130
+ type: 'paragraph',
131
+ html: 'Para facilitarte la vida, hemos separado la herramienta en cuatro bloques visuales claros que resuelven los problemas reales a los que nos enfrentamos a diario:',
132
+ },
133
+ {
134
+ type: 'card',
135
+ icon: 'mdi:percent',
136
+ title: '1. ¿Cuánto es el X% de Y?',
137
+ html: '<p><strong>El caso clásico.</strong> Útil para calcular descuentos o propinas. Si quieres saber cuánto es el 15% de 120€, esta es tu herramienta. La fórmula subyacente simplemente divide el porcentaje entre 100 y lo multiplica por el valor total.</p>',
138
+ },
139
+ {
140
+ type: 'card',
141
+ icon: 'mdi:division',
142
+ title: '2. ¿Qué porcentaje es X de Y?',
143
+ html: '<p><strong>Ideal para proporciones.</strong> Si has sacado 45 puntos en un examen de 60, ¿qué nota tienes sobre 100? Esta función divide la parte entre el total y lo multiplica por cien, dándote el peso relativo exacto.</p>',
144
+ },
145
+ {
146
+ type: 'card',
147
+ icon: 'mdi:chart-line-variant',
148
+ title: '3. Aumento o Disminución Porcentual',
149
+ html: '<p><strong>Perfecto para finanzas y analítica.</strong> ¿Cuánto ha subido el alquiler desde el año pasado? Si antes pagabas 800€ y ahora 840€, esta función te dirá que has sufrido un aumento del 5%. Mide el crecimiento o decrecimiento entre dos cifras.</p>',
150
+ },
151
+ {
152
+ type: 'card',
153
+ icon: 'mdi:calculator',
154
+ title: '4. Sumar o Restar porcentaje a un valor',
155
+ html: '<p><strong>Súper útil para el IVA.</strong> Si tienes un precio base (ej. 100€) y necesitas añadirle el 21% de IVA, esta calculadora te dará directamente los 121€ finales sin tener que hacer operaciones intermedias. De igual forma, sirve para aplicar un descuento directo (ej. restar un 20%).</p>',
156
+ },
157
+ {
158
+ type: 'title',
159
+ text: 'Mitos comunes sobre el cálculo de porcentajes',
160
+ level: 3,
161
+ },
162
+ {
163
+ type: 'paragraph',
164
+ html: 'A menudo nos bloqueamos al ver porcentajes grandes o decimales, pero hay algunos "trucos" matemáticos que pueden hacerte la vida más fácil. El más famoso es la <strong>reversibilidad de los porcentajes</strong>.',
165
+ },
166
+ {
167
+ type: 'tip',
168
+ title: 'El truco de la reversibilidad',
169
+ html: '<p>¿Sabías que el X% de Y es exactamente igual al Y% de X? Por ejemplo, si te piden calcular el 18% de 50 mentalmente, puede sonar complicado. Pero si lo inviertes, el 50% de 18 es muy fácil: ¡es 9! Esto aplica para absolutamente cualquier número y es un salvavidas asombroso en el día a día.</p>',
170
+ },
171
+ {
172
+ type: 'title',
173
+ text: 'Por qué fallamos al calcular crecimientos',
174
+ level: 3,
175
+ },
176
+ {
177
+ type: 'paragraph',
178
+ html: 'Uno de los errores más comunes ocurre en el caso 3: el aumento o disminución porcentual. Imaginemos que una acción en bolsa cuesta 100€, baja un 50% y al día siguiente sube un 50%. La intuición nos dice que vuelve a valer 100€, pero es incorrecto.',
179
+ },
180
+ {
181
+ type: 'paragraph',
182
+ html: 'Si baja un 50% desde 100€, su nuevo valor es 50€. Si desde esos 50€ sube un 50%, el incremento es la mitad de 50 (25€). Por tanto, el precio final sería 75€. Este es un ejemplo clásico de por qué las subidas y bajadas porcentuales no son asimétricas y por qué calculadoras dinámicas como esta previenen errores financieros graves.',
183
+ },
184
+ {
185
+ type: 'title',
186
+ text: 'Uso profesional y académico',
187
+ level: 3,
188
+ },
189
+ {
190
+ type: 'paragraph',
191
+ html: 'Nuestra interfaz está libre de distracciones y diseñada para <strong>trabajar rápido</strong>. Puedes tenerla en una pestaña fijada del navegador, tabular ágilmente entre los distintos campos y, gracias al botón de copiar junto al resultado, trasladar el dato exacto a tu Excel o Google Sheets sin riesgo de errores de tipografía.',
192
+ },
193
+ {
194
+ type: 'list',
195
+ items: [
196
+ 'Comercio web y tiendas físicas: Cálculo rápido de PVP aplicando márgenes comerciales y sumando el IVA.',
197
+ 'Gestión de recursos humanos: Determinación de la brecha salarial, retenciones de IRPF y subidas de sueldo referenciadas al IPC.',
198
+ 'Educación universitaria: Profesores que nivelan calificaciones o estudiantes de ramas científicas analizando la desviación de sus experimentos.',
199
+ 'Marketing digital: Medición del CTR (Click Through Rate), ROAS (Retorno del Gasto Publicitario) o Conversion Rate en eCommerce.',
200
+ ],
201
+ },
202
+ ],
203
+ ui: {
204
+ labelTitle: 'Calculadora de Porcentajes',
205
+ labelCase1Title: 'Caso 1',
206
+ labelCase1Question: 'Cuánto es el X% de Y?',
207
+ labelCase1Placeholder1: 'X',
208
+ labelCase1Placeholder2: 'Y',
209
+ labelCase1Formula: 'Fórmula: (X / 100) × Y',
210
+ labelCase2Title: 'Caso 2',
211
+ labelCase2Question: 'Qué porcentaje es X de Y?',
212
+ labelCase2Placeholder1: 'X',
213
+ labelCase2Placeholder2: 'Y',
214
+ labelCase2Formula: 'Fórmula: (X / Y) × 100',
215
+ labelCase3Title: 'Caso 3',
216
+ labelCase3Question: 'Diferencia porcentual entre dos valores',
217
+ labelCase3Placeholder1: 'Valor 1',
218
+ labelCase3Placeholder2: 'Valor 2',
219
+ labelCase3Formula: 'Fórmula: ((Valor 2 - Valor 1) / |Valor 1|) × 100',
220
+ labelCase4Title: 'Caso 4',
221
+ labelCase4Question: 'Sumar o restar porcentaje a un valor',
222
+ labelCase4Placeholder1: 'Valor',
223
+ labelCase4Placeholder2: '%',
224
+ labelCase4Formula: 'Fórmula: Valor ± (Valor × (% / 100))',
225
+ labelCase4AddLabel: 'Suma (Valor + %)',
226
+ labelCase4SubtractLabel: 'Resta (Valor - %)',
227
+ labelResult: 'Resultado',
228
+ labelDifference: 'Diferencia',
229
+ labelCopyTooltip: 'Copiar resultado',
230
+ labelFormula: 'Fórmula',
231
+ percentSymbol: '%',
232
+ },
233
+ };