- Deprecated function: implode(): Passing glue string after array is deprecated. Swap the parameters in element_gva_column->render_content() (line 462 of themes/gavias_kunco/gva_content_builder/gva_column.php).
element_gva_column->render_content(Array, '
Urgent Appeal
Be a helping hand for them in
times of crisis
At "Wejdan Charity", we work with full transparency to deliver your donations to those in need in conflict and poverty-stricken areas.
<a href="/en/sadaqah-jariyah" class="frontheader-section__button frontheader-section__button--primary">
Charity Donations
</a>
<a href="/en/urgent-projects-en" class="frontheader-section__button frontheader-section__button--secondary">
Our Projects
</a>
') (Line: 110)
gavias_content_builder_render_element('gva_column', Array, '
Urgent Appeal
Be a helping hand for them in
times of crisis
At "Wejdan Charity", we work with full transparency to deliver your donations to those in need in conflict and poverty-stricken areas.
<a href="/en/sadaqah-jariyah" class="frontheader-section__button frontheader-section__button--primary">
Charity Donations
</a>
<a href="/en/urgent-projects-en" class="frontheader-section__button frontheader-section__button--secondary">
Our Projects
</a>
') (Line: 58)
gavias_content_builder_render_el(Array) (Line: 22)
gavias_content_builder_frontend('[{"settings":{"bg_particles":"off","bg_position":"center top","bg_repeat":"no-repeat","bg_attachment":"scroll","bg_size":"cover","style_space":"remove_padding","layout":"container-fw"},"columns":[{"settings":{"element":"gva_column","bg_position":"center top","bg_repeat":"no-repeat","bg_attachment":"scroll","bg_size":"cover","el_class":"front"},"col_lg":12,"elements":[{"settings":{"content":"\r\n \r\n \r\n \r\n \r\n Urgent Appeal\r\n \r\n Be a helping hand for them in\r\n times of crisis\r\n \r\n \r\n At \"Wejdan Charity\", we work with full transparency to deliver your donations to those in need in conflict and poverty-stricken areas.\r\n \r\n \r\n <a>\r\n Charity Donations \r\n </a>\r\n <a>\r\n Our Projects \r\n </a>\r\n \r\n \r\n \r\n \r\n","animate_delay":"0"},"editing":false,"element_name":"gva_text_noeditor"}],"editing":false,"element_name":"gva_column"}],"editing":false,"element_name":"gva_row"},{"settings":{"element":"gva_row","bg_particles":"off","bg_position":"center top","bg_repeat":"no-repeat","bg_attachment":"scroll","bg_size":"cover","style_space":"remove_padding","layout":"container","class":"before-help-region"},"columns":[{"settings":{"element":"gva_column"},"col_lg":12,"elements":[{"settings":{"title":"Take action for animals now","link":"#","button_title":"Donation Now","button_align":"button-right-v2","style_text":"text-light","style_button":"btn-theme","donorbox":"off","target":"off","el_class":"margin","animate":"fade-up","animate_delay":"0"},"editing":false,"element_name":"gva_call_to_action"}],"editing":false,"element_name":"gva_column"}],"editing":false,"element_name":"gva_row"},{"settings":{"element":"gva_row","bg_particles":"off","bg_position":"center top","bg_repeat":"no-repeat","bg_attachment":"scroll","bg_size":"cover","style_space":"remove_padding","layout":"container-fw","bg_color":"#f9fafb"},"columns":[{"settings":{"element":"gva_column","bg_position":"center top","bg_repeat":"no-repeat","bg_attachment":"scroll","bg_size":"cover","el_class":"about"},"col_lg":12,"elements":[{"settings":{"content":"\r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n \r\n \r\n Who We Are\r\n \r\n \r\n We plant hope.. \r\n and build people and the future\r\n \r\n \r\n Wejdan Charity is a leading humanitarian organization, founded with an ambitious vision to be a bridge of الخير between donors and those in need.\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n Development Stages\r\n A continuous journey of growth\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n Areas of Work\r\n We reach where the need is\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \"We work with passion to bring smiles\"\r\n \r\n \r\n \r\n \r\n \r\n","animate_delay":"0"},"editing":false,"element_name":"gva_text_noeditor"}],"editing":false,"element_name":"gva_column"}],"editing":false,"element_name":"gva_row"},{"settings":{"element":"gva_row","bg_particles":"off","bg_position":"center top","bg_repeat":"no-repeat","bg_attachment":"scroll","bg_size":"cover","style_space":"remove_margin remove_padding remove_padding_col","layout":"container-fw","class":"partner","margin_top":"30","margin_bottom":"30"},"columns":[{"settings":{"element":"gva_column"},"col_lg":12,"elements":[{"settings":{"content":"\r\n\r\n \r\n \r\n Initiatives & Programs\r\n Our Areas of Work\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n Ongoing Charity\r\n Water wells, mosque construction\r\n \r\n \r\n \r\n \r\n \r\n \r\n Student Sponsorship\r\n Building the future through education\r\n \r\n \r\n \r\n \r\n \r\n \r\n Humanitarian Cases\r\n Patient treatment, surgeries\r\n \r\n \r\n \r\n \r\n \r\n \r\n Development Projects\r\n Empowering productive families\r\n \r\n \r\n<a>Learn more about our programs and initiatives</a>\r\n \r\n","animate_delay":"0"},"editing":false,"element_name":"gva_text_noeditor"}],"editing":false,"element_name":"gva_column"}],"editing":false,"element_name":"gva_row"},{"settings":{"element":"gva_row","bg_particles":"off","bg_position":"center top","bg_repeat":"no-repeat","bg_attachment":"scroll","bg_size":"cover","style_space":"remove_margin remove_padding remove_padding_col","layout":"container","class":"newsfront"},"columns":[{"settings":{"element":"gva_column"},"col_lg":12,"elements":[{"settings":{"content":"\r\n \r\n \r\n Our News\r\n \r\n \r\n \r\nNews that tells the story of giving \r\n \r\n","animate_delay":"0"},"editing":false,"element_name":"gva_text_noeditor"},{"settings":{"title_admin":"news: news Block -en","block_drupal":"views_block__news_block_3","hidden_title":"on","align_title":"title-align-left","remove_margin":"on","style_text":"text-dark","animate_delay":"0"},"editing":false,"element_name":"gva_drupal_block"}],"editing":false,"element_name":"gva_column"}],"editing":false,"element_name":"gva_row"},{"settings":{"bg_particles":"off","bg_position":"center top","bg_repeat":"no-repeat","bg_attachment":"scroll","bg_size":"cover","style_space":"remove_padding","layout":"container-fw","element":"gva_row","class":"sliderfrontpage"},"columns":[{"settings":{"element":"gva_column","bg_position":"center top","bg_repeat":"no-repeat","bg_attachment":"scroll","bg_size":"cover"},"col_lg":12,"elements":[{"settings":{"title_admin":"news: campigns-en","block_drupal":"views_block__news_block_5","hidden_title":"on","align_title":"title-align-right","remove_margin":"on","style_text":"text-dark","animate_delay":"0"},"editing":false,"element_name":"gva_drupal_block"}],"editing":false,"element_name":"gva_column"}],"editing":false,"element_name":"gva_row"},{"settings":{"element":"gva_row","bg_particles":"off","bg_position":"center top","bg_repeat":"no-repeat","bg_attachment":"scroll","bg_size":"cover","style_space":"remove_margin remove_padding remove_padding_col","layout":"container-fw","class":"partner"},"columns":[{"settings":{"element":"gva_column"},"col_lg":12,"elements":[{"settings":{"content":"\r\n \r\n \r\n \r\n Our Distinguished Projects\r\n \r\n \r\n \r\n At Wejdan Charity, we strive to provide support and assistance to communities in need who are affected by disasters, crises, and wars, with the aim of improving quality of life and promoting sustainable development. Our projects span across several areas:\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n Relief Projects\r\n Emergency response to disasters and wars, providing food and medicine.\r\n \r\n<a> Browse Projects </a>\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n Development Projects\r\n Empowering communities and building capacities.\r\n \r\n<a> Browse Projects </a>\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n Seasonal Projects\r\n Ramadan campaigns, Qurbani, and winter clothing.\r\n \r\n<a> Browse Projects </a>\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n Endowment Projects\r\n An investment for the hereafter—mosques, wells, and charitable endowments.\r\n<a> Browse Projects </a>\r\n \r\n \r\n \r\n \r\n","animate_delay":"0"},"editing":false,"element_name":"gva_text_noeditor"}],"editing":false,"element_name":"gva_column"}],"editing":false,"element_name":"gva_row"},{"settings":{"element":"gva_row","bg_particles":"off","bg_position":"center top","bg_repeat":"no-repeat","bg_attachment":"scroll","bg_size":"cover","style_space":"remove_margin remove_padding remove_padding_col","layout":"container-fw","class":"partner"},"columns":[{"settings":{"element":"gva_column"},"col_lg":12,"elements":[{"settings":{"content":"\r\n \r\n \r\n\r\n \r\n \r\n Our Achievements in Numbers\r\n Your trust makes the difference\r\n \r\n \r\n\r\n \r\n \r\n 0\r\n Beneficiaries worldwide\r\n \r\n \r\n \r\n 0\r\n Projects implemented\r\n \r\n \r\n \r\n 0\r\n Countries we operate in\r\n \r\n \r\n \r\n 0\r\n Volunteers\r\n \r\n \r\n \r\n \r\n\r\n\r\n// Enhanced counter animation for facts section\r\nfunction animateFactsCounters() {\r\n const statNumbers = document.querySelectorAll('.facts-section__stat-number');\r\n \r\n const observer = new IntersectionObserver((entries) => {\r\n entries.forEach(entry => {\r\n if (entry.isIntersecting) {\r\n const counter = entry.target;\r\n const target = parseInt(counter.getAttribute('data-target'));\r\n const duration = 2000;\r\n const increment = target / (duration / 16);\r\n \r\n let current = 0;\r\n const updateCounter = () => {\r\n current += increment;\r\n if (current < target) {\r\n // Format number with K for thousands\r\n let displayNum = Math.ceil(current);\r\n if (displayNum >= 1000) {\r\n counter.textContent = (displayNum / 1000).toFixed(1).replace('.0', '') + 'K';\r\n } else {\r\n counter.textContent = displayNum.toLocaleString();\r\n }\r\n requestAnimationFrame(updateCounter);\r\n } else {\r\n // Final formatting\r\n if (target >= 1000) {\r\n counter.textContent = (target / 1000).toFixed(1).replace('.0', '') + 'K';\r\n counter.classList.add('formatted');\r\n } else {\r\n counter.textContent = target.toLocaleString();\r\n }\r\n counter.classList.add('animated');\r\n setTimeout(() => counter.classList.remove('animated'), 600);\r\n }\r\n };\r\n updateCounter();\r\n observer.unobserve(counter);\r\n }\r\n });\r\n }, { threshold: 0.5, rootMargin: '0px 0px -50px 0px' });\r\n \r\n statNumbers.forEach(counter => observer.observe(counter));\r\n}\r\n\r\n// Call this function when DOM is loaded\r\ndocument.addEventListener('DOMContentLoaded', () => {\r\n animateFactsCounters();\r\n});","animate_delay":"0"},"editing":false,"element_name":"gva_text_noeditor"}],"editing":false,"element_name":"gva_column"}],"editing":false,"element_name":"gva_row"},{"settings":{"element":"gva_row","bg_particles":"off","bg_position":"center top","bg_repeat":"no-repeat","bg_attachment":"scroll","bg_size":"cover","style_space":"remove_margin remove_padding remove_padding_col","layout":"container-fw","class":"zakatcalc"},"columns":[{"settings":{"element":"gva_column"},"col_lg":12,"elements":[{"settings":{"content":"\r\n\r\n \r\n \r\n \r\n \r\nSmart Zakat Calculator\r\n A precise and comprehensive tool\r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n \r\n \r\n Money & Savings\r\n \r\n \r\n \r\n Cash (on hand or at home)\r\n \r\n \r\n $\r\n \r\n \r\n \r\n Bank balances\r\n \r\n \r\n $\r\n \r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n Gold & Silver\r\n \r\n \r\n Refresh Prices\r\n \r\n \r\n \r\n \r\n \r\n Gold weight (grams)\r\n \r\n \r\n \r\n \r\n Current gold price per gram\r\n \r\n Live\r\n \r\n \r\n \r\n \r\n $ / gram\r\n \r\n \r\n \r\n\r\n \r\n \r\n Silver weight (grams)\r\n \r\n \r\n \r\n \r\n Current silver price per gram\r\n \r\n Live\r\n \r\n \r\n \r\n \r\n $ / gram\r\n \r\n \r\n \r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n Zakat Summary\r\n \r\n \r\n Total assets:\r\n 0.00 $\r\n \r\n \r\n Net zakatable assets:\r\n 0.00 $\r\n \r\n \r\n Nisab value (85g gold):\r\n ...\r\n \r\n \r\n Enter data to check eligibility\r\n \r\n \r\n \r\n\r\n \r\n \r\n Zakat due (2.5%)\r\n 0.00 $\r\n \r\n \r\n <a>\r\n \r\n Contact via WhatsApp for consultation and donation\r\n </a>\r\n \r\n \r\n \r\n \r\n\r\n\r\n// Zakat Calculator Logic\r\nlet zakatcalculatorPricesLoaded = false;\r\n\r\n// Initialize calculator when DOM is loaded\r\ndocument.addEventListener('DOMContentLoaded', () => {\r\n zakatcalculatorFetchPrices();\r\n zakatcalculatorCalculate();\r\n \r\n // Add input event listeners for real-time calculation\r\n const inputs = document.querySelectorAll('.zakatcalculator-section__input');\r\n inputs.forEach(input => {\r\n input.addEventListener('input', zakatcalculatorCalculate);\r\n });\r\n \r\n // Format numbers as user types\r\n inputs.forEach(input => {\r\n input.addEventListener('blur', function() {\r\n if (this.value) {\r\n const value = parseFloat(this.value);\r\n if (!isNaN(value)) {\r\n this.value = value.toLocaleString('en-US', {\r\n minimumFractionDigits: 2,\r\n maximumFractionDigits: 2\r\n });\r\n }\r\n }\r\n });\r\n \r\n input.addEventListener('focus', function() {\r\n if (this.value) {\r\n this.value = this.value.replace(/[^\\d.]/g, '');\r\n }\r\n });\r\n });\r\n});\r\n\r\n// Fetch metal prices\r\nasync function zakatcalculatorFetchPrices() {\r\n const goldInput = document.getElementById('goldPrice');\r\n const silverInput = document.getElementById('silverPrice');\r\n const refreshButton = document.querySelector('.zakatcalculator-section__refresh-button');\r\n const refreshIcon = document.querySelector('.zakatcalculator-section__refresh-icon');\r\n \r\n if (!refreshButton || !refreshIcon) return;\r\n \r\n // Show loading state\r\n refreshButton.disabled = true;\r\n refreshIcon.classList.add('zakatcalculator-section__refresh-icon--spinning');\r\n goldInput.classList.add('zakatcalculator-section__input--loading');\r\n silverInput.classList.add('zakatcalculator-section__input--loading');\r\n \r\n try {\r\n // Simulate API call with delay\r\n await new Promise(resolve => setTimeout(resolve, 1500));\r\n \r\n // Mock data (in a real app, you would fetch from an API)\r\n const liveGoldPrice = 76.50;\r\n const liveSilverPrice = 0.95;\r\n \r\n // Update inputs\r\n goldInput.value = liveGoldPrice.toFixed(2);\r\n silverInput.value = liveSilverPrice.toFixed(2);\r\n \r\n // Remove loading state\r\n goldInput.classList.remove('zakatcalculator-section__input--loading');\r\n silverInput.classList.remove('zakatcalculator-section__input--loading');\r\n goldInput.classList.add('zakatcalculator-section__input--valid');\r\n silverInput.classList.add('zakatcalculator-section__input--valid');\r\n \r\n zakatcalculatorPricesLoaded = true;\r\n \r\n // Show success feedback\r\n refreshButton.innerHTML = ' Updated';\r\n refreshButton.style.backgroundColor = '#617f67';\r\n refreshButton.style.color = 'white';\r\n \r\n setTimeout(() => {\r\n refreshButton.innerHTML = ' Refresh Prices';\r\n refreshButton.style.backgroundColor = '';\r\n refreshButton.style.color = '';\r\n }, 2000);\r\n \r\n } catch (error) {\r\n console.error(\"Failed to fetch prices\", error);\r\n \r\n // Fallback values\r\n goldInput.value = 75.00;\r\n silverInput.value = 0.90;\r\n \r\n // Show error state\r\n goldInput.classList.remove('zakatcalculator-section__input--loading');\r\n silverInput.classList.remove('zakatcalculator-section__input--loading');\r\n goldInput.classList.add('zakatcalculator-section__input--invalid');\r\n silverInput.classList.add('zakatcalculator-section__input--invalid');\r\n \r\n refreshButton.innerHTML = ' Update Failed';\r\n refreshButton.style.backgroundColor = '#dc2626';\r\n refreshButton.style.color = 'white';\r\n \r\n setTimeout(() => {\r\n refreshButton.innerHTML = ' Refresh Prices';\r\n refreshButton.style.backgroundColor = '';\r\n refreshButton.style.color = '';\r\n }, 2000);\r\n \r\n } finally {\r\n refreshButton.disabled = false;\r\n refreshIcon.classList.remove('zakatcalculator-section__refresh-icon--spinning');\r\n \r\n // Recalculate zakat\r\n zakatcalculatorCalculate();\r\n }\r\n}\r\n\r\n// Calculate zakat\r\nfunction zakatcalculatorCalculate() {\r\n const cashHand = parseFloat(document.getElementById('cashHand').value) || 0;\r\n const cashBank = parseFloat(document.getElementById('cashBank').value) || 0;\r\n const goldWeight = parseFloat(document.getElementById('goldWeight').value) || 0;\r\n const goldPrice = parseFloat(document.getElementById('goldPrice').value) || 0;\r\n const silverWeight = parseFloat(document.getElementById('silverWeight').value) || 0;\r\n const silverPrice = parseFloat(document.getElementById('silverPrice').value) || 0;\r\n \r\n // Calculate totals\r\n const totalAssets = cashHand + cashBank + (goldWeight * goldPrice) + (silverWeight * silverPrice);\r\n const nisabThreshold = 85 * goldPrice;\r\n \r\n // Update display\r\n document.getElementById('totalAssetsDisplay').textContent = \r\n formatCurrency(totalAssets);\r\n \r\n document.getElementById('netAssetsDisplay').textContent = \r\n formatCurrency(totalAssets);\r\n \r\n if (goldPrice > 0) {\r\n document.getElementById('nisabValueDisplay').textContent = \r\n formatCurrency(nisabThreshold);\r\n } else {\r\n document.getElementById('nisabValueDisplay').textContent = '...';\r\n }\r\n \r\n // Update status and final zakat\r\n const statusBadge = document.getElementById('statusBadge');\r\n const finalDisplay = document.getElementById('finalZakatDisplay');\r\n const payButton = document.querySelector('.zakatcalculator-section__pay-button');\r\n \r\n if (totalAssets >= nisabThreshold && goldPrice > 0 && zakatcalculatorPricesLoaded) {\r\n const zakatAmount = totalAssets * 0.025;\r\n finalDisplay.textContent = formatCurrency(zakatAmount);\r\n \r\n // Update status badge\r\n statusBadge.textContent = '✓ Zakat is due (Nisab reached)';\r\n statusBadge.className = 'zakatcalculator-section__status zakatcalculator-section__status--eligible';\r\n \r\n // Enable pay button\r\n payButton.disabled = false;\r\n payButton.innerHTML = ' Pay Zakat Now';\r\n \r\n } else {\r\n finalDisplay.textContent = '0.00 $';\r\n \r\n // Update status badge\r\n if (!zakatcalculatorPricesLoaded) {\r\n statusBadge.textContent = 'Enter data to check eligibility';\r\n statusBadge.className = 'zakatcalculator-section__status zakatcalculator-section__status--not-eligible';\r\n } else if (totalAssets < nisabThreshold) {\r\n statusBadge.textContent = 'Zakat is not due (Nisab not reached)';\r\n statusBadge.className = 'zakatcalculator-section__status zakatcalculator-section__status--not-eligible';\r\n } else {\r\n statusBadge.textContent = 'Enter data to check eligibility';\r\n statusBadge.className = 'zakatcalculator-section__status zakatcalculator-section__status--not-eligible';\r\n }\r\n \r\n // Disable pay button\r\n payButton.disabled = true;\r\n payButton.innerHTML = ' Pay Zakat Now';\r\n }\r\n}\r\n\r\n// Format currency\r\nfunction formatCurrency(amount) {\r\n return new Intl.NumberFormat('en-US', {\r\n style: 'currency',\r\n currency: 'USD',\r\n minimumFractionDigits: 2,\r\n maximumFractionDigits: 2\r\n }).format(amount);\r\n}\r\n\r\n// Add zakat to cart\r\nfunction zakatcalculatorAddToCart() {\r\n const amountText = document.getElementById('finalZakatDisplay').textContent;\r\n const amount = parseFloat(amountText.replace(/[^0-9.-]+/g, \"\"));\r\n \r\n if (amount > 0 && !isNaN(amount)) {\r\n // Use your existing addToCart function\r\n if (typeof addToCart === 'function') {\r\n addToCart('Calculated Zakat', amount, 'Zakat');\r\n } else {\r\n // Fallback if addToCart is not defined\r\n alert(`Calculated Zakat amount: ${amountText}`);\r\n }\r\n } else {\r\n alert(\"Invalid zakat amount. Please check your inputs.\");\r\n }\r\n}\r\n\r\n// Input validation\r\nfunction validateZakatInput(input) {\r\n const value = parseFloat(input.value);\r\n const min = parseFloat(input.getAttribute('min')) || 0;\r\n \r\n if (isNaN(value) || value < min) {\r\n input.classList.add('zakatcalculator-section__input--invalid');\r\n return false;\r\n } else {\r\n input.classList.remove('zakatcalculator-section__input--invalid');\r\n input.classList.add('zakatcalculator-section__input--valid');\r\n return true;\r\n }\r\n}","animate_delay":"0"},"editing":false,"element_name":"gva_text_noeditor"}],"editing":false,"element_name":"gva_column"}],"editing":false,"element_name":"gva_row"},{"settings":{"element":"gva_row","bg_particles":"off","bg_position":"center top","bg_repeat":"no-repeat","bg_attachment":"scroll","bg_size":"cover","style_space":"remove_margin remove_padding remove_padding_col","layout":"container-fw","class":"partner","margin_top":"30","margin_bottom":"30"},"columns":[{"settings":{"element":"gva_column"},"col_lg":12,"elements":[{"settings":{"content":"\r\n \r\n Strategic Partnerships\r\n Our partners in creating hope\r\n \r\n \r\n ","animate_delay":"0"},"editing":false,"element_name":"gva_text_noeditor"},{"settings":{"title_admin":"Partners: Partners Block - en","block_drupal":"views_block__partners_block_2","hidden_title":"on","align_title":"title-align-right","remove_margin":"on","style_text":"text-dark","animate_delay":"0"},"editing":false,"element_name":"gva_drupal_block"}],"editing":false,"element_name":"gva_column"}],"editing":false,"element_name":"gva_row"}]') (Line: 47)
Drupal\gavias_content_builder\Plugin\Field\FieldFormatter\GaviasContentBuilderFormatter->viewElements(Object, 'en') (Line: 89)
Drupal\Core\Field\FormatterBase->view(Object, 'en') (Line: 263)
Drupal\Core\Entity\Entity\EntityViewDisplay->buildMultiple(Array) (Line: 351)
Drupal\Core\Entity\EntityViewBuilder->buildComponents(Array, Array, Array, 'full') (Line: 24)
Drupal\node\NodeViewBuilder->buildComponents(Array, Array, Array, 'full') (Line: 293)
Drupal\Core\Entity\EntityViewBuilder->buildMultiple(Array) (Line: 250)
Drupal\Core\Entity\EntityViewBuilder->build(Array)
call_user_func_array(Array, Array) (Line: 100)
Drupal\Core\Render\Renderer->doTrustedCallback(Array, Array, 'Render #pre_render callbacks must be methods of a class that implements \Drupal\Core\Security\TrustedCallbackInterface or be an anonymous function. The callback was %s. Support for this callback implementation is deprecated in 8.8.0 and will be removed in Drupal 9.0.0. See https://www.drupal.org/node/2966725', 'silenced_deprecation', 'Drupal\Core\Render\Element\RenderCallbackInterface') (Line: 781)
Drupal\Core\Render\Renderer->doCallback('#pre_render', Array, Array) (Line: 372)
Drupal\Core\Render\Renderer->doRender(Array, ) (Line: 200)
Drupal\Core\Render\Renderer->render(Array, ) (Line: 226)
Drupal\Core\Render\MainContent\HtmlRenderer->Drupal\Core\Render\MainContent\{closure}() (Line: 573)
Drupal\Core\Render\Renderer->executeInRenderContext(Object, Object) (Line: 227)
Drupal\Core\Render\MainContent\HtmlRenderer->prepare(Array, Object, Object) (Line: 117)
Drupal\Core\Render\MainContent\HtmlRenderer->renderResponse(Array, Object, Object) (Line: 90)
Drupal\Core\EventSubscriber\MainContentViewSubscriber->onViewRenderArray(Object, 'kernel.view', Object)
call_user_func(Array, Object, 'kernel.view', Object) (Line: 111)
Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher->dispatch('kernel.view', Object) (Line: 156)
Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object, 1) (Line: 68)
Symfony\Component\HttpKernel\HttpKernel->handle(Object, 1, 1) (Line: 57)
Drupal\Core\StackMiddleware\Session->handle(Object, 1, 1) (Line: 47)
Drupal\Core\StackMiddleware\KernelPreHandle->handle(Object, 1, 1) (Line: 191)
Drupal\page_cache\StackMiddleware\PageCache->fetch(Object, 1, 1) (Line: 128)
Drupal\page_cache\StackMiddleware\PageCache->lookup(Object, 1, 1) (Line: 82)
Drupal\page_cache\StackMiddleware\PageCache->handle(Object, 1, 1) (Line: 47)
Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle(Object, 1, 1) (Line: 52)
Drupal\Core\StackMiddleware\NegotiationMiddleware->handle(Object, 1, 1) (Line: 23)
Stack\StackedHttpKernel->handle(Object, 1, 1) (Line: 708)
Drupal\Core\DrupalKernel->handle(Object) (Line: 19)
- Deprecated function: implode(): Passing glue string after array is deprecated. Swap the parameters in element_gva_column->render_content() (line 463 of themes/gavias_kunco/gva_content_builder/gva_column.php).
element_gva_column->render_content(Array, '
Urgent Appeal
Be a helping hand for them in
times of crisis
At "Wejdan Charity", we work with full transparency to deliver your donations to those in need in conflict and poverty-stricken areas.
<a href="/en/sadaqah-jariyah" class="frontheader-section__button frontheader-section__button--primary">
Charity Donations
</a>
<a href="/en/urgent-projects-en" class="frontheader-section__button frontheader-section__button--secondary">
Our Projects
</a>
') (Line: 110)
gavias_content_builder_render_element('gva_column', Array, '
Urgent Appeal
Be a helping hand for them in
times of crisis
At "Wejdan Charity", we work with full transparency to deliver your donations to those in need in conflict and poverty-stricken areas.
<a href="/en/sadaqah-jariyah" class="frontheader-section__button frontheader-section__button--primary">
Charity Donations
</a>
<a href="/en/urgent-projects-en" class="frontheader-section__button frontheader-section__button--secondary">
Our Projects
</a>
') (Line: 58)
gavias_content_builder_render_el(Array) (Line: 22)
gavias_content_builder_frontend('[{"settings":{"bg_particles":"off","bg_position":"center top","bg_repeat":"no-repeat","bg_attachment":"scroll","bg_size":"cover","style_space":"remove_padding","layout":"container-fw"},"columns":[{"settings":{"element":"gva_column","bg_position":"center top","bg_repeat":"no-repeat","bg_attachment":"scroll","bg_size":"cover","el_class":"front"},"col_lg":12,"elements":[{"settings":{"content":"\r\n \r\n \r\n \r\n \r\n Urgent Appeal\r\n \r\n Be a helping hand for them in\r\n times of crisis\r\n \r\n \r\n At \"Wejdan Charity\", we work with full transparency to deliver your donations to those in need in conflict and poverty-stricken areas.\r\n \r\n \r\n <a>\r\n Charity Donations \r\n </a>\r\n <a>\r\n Our Projects \r\n </a>\r\n \r\n \r\n \r\n \r\n","animate_delay":"0"},"editing":false,"element_name":"gva_text_noeditor"}],"editing":false,"element_name":"gva_column"}],"editing":false,"element_name":"gva_row"},{"settings":{"element":"gva_row","bg_particles":"off","bg_position":"center top","bg_repeat":"no-repeat","bg_attachment":"scroll","bg_size":"cover","style_space":"remove_padding","layout":"container","class":"before-help-region"},"columns":[{"settings":{"element":"gva_column"},"col_lg":12,"elements":[{"settings":{"title":"Take action for animals now","link":"#","button_title":"Donation Now","button_align":"button-right-v2","style_text":"text-light","style_button":"btn-theme","donorbox":"off","target":"off","el_class":"margin","animate":"fade-up","animate_delay":"0"},"editing":false,"element_name":"gva_call_to_action"}],"editing":false,"element_name":"gva_column"}],"editing":false,"element_name":"gva_row"},{"settings":{"element":"gva_row","bg_particles":"off","bg_position":"center top","bg_repeat":"no-repeat","bg_attachment":"scroll","bg_size":"cover","style_space":"remove_padding","layout":"container-fw","bg_color":"#f9fafb"},"columns":[{"settings":{"element":"gva_column","bg_position":"center top","bg_repeat":"no-repeat","bg_attachment":"scroll","bg_size":"cover","el_class":"about"},"col_lg":12,"elements":[{"settings":{"content":"\r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n \r\n \r\n Who We Are\r\n \r\n \r\n We plant hope.. \r\n and build people and the future\r\n \r\n \r\n Wejdan Charity is a leading humanitarian organization, founded with an ambitious vision to be a bridge of الخير between donors and those in need.\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n Development Stages\r\n A continuous journey of growth\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n Areas of Work\r\n We reach where the need is\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \"We work with passion to bring smiles\"\r\n \r\n \r\n \r\n \r\n \r\n","animate_delay":"0"},"editing":false,"element_name":"gva_text_noeditor"}],"editing":false,"element_name":"gva_column"}],"editing":false,"element_name":"gva_row"},{"settings":{"element":"gva_row","bg_particles":"off","bg_position":"center top","bg_repeat":"no-repeat","bg_attachment":"scroll","bg_size":"cover","style_space":"remove_margin remove_padding remove_padding_col","layout":"container-fw","class":"partner","margin_top":"30","margin_bottom":"30"},"columns":[{"settings":{"element":"gva_column"},"col_lg":12,"elements":[{"settings":{"content":"\r\n\r\n \r\n \r\n Initiatives & Programs\r\n Our Areas of Work\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n Ongoing Charity\r\n Water wells, mosque construction\r\n \r\n \r\n \r\n \r\n \r\n \r\n Student Sponsorship\r\n Building the future through education\r\n \r\n \r\n \r\n \r\n \r\n \r\n Humanitarian Cases\r\n Patient treatment, surgeries\r\n \r\n \r\n \r\n \r\n \r\n \r\n Development Projects\r\n Empowering productive families\r\n \r\n \r\n<a>Learn more about our programs and initiatives</a>\r\n \r\n","animate_delay":"0"},"editing":false,"element_name":"gva_text_noeditor"}],"editing":false,"element_name":"gva_column"}],"editing":false,"element_name":"gva_row"},{"settings":{"element":"gva_row","bg_particles":"off","bg_position":"center top","bg_repeat":"no-repeat","bg_attachment":"scroll","bg_size":"cover","style_space":"remove_margin remove_padding remove_padding_col","layout":"container","class":"newsfront"},"columns":[{"settings":{"element":"gva_column"},"col_lg":12,"elements":[{"settings":{"content":"\r\n \r\n \r\n Our News\r\n \r\n \r\n \r\nNews that tells the story of giving \r\n \r\n","animate_delay":"0"},"editing":false,"element_name":"gva_text_noeditor"},{"settings":{"title_admin":"news: news Block -en","block_drupal":"views_block__news_block_3","hidden_title":"on","align_title":"title-align-left","remove_margin":"on","style_text":"text-dark","animate_delay":"0"},"editing":false,"element_name":"gva_drupal_block"}],"editing":false,"element_name":"gva_column"}],"editing":false,"element_name":"gva_row"},{"settings":{"bg_particles":"off","bg_position":"center top","bg_repeat":"no-repeat","bg_attachment":"scroll","bg_size":"cover","style_space":"remove_padding","layout":"container-fw","element":"gva_row","class":"sliderfrontpage"},"columns":[{"settings":{"element":"gva_column","bg_position":"center top","bg_repeat":"no-repeat","bg_attachment":"scroll","bg_size":"cover"},"col_lg":12,"elements":[{"settings":{"title_admin":"news: campigns-en","block_drupal":"views_block__news_block_5","hidden_title":"on","align_title":"title-align-right","remove_margin":"on","style_text":"text-dark","animate_delay":"0"},"editing":false,"element_name":"gva_drupal_block"}],"editing":false,"element_name":"gva_column"}],"editing":false,"element_name":"gva_row"},{"settings":{"element":"gva_row","bg_particles":"off","bg_position":"center top","bg_repeat":"no-repeat","bg_attachment":"scroll","bg_size":"cover","style_space":"remove_margin remove_padding remove_padding_col","layout":"container-fw","class":"partner"},"columns":[{"settings":{"element":"gva_column"},"col_lg":12,"elements":[{"settings":{"content":"\r\n \r\n \r\n \r\n Our Distinguished Projects\r\n \r\n \r\n \r\n At Wejdan Charity, we strive to provide support and assistance to communities in need who are affected by disasters, crises, and wars, with the aim of improving quality of life and promoting sustainable development. Our projects span across several areas:\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n Relief Projects\r\n Emergency response to disasters and wars, providing food and medicine.\r\n \r\n<a> Browse Projects </a>\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n Development Projects\r\n Empowering communities and building capacities.\r\n \r\n<a> Browse Projects </a>\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n Seasonal Projects\r\n Ramadan campaigns, Qurbani, and winter clothing.\r\n \r\n<a> Browse Projects </a>\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n Endowment Projects\r\n An investment for the hereafter—mosques, wells, and charitable endowments.\r\n<a> Browse Projects </a>\r\n \r\n \r\n \r\n \r\n","animate_delay":"0"},"editing":false,"element_name":"gva_text_noeditor"}],"editing":false,"element_name":"gva_column"}],"editing":false,"element_name":"gva_row"},{"settings":{"element":"gva_row","bg_particles":"off","bg_position":"center top","bg_repeat":"no-repeat","bg_attachment":"scroll","bg_size":"cover","style_space":"remove_margin remove_padding remove_padding_col","layout":"container-fw","class":"partner"},"columns":[{"settings":{"element":"gva_column"},"col_lg":12,"elements":[{"settings":{"content":"\r\n \r\n \r\n\r\n \r\n \r\n Our Achievements in Numbers\r\n Your trust makes the difference\r\n \r\n \r\n\r\n \r\n \r\n 0\r\n Beneficiaries worldwide\r\n \r\n \r\n \r\n 0\r\n Projects implemented\r\n \r\n \r\n \r\n 0\r\n Countries we operate in\r\n \r\n \r\n \r\n 0\r\n Volunteers\r\n \r\n \r\n \r\n \r\n\r\n\r\n// Enhanced counter animation for facts section\r\nfunction animateFactsCounters() {\r\n const statNumbers = document.querySelectorAll('.facts-section__stat-number');\r\n \r\n const observer = new IntersectionObserver((entries) => {\r\n entries.forEach(entry => {\r\n if (entry.isIntersecting) {\r\n const counter = entry.target;\r\n const target = parseInt(counter.getAttribute('data-target'));\r\n const duration = 2000;\r\n const increment = target / (duration / 16);\r\n \r\n let current = 0;\r\n const updateCounter = () => {\r\n current += increment;\r\n if (current < target) {\r\n // Format number with K for thousands\r\n let displayNum = Math.ceil(current);\r\n if (displayNum >= 1000) {\r\n counter.textContent = (displayNum / 1000).toFixed(1).replace('.0', '') + 'K';\r\n } else {\r\n counter.textContent = displayNum.toLocaleString();\r\n }\r\n requestAnimationFrame(updateCounter);\r\n } else {\r\n // Final formatting\r\n if (target >= 1000) {\r\n counter.textContent = (target / 1000).toFixed(1).replace('.0', '') + 'K';\r\n counter.classList.add('formatted');\r\n } else {\r\n counter.textContent = target.toLocaleString();\r\n }\r\n counter.classList.add('animated');\r\n setTimeout(() => counter.classList.remove('animated'), 600);\r\n }\r\n };\r\n updateCounter();\r\n observer.unobserve(counter);\r\n }\r\n });\r\n }, { threshold: 0.5, rootMargin: '0px 0px -50px 0px' });\r\n \r\n statNumbers.forEach(counter => observer.observe(counter));\r\n}\r\n\r\n// Call this function when DOM is loaded\r\ndocument.addEventListener('DOMContentLoaded', () => {\r\n animateFactsCounters();\r\n});","animate_delay":"0"},"editing":false,"element_name":"gva_text_noeditor"}],"editing":false,"element_name":"gva_column"}],"editing":false,"element_name":"gva_row"},{"settings":{"element":"gva_row","bg_particles":"off","bg_position":"center top","bg_repeat":"no-repeat","bg_attachment":"scroll","bg_size":"cover","style_space":"remove_margin remove_padding remove_padding_col","layout":"container-fw","class":"zakatcalc"},"columns":[{"settings":{"element":"gva_column"},"col_lg":12,"elements":[{"settings":{"content":"\r\n\r\n \r\n \r\n \r\n \r\nSmart Zakat Calculator\r\n A precise and comprehensive tool\r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n \r\n \r\n Money & Savings\r\n \r\n \r\n \r\n Cash (on hand or at home)\r\n \r\n \r\n $\r\n \r\n \r\n \r\n Bank balances\r\n \r\n \r\n $\r\n \r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n Gold & Silver\r\n \r\n \r\n Refresh Prices\r\n \r\n \r\n \r\n \r\n \r\n Gold weight (grams)\r\n \r\n \r\n \r\n \r\n Current gold price per gram\r\n \r\n Live\r\n \r\n \r\n \r\n \r\n $ / gram\r\n \r\n \r\n \r\n\r\n \r\n \r\n Silver weight (grams)\r\n \r\n \r\n \r\n \r\n Current silver price per gram\r\n \r\n Live\r\n \r\n \r\n \r\n \r\n $ / gram\r\n \r\n \r\n \r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n Zakat Summary\r\n \r\n \r\n Total assets:\r\n 0.00 $\r\n \r\n \r\n Net zakatable assets:\r\n 0.00 $\r\n \r\n \r\n Nisab value (85g gold):\r\n ...\r\n \r\n \r\n Enter data to check eligibility\r\n \r\n \r\n \r\n\r\n \r\n \r\n Zakat due (2.5%)\r\n 0.00 $\r\n \r\n \r\n <a>\r\n \r\n Contact via WhatsApp for consultation and donation\r\n </a>\r\n \r\n \r\n \r\n \r\n\r\n\r\n// Zakat Calculator Logic\r\nlet zakatcalculatorPricesLoaded = false;\r\n\r\n// Initialize calculator when DOM is loaded\r\ndocument.addEventListener('DOMContentLoaded', () => {\r\n zakatcalculatorFetchPrices();\r\n zakatcalculatorCalculate();\r\n \r\n // Add input event listeners for real-time calculation\r\n const inputs = document.querySelectorAll('.zakatcalculator-section__input');\r\n inputs.forEach(input => {\r\n input.addEventListener('input', zakatcalculatorCalculate);\r\n });\r\n \r\n // Format numbers as user types\r\n inputs.forEach(input => {\r\n input.addEventListener('blur', function() {\r\n if (this.value) {\r\n const value = parseFloat(this.value);\r\n if (!isNaN(value)) {\r\n this.value = value.toLocaleString('en-US', {\r\n minimumFractionDigits: 2,\r\n maximumFractionDigits: 2\r\n });\r\n }\r\n }\r\n });\r\n \r\n input.addEventListener('focus', function() {\r\n if (this.value) {\r\n this.value = this.value.replace(/[^\\d.]/g, '');\r\n }\r\n });\r\n });\r\n});\r\n\r\n// Fetch metal prices\r\nasync function zakatcalculatorFetchPrices() {\r\n const goldInput = document.getElementById('goldPrice');\r\n const silverInput = document.getElementById('silverPrice');\r\n const refreshButton = document.querySelector('.zakatcalculator-section__refresh-button');\r\n const refreshIcon = document.querySelector('.zakatcalculator-section__refresh-icon');\r\n \r\n if (!refreshButton || !refreshIcon) return;\r\n \r\n // Show loading state\r\n refreshButton.disabled = true;\r\n refreshIcon.classList.add('zakatcalculator-section__refresh-icon--spinning');\r\n goldInput.classList.add('zakatcalculator-section__input--loading');\r\n silverInput.classList.add('zakatcalculator-section__input--loading');\r\n \r\n try {\r\n // Simulate API call with delay\r\n await new Promise(resolve => setTimeout(resolve, 1500));\r\n \r\n // Mock data (in a real app, you would fetch from an API)\r\n const liveGoldPrice = 76.50;\r\n const liveSilverPrice = 0.95;\r\n \r\n // Update inputs\r\n goldInput.value = liveGoldPrice.toFixed(2);\r\n silverInput.value = liveSilverPrice.toFixed(2);\r\n \r\n // Remove loading state\r\n goldInput.classList.remove('zakatcalculator-section__input--loading');\r\n silverInput.classList.remove('zakatcalculator-section__input--loading');\r\n goldInput.classList.add('zakatcalculator-section__input--valid');\r\n silverInput.classList.add('zakatcalculator-section__input--valid');\r\n \r\n zakatcalculatorPricesLoaded = true;\r\n \r\n // Show success feedback\r\n refreshButton.innerHTML = ' Updated';\r\n refreshButton.style.backgroundColor = '#617f67';\r\n refreshButton.style.color = 'white';\r\n \r\n setTimeout(() => {\r\n refreshButton.innerHTML = ' Refresh Prices';\r\n refreshButton.style.backgroundColor = '';\r\n refreshButton.style.color = '';\r\n }, 2000);\r\n \r\n } catch (error) {\r\n console.error(\"Failed to fetch prices\", error);\r\n \r\n // Fallback values\r\n goldInput.value = 75.00;\r\n silverInput.value = 0.90;\r\n \r\n // Show error state\r\n goldInput.classList.remove('zakatcalculator-section__input--loading');\r\n silverInput.classList.remove('zakatcalculator-section__input--loading');\r\n goldInput.classList.add('zakatcalculator-section__input--invalid');\r\n silverInput.classList.add('zakatcalculator-section__input--invalid');\r\n \r\n refreshButton.innerHTML = ' Update Failed';\r\n refreshButton.style.backgroundColor = '#dc2626';\r\n refreshButton.style.color = 'white';\r\n \r\n setTimeout(() => {\r\n refreshButton.innerHTML = ' Refresh Prices';\r\n refreshButton.style.backgroundColor = '';\r\n refreshButton.style.color = '';\r\n }, 2000);\r\n \r\n } finally {\r\n refreshButton.disabled = false;\r\n refreshIcon.classList.remove('zakatcalculator-section__refresh-icon--spinning');\r\n \r\n // Recalculate zakat\r\n zakatcalculatorCalculate();\r\n }\r\n}\r\n\r\n// Calculate zakat\r\nfunction zakatcalculatorCalculate() {\r\n const cashHand = parseFloat(document.getElementById('cashHand').value) || 0;\r\n const cashBank = parseFloat(document.getElementById('cashBank').value) || 0;\r\n const goldWeight = parseFloat(document.getElementById('goldWeight').value) || 0;\r\n const goldPrice = parseFloat(document.getElementById('goldPrice').value) || 0;\r\n const silverWeight = parseFloat(document.getElementById('silverWeight').value) || 0;\r\n const silverPrice = parseFloat(document.getElementById('silverPrice').value) || 0;\r\n \r\n // Calculate totals\r\n const totalAssets = cashHand + cashBank + (goldWeight * goldPrice) + (silverWeight * silverPrice);\r\n const nisabThreshold = 85 * goldPrice;\r\n \r\n // Update display\r\n document.getElementById('totalAssetsDisplay').textContent = \r\n formatCurrency(totalAssets);\r\n \r\n document.getElementById('netAssetsDisplay').textContent = \r\n formatCurrency(totalAssets);\r\n \r\n if (goldPrice > 0) {\r\n document.getElementById('nisabValueDisplay').textContent = \r\n formatCurrency(nisabThreshold);\r\n } else {\r\n document.getElementById('nisabValueDisplay').textContent = '...';\r\n }\r\n \r\n // Update status and final zakat\r\n const statusBadge = document.getElementById('statusBadge');\r\n const finalDisplay = document.getElementById('finalZakatDisplay');\r\n const payButton = document.querySelector('.zakatcalculator-section__pay-button');\r\n \r\n if (totalAssets >= nisabThreshold && goldPrice > 0 && zakatcalculatorPricesLoaded) {\r\n const zakatAmount = totalAssets * 0.025;\r\n finalDisplay.textContent = formatCurrency(zakatAmount);\r\n \r\n // Update status badge\r\n statusBadge.textContent = '✓ Zakat is due (Nisab reached)';\r\n statusBadge.className = 'zakatcalculator-section__status zakatcalculator-section__status--eligible';\r\n \r\n // Enable pay button\r\n payButton.disabled = false;\r\n payButton.innerHTML = ' Pay Zakat Now';\r\n \r\n } else {\r\n finalDisplay.textContent = '0.00 $';\r\n \r\n // Update status badge\r\n if (!zakatcalculatorPricesLoaded) {\r\n statusBadge.textContent = 'Enter data to check eligibility';\r\n statusBadge.className = 'zakatcalculator-section__status zakatcalculator-section__status--not-eligible';\r\n } else if (totalAssets < nisabThreshold) {\r\n statusBadge.textContent = 'Zakat is not due (Nisab not reached)';\r\n statusBadge.className = 'zakatcalculator-section__status zakatcalculator-section__status--not-eligible';\r\n } else {\r\n statusBadge.textContent = 'Enter data to check eligibility';\r\n statusBadge.className = 'zakatcalculator-section__status zakatcalculator-section__status--not-eligible';\r\n }\r\n \r\n // Disable pay button\r\n payButton.disabled = true;\r\n payButton.innerHTML = ' Pay Zakat Now';\r\n }\r\n}\r\n\r\n// Format currency\r\nfunction formatCurrency(amount) {\r\n return new Intl.NumberFormat('en-US', {\r\n style: 'currency',\r\n currency: 'USD',\r\n minimumFractionDigits: 2,\r\n maximumFractionDigits: 2\r\n }).format(amount);\r\n}\r\n\r\n// Add zakat to cart\r\nfunction zakatcalculatorAddToCart() {\r\n const amountText = document.getElementById('finalZakatDisplay').textContent;\r\n const amount = parseFloat(amountText.replace(/[^0-9.-]+/g, \"\"));\r\n \r\n if (amount > 0 && !isNaN(amount)) {\r\n // Use your existing addToCart function\r\n if (typeof addToCart === 'function') {\r\n addToCart('Calculated Zakat', amount, 'Zakat');\r\n } else {\r\n // Fallback if addToCart is not defined\r\n alert(`Calculated Zakat amount: ${amountText}`);\r\n }\r\n } else {\r\n alert(\"Invalid zakat amount. Please check your inputs.\");\r\n }\r\n}\r\n\r\n// Input validation\r\nfunction validateZakatInput(input) {\r\n const value = parseFloat(input.value);\r\n const min = parseFloat(input.getAttribute('min')) || 0;\r\n \r\n if (isNaN(value) || value < min) {\r\n input.classList.add('zakatcalculator-section__input--invalid');\r\n return false;\r\n } else {\r\n input.classList.remove('zakatcalculator-section__input--invalid');\r\n input.classList.add('zakatcalculator-section__input--valid');\r\n return true;\r\n }\r\n}","animate_delay":"0"},"editing":false,"element_name":"gva_text_noeditor"}],"editing":false,"element_name":"gva_column"}],"editing":false,"element_name":"gva_row"},{"settings":{"element":"gva_row","bg_particles":"off","bg_position":"center top","bg_repeat":"no-repeat","bg_attachment":"scroll","bg_size":"cover","style_space":"remove_margin remove_padding remove_padding_col","layout":"container-fw","class":"partner","margin_top":"30","margin_bottom":"30"},"columns":[{"settings":{"element":"gva_column"},"col_lg":12,"elements":[{"settings":{"content":"\r\n \r\n Strategic Partnerships\r\n Our partners in creating hope\r\n \r\n \r\n ","animate_delay":"0"},"editing":false,"element_name":"gva_text_noeditor"},{"settings":{"title_admin":"Partners: Partners Block - en","block_drupal":"views_block__partners_block_2","hidden_title":"on","align_title":"title-align-right","remove_margin":"on","style_text":"text-dark","animate_delay":"0"},"editing":false,"element_name":"gva_drupal_block"}],"editing":false,"element_name":"gva_column"}],"editing":false,"element_name":"gva_row"}]') (Line: 47)
Drupal\gavias_content_builder\Plugin\Field\FieldFormatter\GaviasContentBuilderFormatter->viewElements(Object, 'en') (Line: 89)
Drupal\Core\Field\FormatterBase->view(Object, 'en') (Line: 263)
Drupal\Core\Entity\Entity\EntityViewDisplay->buildMultiple(Array) (Line: 351)
Drupal\Core\Entity\EntityViewBuilder->buildComponents(Array, Array, Array, 'full') (Line: 24)
Drupal\node\NodeViewBuilder->buildComponents(Array, Array, Array, 'full') (Line: 293)
Drupal\Core\Entity\EntityViewBuilder->buildMultiple(Array) (Line: 250)
Drupal\Core\Entity\EntityViewBuilder->build(Array)
call_user_func_array(Array, Array) (Line: 100)
Drupal\Core\Render\Renderer->doTrustedCallback(Array, Array, 'Render #pre_render callbacks must be methods of a class that implements \Drupal\Core\Security\TrustedCallbackInterface or be an anonymous function. The callback was %s. Support for this callback implementation is deprecated in 8.8.0 and will be removed in Drupal 9.0.0. See https://www.drupal.org/node/2966725', 'silenced_deprecation', 'Drupal\Core\Render\Element\RenderCallbackInterface') (Line: 781)
Drupal\Core\Render\Renderer->doCallback('#pre_render', Array, Array) (Line: 372)
Drupal\Core\Render\Renderer->doRender(Array, ) (Line: 200)
Drupal\Core\Render\Renderer->render(Array, ) (Line: 226)
Drupal\Core\Render\MainContent\HtmlRenderer->Drupal\Core\Render\MainContent\{closure}() (Line: 573)
Drupal\Core\Render\Renderer->executeInRenderContext(Object, Object) (Line: 227)
Drupal\Core\Render\MainContent\HtmlRenderer->prepare(Array, Object, Object) (Line: 117)
Drupal\Core\Render\MainContent\HtmlRenderer->renderResponse(Array, Object, Object) (Line: 90)
Drupal\Core\EventSubscriber\MainContentViewSubscriber->onViewRenderArray(Object, 'kernel.view', Object)
call_user_func(Array, Object, 'kernel.view', Object) (Line: 111)
Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher->dispatch('kernel.view', Object) (Line: 156)
Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object, 1) (Line: 68)
Symfony\Component\HttpKernel\HttpKernel->handle(Object, 1, 1) (Line: 57)
Drupal\Core\StackMiddleware\Session->handle(Object, 1, 1) (Line: 47)
Drupal\Core\StackMiddleware\KernelPreHandle->handle(Object, 1, 1) (Line: 191)
Drupal\page_cache\StackMiddleware\PageCache->fetch(Object, 1, 1) (Line: 128)
Drupal\page_cache\StackMiddleware\PageCache->lookup(Object, 1, 1) (Line: 82)
Drupal\page_cache\StackMiddleware\PageCache->handle(Object, 1, 1) (Line: 47)
Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle(Object, 1, 1) (Line: 52)
Drupal\Core\StackMiddleware\NegotiationMiddleware->handle(Object, 1, 1) (Line: 23)
Stack\StackedHttpKernel->handle(Object, 1, 1) (Line: 708)
Drupal\Core\DrupalKernel->handle(Object) (Line: 19)
- Deprecated function: implode(): Passing glue string after array is deprecated. Swap the parameters in element_gva_row->render_content() (line 317 of themes/gavias_kunco/gva_content_builder/gva_row.php).
element_gva_row->render_content(Array, '
Urgent Appeal
Be a helping hand for them in
times of crisis
At "Wejdan Charity", we work with full transparency to deliver your donations to those in need in conflict and poverty-stricken areas.
<a href="/en/sadaqah-jariyah" class="frontheader-section__button frontheader-section__button--primary">
Charity Donations
</a>
<a href="/en/urgent-projects-en" class="frontheader-section__button frontheader-section__button--secondary">
Our Projects
</a>
') (Line: 110)
gavias_content_builder_render_element('gva_row', Array, '
Urgent Appeal
Be a helping hand for them in
times of crisis
At "Wejdan Charity", we work with full transparency to deliver your donations to those in need in conflict and poverty-stricken areas.
<a href="/en/sadaqah-jariyah" class="frontheader-section__button frontheader-section__button--primary">
Charity Donations
</a>
<a href="/en/urgent-projects-en" class="frontheader-section__button frontheader-section__button--secondary">
Our Projects
</a>
') (Line: 62)
gavias_content_builder_render_el(Array) (Line: 22)
gavias_content_builder_frontend('[{"settings":{"bg_particles":"off","bg_position":"center top","bg_repeat":"no-repeat","bg_attachment":"scroll","bg_size":"cover","style_space":"remove_padding","layout":"container-fw"},"columns":[{"settings":{"element":"gva_column","bg_position":"center top","bg_repeat":"no-repeat","bg_attachment":"scroll","bg_size":"cover","el_class":"front"},"col_lg":12,"elements":[{"settings":{"content":"\r\n \r\n \r\n \r\n \r\n Urgent Appeal\r\n \r\n Be a helping hand for them in\r\n times of crisis\r\n \r\n \r\n At \"Wejdan Charity\", we work with full transparency to deliver your donations to those in need in conflict and poverty-stricken areas.\r\n \r\n \r\n <a>\r\n Charity Donations \r\n </a>\r\n <a>\r\n Our Projects \r\n </a>\r\n \r\n \r\n \r\n \r\n","animate_delay":"0"},"editing":false,"element_name":"gva_text_noeditor"}],"editing":false,"element_name":"gva_column"}],"editing":false,"element_name":"gva_row"},{"settings":{"element":"gva_row","bg_particles":"off","bg_position":"center top","bg_repeat":"no-repeat","bg_attachment":"scroll","bg_size":"cover","style_space":"remove_padding","layout":"container","class":"before-help-region"},"columns":[{"settings":{"element":"gva_column"},"col_lg":12,"elements":[{"settings":{"title":"Take action for animals now","link":"#","button_title":"Donation Now","button_align":"button-right-v2","style_text":"text-light","style_button":"btn-theme","donorbox":"off","target":"off","el_class":"margin","animate":"fade-up","animate_delay":"0"},"editing":false,"element_name":"gva_call_to_action"}],"editing":false,"element_name":"gva_column"}],"editing":false,"element_name":"gva_row"},{"settings":{"element":"gva_row","bg_particles":"off","bg_position":"center top","bg_repeat":"no-repeat","bg_attachment":"scroll","bg_size":"cover","style_space":"remove_padding","layout":"container-fw","bg_color":"#f9fafb"},"columns":[{"settings":{"element":"gva_column","bg_position":"center top","bg_repeat":"no-repeat","bg_attachment":"scroll","bg_size":"cover","el_class":"about"},"col_lg":12,"elements":[{"settings":{"content":"\r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n \r\n \r\n Who We Are\r\n \r\n \r\n We plant hope.. \r\n and build people and the future\r\n \r\n \r\n Wejdan Charity is a leading humanitarian organization, founded with an ambitious vision to be a bridge of الخير between donors and those in need.\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n Development Stages\r\n A continuous journey of growth\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n Areas of Work\r\n We reach where the need is\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \"We work with passion to bring smiles\"\r\n \r\n \r\n \r\n \r\n \r\n","animate_delay":"0"},"editing":false,"element_name":"gva_text_noeditor"}],"editing":false,"element_name":"gva_column"}],"editing":false,"element_name":"gva_row"},{"settings":{"element":"gva_row","bg_particles":"off","bg_position":"center top","bg_repeat":"no-repeat","bg_attachment":"scroll","bg_size":"cover","style_space":"remove_margin remove_padding remove_padding_col","layout":"container-fw","class":"partner","margin_top":"30","margin_bottom":"30"},"columns":[{"settings":{"element":"gva_column"},"col_lg":12,"elements":[{"settings":{"content":"\r\n\r\n \r\n \r\n Initiatives & Programs\r\n Our Areas of Work\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n Ongoing Charity\r\n Water wells, mosque construction\r\n \r\n \r\n \r\n \r\n \r\n \r\n Student Sponsorship\r\n Building the future through education\r\n \r\n \r\n \r\n \r\n \r\n \r\n Humanitarian Cases\r\n Patient treatment, surgeries\r\n \r\n \r\n \r\n \r\n \r\n \r\n Development Projects\r\n Empowering productive families\r\n \r\n \r\n<a>Learn more about our programs and initiatives</a>\r\n \r\n","animate_delay":"0"},"editing":false,"element_name":"gva_text_noeditor"}],"editing":false,"element_name":"gva_column"}],"editing":false,"element_name":"gva_row"},{"settings":{"element":"gva_row","bg_particles":"off","bg_position":"center top","bg_repeat":"no-repeat","bg_attachment":"scroll","bg_size":"cover","style_space":"remove_margin remove_padding remove_padding_col","layout":"container","class":"newsfront"},"columns":[{"settings":{"element":"gva_column"},"col_lg":12,"elements":[{"settings":{"content":"\r\n \r\n \r\n Our News\r\n \r\n \r\n \r\nNews that tells the story of giving \r\n \r\n","animate_delay":"0"},"editing":false,"element_name":"gva_text_noeditor"},{"settings":{"title_admin":"news: news Block -en","block_drupal":"views_block__news_block_3","hidden_title":"on","align_title":"title-align-left","remove_margin":"on","style_text":"text-dark","animate_delay":"0"},"editing":false,"element_name":"gva_drupal_block"}],"editing":false,"element_name":"gva_column"}],"editing":false,"element_name":"gva_row"},{"settings":{"bg_particles":"off","bg_position":"center top","bg_repeat":"no-repeat","bg_attachment":"scroll","bg_size":"cover","style_space":"remove_padding","layout":"container-fw","element":"gva_row","class":"sliderfrontpage"},"columns":[{"settings":{"element":"gva_column","bg_position":"center top","bg_repeat":"no-repeat","bg_attachment":"scroll","bg_size":"cover"},"col_lg":12,"elements":[{"settings":{"title_admin":"news: campigns-en","block_drupal":"views_block__news_block_5","hidden_title":"on","align_title":"title-align-right","remove_margin":"on","style_text":"text-dark","animate_delay":"0"},"editing":false,"element_name":"gva_drupal_block"}],"editing":false,"element_name":"gva_column"}],"editing":false,"element_name":"gva_row"},{"settings":{"element":"gva_row","bg_particles":"off","bg_position":"center top","bg_repeat":"no-repeat","bg_attachment":"scroll","bg_size":"cover","style_space":"remove_margin remove_padding remove_padding_col","layout":"container-fw","class":"partner"},"columns":[{"settings":{"element":"gva_column"},"col_lg":12,"elements":[{"settings":{"content":"\r\n \r\n \r\n \r\n Our Distinguished Projects\r\n \r\n \r\n \r\n At Wejdan Charity, we strive to provide support and assistance to communities in need who are affected by disasters, crises, and wars, with the aim of improving quality of life and promoting sustainable development. Our projects span across several areas:\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n Relief Projects\r\n Emergency response to disasters and wars, providing food and medicine.\r\n \r\n<a> Browse Projects </a>\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n Development Projects\r\n Empowering communities and building capacities.\r\n \r\n<a> Browse Projects </a>\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n Seasonal Projects\r\n Ramadan campaigns, Qurbani, and winter clothing.\r\n \r\n<a> Browse Projects </a>\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n Endowment Projects\r\n An investment for the hereafter—mosques, wells, and charitable endowments.\r\n<a> Browse Projects </a>\r\n \r\n \r\n \r\n \r\n","animate_delay":"0"},"editing":false,"element_name":"gva_text_noeditor"}],"editing":false,"element_name":"gva_column"}],"editing":false,"element_name":"gva_row"},{"settings":{"element":"gva_row","bg_particles":"off","bg_position":"center top","bg_repeat":"no-repeat","bg_attachment":"scroll","bg_size":"cover","style_space":"remove_margin remove_padding remove_padding_col","layout":"container-fw","class":"partner"},"columns":[{"settings":{"element":"gva_column"},"col_lg":12,"elements":[{"settings":{"content":"\r\n \r\n \r\n\r\n \r\n \r\n Our Achievements in Numbers\r\n Your trust makes the difference\r\n \r\n \r\n\r\n \r\n \r\n 0\r\n Beneficiaries worldwide\r\n \r\n \r\n \r\n 0\r\n Projects implemented\r\n \r\n \r\n \r\n 0\r\n Countries we operate in\r\n \r\n \r\n \r\n 0\r\n Volunteers\r\n \r\n \r\n \r\n \r\n\r\n\r\n// Enhanced counter animation for facts section\r\nfunction animateFactsCounters() {\r\n const statNumbers = document.querySelectorAll('.facts-section__stat-number');\r\n \r\n const observer = new IntersectionObserver((entries) => {\r\n entries.forEach(entry => {\r\n if (entry.isIntersecting) {\r\n const counter = entry.target;\r\n const target = parseInt(counter.getAttribute('data-target'));\r\n const duration = 2000;\r\n const increment = target / (duration / 16);\r\n \r\n let current = 0;\r\n const updateCounter = () => {\r\n current += increment;\r\n if (current < target) {\r\n // Format number with K for thousands\r\n let displayNum = Math.ceil(current);\r\n if (displayNum >= 1000) {\r\n counter.textContent = (displayNum / 1000).toFixed(1).replace('.0', '') + 'K';\r\n } else {\r\n counter.textContent = displayNum.toLocaleString();\r\n }\r\n requestAnimationFrame(updateCounter);\r\n } else {\r\n // Final formatting\r\n if (target >= 1000) {\r\n counter.textContent = (target / 1000).toFixed(1).replace('.0', '') + 'K';\r\n counter.classList.add('formatted');\r\n } else {\r\n counter.textContent = target.toLocaleString();\r\n }\r\n counter.classList.add('animated');\r\n setTimeout(() => counter.classList.remove('animated'), 600);\r\n }\r\n };\r\n updateCounter();\r\n observer.unobserve(counter);\r\n }\r\n });\r\n }, { threshold: 0.5, rootMargin: '0px 0px -50px 0px' });\r\n \r\n statNumbers.forEach(counter => observer.observe(counter));\r\n}\r\n\r\n// Call this function when DOM is loaded\r\ndocument.addEventListener('DOMContentLoaded', () => {\r\n animateFactsCounters();\r\n});","animate_delay":"0"},"editing":false,"element_name":"gva_text_noeditor"}],"editing":false,"element_name":"gva_column"}],"editing":false,"element_name":"gva_row"},{"settings":{"element":"gva_row","bg_particles":"off","bg_position":"center top","bg_repeat":"no-repeat","bg_attachment":"scroll","bg_size":"cover","style_space":"remove_margin remove_padding remove_padding_col","layout":"container-fw","class":"zakatcalc"},"columns":[{"settings":{"element":"gva_column"},"col_lg":12,"elements":[{"settings":{"content":"\r\n\r\n \r\n \r\n \r\n \r\nSmart Zakat Calculator\r\n A precise and comprehensive tool\r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n \r\n \r\n Money & Savings\r\n \r\n \r\n \r\n Cash (on hand or at home)\r\n \r\n \r\n $\r\n \r\n \r\n \r\n Bank balances\r\n \r\n \r\n $\r\n \r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n Gold & Silver\r\n \r\n \r\n Refresh Prices\r\n \r\n \r\n \r\n \r\n \r\n Gold weight (grams)\r\n \r\n \r\n \r\n \r\n Current gold price per gram\r\n \r\n Live\r\n \r\n \r\n \r\n \r\n $ / gram\r\n \r\n \r\n \r\n\r\n \r\n \r\n Silver weight (grams)\r\n \r\n \r\n \r\n \r\n Current silver price per gram\r\n \r\n Live\r\n \r\n \r\n \r\n \r\n $ / gram\r\n \r\n \r\n \r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n Zakat Summary\r\n \r\n \r\n Total assets:\r\n 0.00 $\r\n \r\n \r\n Net zakatable assets:\r\n 0.00 $\r\n \r\n \r\n Nisab value (85g gold):\r\n ...\r\n \r\n \r\n Enter data to check eligibility\r\n \r\n \r\n \r\n\r\n \r\n \r\n Zakat due (2.5%)\r\n 0.00 $\r\n \r\n \r\n <a>\r\n \r\n Contact via WhatsApp for consultation and donation\r\n </a>\r\n \r\n \r\n \r\n \r\n\r\n\r\n// Zakat Calculator Logic\r\nlet zakatcalculatorPricesLoaded = false;\r\n\r\n// Initialize calculator when DOM is loaded\r\ndocument.addEventListener('DOMContentLoaded', () => {\r\n zakatcalculatorFetchPrices();\r\n zakatcalculatorCalculate();\r\n \r\n // Add input event listeners for real-time calculation\r\n const inputs = document.querySelectorAll('.zakatcalculator-section__input');\r\n inputs.forEach(input => {\r\n input.addEventListener('input', zakatcalculatorCalculate);\r\n });\r\n \r\n // Format numbers as user types\r\n inputs.forEach(input => {\r\n input.addEventListener('blur', function() {\r\n if (this.value) {\r\n const value = parseFloat(this.value);\r\n if (!isNaN(value)) {\r\n this.value = value.toLocaleString('en-US', {\r\n minimumFractionDigits: 2,\r\n maximumFractionDigits: 2\r\n });\r\n }\r\n }\r\n });\r\n \r\n input.addEventListener('focus', function() {\r\n if (this.value) {\r\n this.value = this.value.replace(/[^\\d.]/g, '');\r\n }\r\n });\r\n });\r\n});\r\n\r\n// Fetch metal prices\r\nasync function zakatcalculatorFetchPrices() {\r\n const goldInput = document.getElementById('goldPrice');\r\n const silverInput = document.getElementById('silverPrice');\r\n const refreshButton = document.querySelector('.zakatcalculator-section__refresh-button');\r\n const refreshIcon = document.querySelector('.zakatcalculator-section__refresh-icon');\r\n \r\n if (!refreshButton || !refreshIcon) return;\r\n \r\n // Show loading state\r\n refreshButton.disabled = true;\r\n refreshIcon.classList.add('zakatcalculator-section__refresh-icon--spinning');\r\n goldInput.classList.add('zakatcalculator-section__input--loading');\r\n silverInput.classList.add('zakatcalculator-section__input--loading');\r\n \r\n try {\r\n // Simulate API call with delay\r\n await new Promise(resolve => setTimeout(resolve, 1500));\r\n \r\n // Mock data (in a real app, you would fetch from an API)\r\n const liveGoldPrice = 76.50;\r\n const liveSilverPrice = 0.95;\r\n \r\n // Update inputs\r\n goldInput.value = liveGoldPrice.toFixed(2);\r\n silverInput.value = liveSilverPrice.toFixed(2);\r\n \r\n // Remove loading state\r\n goldInput.classList.remove('zakatcalculator-section__input--loading');\r\n silverInput.classList.remove('zakatcalculator-section__input--loading');\r\n goldInput.classList.add('zakatcalculator-section__input--valid');\r\n silverInput.classList.add('zakatcalculator-section__input--valid');\r\n \r\n zakatcalculatorPricesLoaded = true;\r\n \r\n // Show success feedback\r\n refreshButton.innerHTML = ' Updated';\r\n refreshButton.style.backgroundColor = '#617f67';\r\n refreshButton.style.color = 'white';\r\n \r\n setTimeout(() => {\r\n refreshButton.innerHTML = ' Refresh Prices';\r\n refreshButton.style.backgroundColor = '';\r\n refreshButton.style.color = '';\r\n }, 2000);\r\n \r\n } catch (error) {\r\n console.error(\"Failed to fetch prices\", error);\r\n \r\n // Fallback values\r\n goldInput.value = 75.00;\r\n silverInput.value = 0.90;\r\n \r\n // Show error state\r\n goldInput.classList.remove('zakatcalculator-section__input--loading');\r\n silverInput.classList.remove('zakatcalculator-section__input--loading');\r\n goldInput.classList.add('zakatcalculator-section__input--invalid');\r\n silverInput.classList.add('zakatcalculator-section__input--invalid');\r\n \r\n refreshButton.innerHTML = ' Update Failed';\r\n refreshButton.style.backgroundColor = '#dc2626';\r\n refreshButton.style.color = 'white';\r\n \r\n setTimeout(() => {\r\n refreshButton.innerHTML = ' Refresh Prices';\r\n refreshButton.style.backgroundColor = '';\r\n refreshButton.style.color = '';\r\n }, 2000);\r\n \r\n } finally {\r\n refreshButton.disabled = false;\r\n refreshIcon.classList.remove('zakatcalculator-section__refresh-icon--spinning');\r\n \r\n // Recalculate zakat\r\n zakatcalculatorCalculate();\r\n }\r\n}\r\n\r\n// Calculate zakat\r\nfunction zakatcalculatorCalculate() {\r\n const cashHand = parseFloat(document.getElementById('cashHand').value) || 0;\r\n const cashBank = parseFloat(document.getElementById('cashBank').value) || 0;\r\n const goldWeight = parseFloat(document.getElementById('goldWeight').value) || 0;\r\n const goldPrice = parseFloat(document.getElementById('goldPrice').value) || 0;\r\n const silverWeight = parseFloat(document.getElementById('silverWeight').value) || 0;\r\n const silverPrice = parseFloat(document.getElementById('silverPrice').value) || 0;\r\n \r\n // Calculate totals\r\n const totalAssets = cashHand + cashBank + (goldWeight * goldPrice) + (silverWeight * silverPrice);\r\n const nisabThreshold = 85 * goldPrice;\r\n \r\n // Update display\r\n document.getElementById('totalAssetsDisplay').textContent = \r\n formatCurrency(totalAssets);\r\n \r\n document.getElementById('netAssetsDisplay').textContent = \r\n formatCurrency(totalAssets);\r\n \r\n if (goldPrice > 0) {\r\n document.getElementById('nisabValueDisplay').textContent = \r\n formatCurrency(nisabThreshold);\r\n } else {\r\n document.getElementById('nisabValueDisplay').textContent = '...';\r\n }\r\n \r\n // Update status and final zakat\r\n const statusBadge = document.getElementById('statusBadge');\r\n const finalDisplay = document.getElementById('finalZakatDisplay');\r\n const payButton = document.querySelector('.zakatcalculator-section__pay-button');\r\n \r\n if (totalAssets >= nisabThreshold && goldPrice > 0 && zakatcalculatorPricesLoaded) {\r\n const zakatAmount = totalAssets * 0.025;\r\n finalDisplay.textContent = formatCurrency(zakatAmount);\r\n \r\n // Update status badge\r\n statusBadge.textContent = '✓ Zakat is due (Nisab reached)';\r\n statusBadge.className = 'zakatcalculator-section__status zakatcalculator-section__status--eligible';\r\n \r\n // Enable pay button\r\n payButton.disabled = false;\r\n payButton.innerHTML = ' Pay Zakat Now';\r\n \r\n } else {\r\n finalDisplay.textContent = '0.00 $';\r\n \r\n // Update status badge\r\n if (!zakatcalculatorPricesLoaded) {\r\n statusBadge.textContent = 'Enter data to check eligibility';\r\n statusBadge.className = 'zakatcalculator-section__status zakatcalculator-section__status--not-eligible';\r\n } else if (totalAssets < nisabThreshold) {\r\n statusBadge.textContent = 'Zakat is not due (Nisab not reached)';\r\n statusBadge.className = 'zakatcalculator-section__status zakatcalculator-section__status--not-eligible';\r\n } else {\r\n statusBadge.textContent = 'Enter data to check eligibility';\r\n statusBadge.className = 'zakatcalculator-section__status zakatcalculator-section__status--not-eligible';\r\n }\r\n \r\n // Disable pay button\r\n payButton.disabled = true;\r\n payButton.innerHTML = ' Pay Zakat Now';\r\n }\r\n}\r\n\r\n// Format currency\r\nfunction formatCurrency(amount) {\r\n return new Intl.NumberFormat('en-US', {\r\n style: 'currency',\r\n currency: 'USD',\r\n minimumFractionDigits: 2,\r\n maximumFractionDigits: 2\r\n }).format(amount);\r\n}\r\n\r\n// Add zakat to cart\r\nfunction zakatcalculatorAddToCart() {\r\n const amountText = document.getElementById('finalZakatDisplay').textContent;\r\n const amount = parseFloat(amountText.replace(/[^0-9.-]+/g, \"\"));\r\n \r\n if (amount > 0 && !isNaN(amount)) {\r\n // Use your existing addToCart function\r\n if (typeof addToCart === 'function') {\r\n addToCart('Calculated Zakat', amount, 'Zakat');\r\n } else {\r\n // Fallback if addToCart is not defined\r\n alert(`Calculated Zakat amount: ${amountText}`);\r\n }\r\n } else {\r\n alert(\"Invalid zakat amount. Please check your inputs.\");\r\n }\r\n}\r\n\r\n// Input validation\r\nfunction validateZakatInput(input) {\r\n const value = parseFloat(input.value);\r\n const min = parseFloat(input.getAttribute('min')) || 0;\r\n \r\n if (isNaN(value) || value < min) {\r\n input.classList.add('zakatcalculator-section__input--invalid');\r\n return false;\r\n } else {\r\n input.classList.remove('zakatcalculator-section__input--invalid');\r\n input.classList.add('zakatcalculator-section__input--valid');\r\n return true;\r\n }\r\n}","animate_delay":"0"},"editing":false,"element_name":"gva_text_noeditor"}],"editing":false,"element_name":"gva_column"}],"editing":false,"element_name":"gva_row"},{"settings":{"element":"gva_row","bg_particles":"off","bg_position":"center top","bg_repeat":"no-repeat","bg_attachment":"scroll","bg_size":"cover","style_space":"remove_margin remove_padding remove_padding_col","layout":"container-fw","class":"partner","margin_top":"30","margin_bottom":"30"},"columns":[{"settings":{"element":"gva_column"},"col_lg":12,"elements":[{"settings":{"content":"\r\n \r\n Strategic Partnerships\r\n Our partners in creating hope\r\n \r\n \r\n ","animate_delay":"0"},"editing":false,"element_name":"gva_text_noeditor"},{"settings":{"title_admin":"Partners: Partners Block - en","block_drupal":"views_block__partners_block_2","hidden_title":"on","align_title":"title-align-right","remove_margin":"on","style_text":"text-dark","animate_delay":"0"},"editing":false,"element_name":"gva_drupal_block"}],"editing":false,"element_name":"gva_column"}],"editing":false,"element_name":"gva_row"}]') (Line: 47)
Drupal\gavias_content_builder\Plugin\Field\FieldFormatter\GaviasContentBuilderFormatter->viewElements(Object, 'en') (Line: 89)
Drupal\Core\Field\FormatterBase->view(Object, 'en') (Line: 263)
Drupal\Core\Entity\Entity\EntityViewDisplay->buildMultiple(Array) (Line: 351)
Drupal\Core\Entity\EntityViewBuilder->buildComponents(Array, Array, Array, 'full') (Line: 24)
Drupal\node\NodeViewBuilder->buildComponents(Array, Array, Array, 'full') (Line: 293)
Drupal\Core\Entity\EntityViewBuilder->buildMultiple(Array) (Line: 250)
Drupal\Core\Entity\EntityViewBuilder->build(Array)
call_user_func_array(Array, Array) (Line: 100)
Drupal\Core\Render\Renderer->doTrustedCallback(Array, Array, 'Render #pre_render callbacks must be methods of a class that implements \Drupal\Core\Security\TrustedCallbackInterface or be an anonymous function. The callback was %s. Support for this callback implementation is deprecated in 8.8.0 and will be removed in Drupal 9.0.0. See https://www.drupal.org/node/2966725', 'silenced_deprecation', 'Drupal\Core\Render\Element\RenderCallbackInterface') (Line: 781)
Drupal\Core\Render\Renderer->doCallback('#pre_render', Array, Array) (Line: 372)
Drupal\Core\Render\Renderer->doRender(Array, ) (Line: 200)
Drupal\Core\Render\Renderer->render(Array, ) (Line: 226)
Drupal\Core\Render\MainContent\HtmlRenderer->Drupal\Core\Render\MainContent\{closure}() (Line: 573)
Drupal\Core\Render\Renderer->executeInRenderContext(Object, Object) (Line: 227)
Drupal\Core\Render\MainContent\HtmlRenderer->prepare(Array, Object, Object) (Line: 117)
Drupal\Core\Render\MainContent\HtmlRenderer->renderResponse(Array, Object, Object) (Line: 90)
Drupal\Core\EventSubscriber\MainContentViewSubscriber->onViewRenderArray(Object, 'kernel.view', Object)
call_user_func(Array, Object, 'kernel.view', Object) (Line: 111)
Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher->dispatch('kernel.view', Object) (Line: 156)
Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object, 1) (Line: 68)
Symfony\Component\HttpKernel\HttpKernel->handle(Object, 1, 1) (Line: 57)
Drupal\Core\StackMiddleware\Session->handle(Object, 1, 1) (Line: 47)
Drupal\Core\StackMiddleware\KernelPreHandle->handle(Object, 1, 1) (Line: 191)
Drupal\page_cache\StackMiddleware\PageCache->fetch(Object, 1, 1) (Line: 128)
Drupal\page_cache\StackMiddleware\PageCache->lookup(Object, 1, 1) (Line: 82)
Drupal\page_cache\StackMiddleware\PageCache->handle(Object, 1, 1) (Line: 47)
Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle(Object, 1, 1) (Line: 52)
Drupal\Core\StackMiddleware\NegotiationMiddleware->handle(Object, 1, 1) (Line: 23)
Stack\StackedHttpKernel->handle(Object, 1, 1) (Line: 708)
Drupal\Core\DrupalKernel->handle(Object) (Line: 19)
- Deprecated function: implode(): Passing glue string after array is deprecated. Swap the parameters in element_gva_call_to_action->render_content() (line 152 of themes/gavias_kunco/gva_content_builder/gva_call_to_action.php).
element_gva_call_to_action->render_content(Array, '') (Line: 110)
gavias_content_builder_render_element('gva_call_to_action', Array) (Line: 54)
gavias_content_builder_render_el(Array) (Line: 22)
gavias_content_builder_frontend('[{"settings":{"bg_particles":"off","bg_position":"center top","bg_repeat":"no-repeat","bg_attachment":"scroll","bg_size":"cover","style_space":"remove_padding","layout":"container-fw"},"columns":[{"settings":{"element":"gva_column","bg_position":"center top","bg_repeat":"no-repeat","bg_attachment":"scroll","bg_size":"cover","el_class":"front"},"col_lg":12,"elements":[{"settings":{"content":"\r\n \r\n \r\n \r\n \r\n Urgent Appeal\r\n \r\n Be a helping hand for them in\r\n times of crisis\r\n \r\n \r\n At \"Wejdan Charity\", we work with full transparency to deliver your donations to those in need in conflict and poverty-stricken areas.\r\n \r\n \r\n <a>\r\n Charity Donations \r\n </a>\r\n <a>\r\n Our Projects \r\n </a>\r\n \r\n \r\n \r\n \r\n","animate_delay":"0"},"editing":false,"element_name":"gva_text_noeditor"}],"editing":false,"element_name":"gva_column"}],"editing":false,"element_name":"gva_row"},{"settings":{"element":"gva_row","bg_particles":"off","bg_position":"center top","bg_repeat":"no-repeat","bg_attachment":"scroll","bg_size":"cover","style_space":"remove_padding","layout":"container","class":"before-help-region"},"columns":[{"settings":{"element":"gva_column"},"col_lg":12,"elements":[{"settings":{"title":"Take action for animals now","link":"#","button_title":"Donation Now","button_align":"button-right-v2","style_text":"text-light","style_button":"btn-theme","donorbox":"off","target":"off","el_class":"margin","animate":"fade-up","animate_delay":"0"},"editing":false,"element_name":"gva_call_to_action"}],"editing":false,"element_name":"gva_column"}],"editing":false,"element_name":"gva_row"},{"settings":{"element":"gva_row","bg_particles":"off","bg_position":"center top","bg_repeat":"no-repeat","bg_attachment":"scroll","bg_size":"cover","style_space":"remove_padding","layout":"container-fw","bg_color":"#f9fafb"},"columns":[{"settings":{"element":"gva_column","bg_position":"center top","bg_repeat":"no-repeat","bg_attachment":"scroll","bg_size":"cover","el_class":"about"},"col_lg":12,"elements":[{"settings":{"content":"\r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n \r\n \r\n Who We Are\r\n \r\n \r\n We plant hope.. \r\n and build people and the future\r\n \r\n \r\n Wejdan Charity is a leading humanitarian organization, founded with an ambitious vision to be a bridge of الخير between donors and those in need.\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n Development Stages\r\n A continuous journey of growth\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n Areas of Work\r\n We reach where the need is\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \"We work with passion to bring smiles\"\r\n \r\n \r\n \r\n \r\n \r\n","animate_delay":"0"},"editing":false,"element_name":"gva_text_noeditor"}],"editing":false,"element_name":"gva_column"}],"editing":false,"element_name":"gva_row"},{"settings":{"element":"gva_row","bg_particles":"off","bg_position":"center top","bg_repeat":"no-repeat","bg_attachment":"scroll","bg_size":"cover","style_space":"remove_margin remove_padding remove_padding_col","layout":"container-fw","class":"partner","margin_top":"30","margin_bottom":"30"},"columns":[{"settings":{"element":"gva_column"},"col_lg":12,"elements":[{"settings":{"content":"\r\n\r\n \r\n \r\n Initiatives & Programs\r\n Our Areas of Work\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n Ongoing Charity\r\n Water wells, mosque construction\r\n \r\n \r\n \r\n \r\n \r\n \r\n Student Sponsorship\r\n Building the future through education\r\n \r\n \r\n \r\n \r\n \r\n \r\n Humanitarian Cases\r\n Patient treatment, surgeries\r\n \r\n \r\n \r\n \r\n \r\n \r\n Development Projects\r\n Empowering productive families\r\n \r\n \r\n<a>Learn more about our programs and initiatives</a>\r\n \r\n","animate_delay":"0"},"editing":false,"element_name":"gva_text_noeditor"}],"editing":false,"element_name":"gva_column"}],"editing":false,"element_name":"gva_row"},{"settings":{"element":"gva_row","bg_particles":"off","bg_position":"center top","bg_repeat":"no-repeat","bg_attachment":"scroll","bg_size":"cover","style_space":"remove_margin remove_padding remove_padding_col","layout":"container","class":"newsfront"},"columns":[{"settings":{"element":"gva_column"},"col_lg":12,"elements":[{"settings":{"content":"\r\n \r\n \r\n Our News\r\n \r\n \r\n \r\nNews that tells the story of giving \r\n \r\n","animate_delay":"0"},"editing":false,"element_name":"gva_text_noeditor"},{"settings":{"title_admin":"news: news Block -en","block_drupal":"views_block__news_block_3","hidden_title":"on","align_title":"title-align-left","remove_margin":"on","style_text":"text-dark","animate_delay":"0"},"editing":false,"element_name":"gva_drupal_block"}],"editing":false,"element_name":"gva_column"}],"editing":false,"element_name":"gva_row"},{"settings":{"bg_particles":"off","bg_position":"center top","bg_repeat":"no-repeat","bg_attachment":"scroll","bg_size":"cover","style_space":"remove_padding","layout":"container-fw","element":"gva_row","class":"sliderfrontpage"},"columns":[{"settings":{"element":"gva_column","bg_position":"center top","bg_repeat":"no-repeat","bg_attachment":"scroll","bg_size":"cover"},"col_lg":12,"elements":[{"settings":{"title_admin":"news: campigns-en","block_drupal":"views_block__news_block_5","hidden_title":"on","align_title":"title-align-right","remove_margin":"on","style_text":"text-dark","animate_delay":"0"},"editing":false,"element_name":"gva_drupal_block"}],"editing":false,"element_name":"gva_column"}],"editing":false,"element_name":"gva_row"},{"settings":{"element":"gva_row","bg_particles":"off","bg_position":"center top","bg_repeat":"no-repeat","bg_attachment":"scroll","bg_size":"cover","style_space":"remove_margin remove_padding remove_padding_col","layout":"container-fw","class":"partner"},"columns":[{"settings":{"element":"gva_column"},"col_lg":12,"elements":[{"settings":{"content":"\r\n \r\n \r\n \r\n Our Distinguished Projects\r\n \r\n \r\n \r\n At Wejdan Charity, we strive to provide support and assistance to communities in need who are affected by disasters, crises, and wars, with the aim of improving quality of life and promoting sustainable development. Our projects span across several areas:\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n Relief Projects\r\n Emergency response to disasters and wars, providing food and medicine.\r\n \r\n<a> Browse Projects </a>\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n Development Projects\r\n Empowering communities and building capacities.\r\n \r\n<a> Browse Projects </a>\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n Seasonal Projects\r\n Ramadan campaigns, Qurbani, and winter clothing.\r\n \r\n<a> Browse Projects </a>\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n Endowment Projects\r\n An investment for the hereafter—mosques, wells, and charitable endowments.\r\n<a> Browse Projects </a>\r\n \r\n \r\n \r\n \r\n","animate_delay":"0"},"editing":false,"element_name":"gva_text_noeditor"}],"editing":false,"element_name":"gva_column"}],"editing":false,"element_name":"gva_row"},{"settings":{"element":"gva_row","bg_particles":"off","bg_position":"center top","bg_repeat":"no-repeat","bg_attachment":"scroll","bg_size":"cover","style_space":"remove_margin remove_padding remove_padding_col","layout":"container-fw","class":"partner"},"columns":[{"settings":{"element":"gva_column"},"col_lg":12,"elements":[{"settings":{"content":"\r\n \r\n \r\n\r\n \r\n \r\n Our Achievements in Numbers\r\n Your trust makes the difference\r\n \r\n \r\n\r\n \r\n \r\n 0\r\n Beneficiaries worldwide\r\n \r\n \r\n \r\n 0\r\n Projects implemented\r\n \r\n \r\n \r\n 0\r\n Countries we operate in\r\n \r\n \r\n \r\n 0\r\n Volunteers\r\n \r\n \r\n \r\n \r\n\r\n\r\n// Enhanced counter animation for facts section\r\nfunction animateFactsCounters() {\r\n const statNumbers = document.querySelectorAll('.facts-section__stat-number');\r\n \r\n const observer = new IntersectionObserver((entries) => {\r\n entries.forEach(entry => {\r\n if (entry.isIntersecting) {\r\n const counter = entry.target;\r\n const target = parseInt(counter.getAttribute('data-target'));\r\n const duration = 2000;\r\n const increment = target / (duration / 16);\r\n \r\n let current = 0;\r\n const updateCounter = () => {\r\n current += increment;\r\n if (current < target) {\r\n // Format number with K for thousands\r\n let displayNum = Math.ceil(current);\r\n if (displayNum >= 1000) {\r\n counter.textContent = (displayNum / 1000).toFixed(1).replace('.0', '') + 'K';\r\n } else {\r\n counter.textContent = displayNum.toLocaleString();\r\n }\r\n requestAnimationFrame(updateCounter);\r\n } else {\r\n // Final formatting\r\n if (target >= 1000) {\r\n counter.textContent = (target / 1000).toFixed(1).replace('.0', '') + 'K';\r\n counter.classList.add('formatted');\r\n } else {\r\n counter.textContent = target.toLocaleString();\r\n }\r\n counter.classList.add('animated');\r\n setTimeout(() => counter.classList.remove('animated'), 600);\r\n }\r\n };\r\n updateCounter();\r\n observer.unobserve(counter);\r\n }\r\n });\r\n }, { threshold: 0.5, rootMargin: '0px 0px -50px 0px' });\r\n \r\n statNumbers.forEach(counter => observer.observe(counter));\r\n}\r\n\r\n// Call this function when DOM is loaded\r\ndocument.addEventListener('DOMContentLoaded', () => {\r\n animateFactsCounters();\r\n});","animate_delay":"0"},"editing":false,"element_name":"gva_text_noeditor"}],"editing":false,"element_name":"gva_column"}],"editing":false,"element_name":"gva_row"},{"settings":{"element":"gva_row","bg_particles":"off","bg_position":"center top","bg_repeat":"no-repeat","bg_attachment":"scroll","bg_size":"cover","style_space":"remove_margin remove_padding remove_padding_col","layout":"container-fw","class":"zakatcalc"},"columns":[{"settings":{"element":"gva_column"},"col_lg":12,"elements":[{"settings":{"content":"\r\n\r\n \r\n \r\n \r\n \r\nSmart Zakat Calculator\r\n A precise and comprehensive tool\r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n \r\n \r\n Money & Savings\r\n \r\n \r\n \r\n Cash (on hand or at home)\r\n \r\n \r\n $\r\n \r\n \r\n \r\n Bank balances\r\n \r\n \r\n $\r\n \r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n Gold & Silver\r\n \r\n \r\n Refresh Prices\r\n \r\n \r\n \r\n \r\n \r\n Gold weight (grams)\r\n \r\n \r\n \r\n \r\n Current gold price per gram\r\n \r\n Live\r\n \r\n \r\n \r\n \r\n $ / gram\r\n \r\n \r\n \r\n\r\n \r\n \r\n Silver weight (grams)\r\n \r\n \r\n \r\n \r\n Current silver price per gram\r\n \r\n Live\r\n \r\n \r\n \r\n \r\n $ / gram\r\n \r\n \r\n \r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n Zakat Summary\r\n \r\n \r\n Total assets:\r\n 0.00 $\r\n \r\n \r\n Net zakatable assets:\r\n 0.00 $\r\n \r\n \r\n Nisab value (85g gold):\r\n ...\r\n \r\n \r\n Enter data to check eligibility\r\n \r\n \r\n \r\n\r\n \r\n \r\n Zakat due (2.5%)\r\n 0.00 $\r\n \r\n \r\n <a>\r\n \r\n Contact via WhatsApp for consultation and donation\r\n </a>\r\n \r\n \r\n \r\n \r\n\r\n\r\n// Zakat Calculator Logic\r\nlet zakatcalculatorPricesLoaded = false;\r\n\r\n// Initialize calculator when DOM is loaded\r\ndocument.addEventListener('DOMContentLoaded', () => {\r\n zakatcalculatorFetchPrices();\r\n zakatcalculatorCalculate();\r\n \r\n // Add input event listeners for real-time calculation\r\n const inputs = document.querySelectorAll('.zakatcalculator-section__input');\r\n inputs.forEach(input => {\r\n input.addEventListener('input', zakatcalculatorCalculate);\r\n });\r\n \r\n // Format numbers as user types\r\n inputs.forEach(input => {\r\n input.addEventListener('blur', function() {\r\n if (this.value) {\r\n const value = parseFloat(this.value);\r\n if (!isNaN(value)) {\r\n this.value = value.toLocaleString('en-US', {\r\n minimumFractionDigits: 2,\r\n maximumFractionDigits: 2\r\n });\r\n }\r\n }\r\n });\r\n \r\n input.addEventListener('focus', function() {\r\n if (this.value) {\r\n this.value = this.value.replace(/[^\\d.]/g, '');\r\n }\r\n });\r\n });\r\n});\r\n\r\n// Fetch metal prices\r\nasync function zakatcalculatorFetchPrices() {\r\n const goldInput = document.getElementById('goldPrice');\r\n const silverInput = document.getElementById('silverPrice');\r\n const refreshButton = document.querySelector('.zakatcalculator-section__refresh-button');\r\n const refreshIcon = document.querySelector('.zakatcalculator-section__refresh-icon');\r\n \r\n if (!refreshButton || !refreshIcon) return;\r\n \r\n // Show loading state\r\n refreshButton.disabled = true;\r\n refreshIcon.classList.add('zakatcalculator-section__refresh-icon--spinning');\r\n goldInput.classList.add('zakatcalculator-section__input--loading');\r\n silverInput.classList.add('zakatcalculator-section__input--loading');\r\n \r\n try {\r\n // Simulate API call with delay\r\n await new Promise(resolve => setTimeout(resolve, 1500));\r\n \r\n // Mock data (in a real app, you would fetch from an API)\r\n const liveGoldPrice = 76.50;\r\n const liveSilverPrice = 0.95;\r\n \r\n // Update inputs\r\n goldInput.value = liveGoldPrice.toFixed(2);\r\n silverInput.value = liveSilverPrice.toFixed(2);\r\n \r\n // Remove loading state\r\n goldInput.classList.remove('zakatcalculator-section__input--loading');\r\n silverInput.classList.remove('zakatcalculator-section__input--loading');\r\n goldInput.classList.add('zakatcalculator-section__input--valid');\r\n silverInput.classList.add('zakatcalculator-section__input--valid');\r\n \r\n zakatcalculatorPricesLoaded = true;\r\n \r\n // Show success feedback\r\n refreshButton.innerHTML = ' Updated';\r\n refreshButton.style.backgroundColor = '#617f67';\r\n refreshButton.style.color = 'white';\r\n \r\n setTimeout(() => {\r\n refreshButton.innerHTML = ' Refresh Prices';\r\n refreshButton.style.backgroundColor = '';\r\n refreshButton.style.color = '';\r\n }, 2000);\r\n \r\n } catch (error) {\r\n console.error(\"Failed to fetch prices\", error);\r\n \r\n // Fallback values\r\n goldInput.value = 75.00;\r\n silverInput.value = 0.90;\r\n \r\n // Show error state\r\n goldInput.classList.remove('zakatcalculator-section__input--loading');\r\n silverInput.classList.remove('zakatcalculator-section__input--loading');\r\n goldInput.classList.add('zakatcalculator-section__input--invalid');\r\n silverInput.classList.add('zakatcalculator-section__input--invalid');\r\n \r\n refreshButton.innerHTML = ' Update Failed';\r\n refreshButton.style.backgroundColor = '#dc2626';\r\n refreshButton.style.color = 'white';\r\n \r\n setTimeout(() => {\r\n refreshButton.innerHTML = ' Refresh Prices';\r\n refreshButton.style.backgroundColor = '';\r\n refreshButton.style.color = '';\r\n }, 2000);\r\n \r\n } finally {\r\n refreshButton.disabled = false;\r\n refreshIcon.classList.remove('zakatcalculator-section__refresh-icon--spinning');\r\n \r\n // Recalculate zakat\r\n zakatcalculatorCalculate();\r\n }\r\n}\r\n\r\n// Calculate zakat\r\nfunction zakatcalculatorCalculate() {\r\n const cashHand = parseFloat(document.getElementById('cashHand').value) || 0;\r\n const cashBank = parseFloat(document.getElementById('cashBank').value) || 0;\r\n const goldWeight = parseFloat(document.getElementById('goldWeight').value) || 0;\r\n const goldPrice = parseFloat(document.getElementById('goldPrice').value) || 0;\r\n const silverWeight = parseFloat(document.getElementById('silverWeight').value) || 0;\r\n const silverPrice = parseFloat(document.getElementById('silverPrice').value) || 0;\r\n \r\n // Calculate totals\r\n const totalAssets = cashHand + cashBank + (goldWeight * goldPrice) + (silverWeight * silverPrice);\r\n const nisabThreshold = 85 * goldPrice;\r\n \r\n // Update display\r\n document.getElementById('totalAssetsDisplay').textContent = \r\n formatCurrency(totalAssets);\r\n \r\n document.getElementById('netAssetsDisplay').textContent = \r\n formatCurrency(totalAssets);\r\n \r\n if (goldPrice > 0) {\r\n document.getElementById('nisabValueDisplay').textContent = \r\n formatCurrency(nisabThreshold);\r\n } else {\r\n document.getElementById('nisabValueDisplay').textContent = '...';\r\n }\r\n \r\n // Update status and final zakat\r\n const statusBadge = document.getElementById('statusBadge');\r\n const finalDisplay = document.getElementById('finalZakatDisplay');\r\n const payButton = document.querySelector('.zakatcalculator-section__pay-button');\r\n \r\n if (totalAssets >= nisabThreshold && goldPrice > 0 && zakatcalculatorPricesLoaded) {\r\n const zakatAmount = totalAssets * 0.025;\r\n finalDisplay.textContent = formatCurrency(zakatAmount);\r\n \r\n // Update status badge\r\n statusBadge.textContent = '✓ Zakat is due (Nisab reached)';\r\n statusBadge.className = 'zakatcalculator-section__status zakatcalculator-section__status--eligible';\r\n \r\n // Enable pay button\r\n payButton.disabled = false;\r\n payButton.innerHTML = ' Pay Zakat Now';\r\n \r\n } else {\r\n finalDisplay.textContent = '0.00 $';\r\n \r\n // Update status badge\r\n if (!zakatcalculatorPricesLoaded) {\r\n statusBadge.textContent = 'Enter data to check eligibility';\r\n statusBadge.className = 'zakatcalculator-section__status zakatcalculator-section__status--not-eligible';\r\n } else if (totalAssets < nisabThreshold) {\r\n statusBadge.textContent = 'Zakat is not due (Nisab not reached)';\r\n statusBadge.className = 'zakatcalculator-section__status zakatcalculator-section__status--not-eligible';\r\n } else {\r\n statusBadge.textContent = 'Enter data to check eligibility';\r\n statusBadge.className = 'zakatcalculator-section__status zakatcalculator-section__status--not-eligible';\r\n }\r\n \r\n // Disable pay button\r\n payButton.disabled = true;\r\n payButton.innerHTML = ' Pay Zakat Now';\r\n }\r\n}\r\n\r\n// Format currency\r\nfunction formatCurrency(amount) {\r\n return new Intl.NumberFormat('en-US', {\r\n style: 'currency',\r\n currency: 'USD',\r\n minimumFractionDigits: 2,\r\n maximumFractionDigits: 2\r\n }).format(amount);\r\n}\r\n\r\n// Add zakat to cart\r\nfunction zakatcalculatorAddToCart() {\r\n const amountText = document.getElementById('finalZakatDisplay').textContent;\r\n const amount = parseFloat(amountText.replace(/[^0-9.-]+/g, \"\"));\r\n \r\n if (amount > 0 && !isNaN(amount)) {\r\n // Use your existing addToCart function\r\n if (typeof addToCart === 'function') {\r\n addToCart('Calculated Zakat', amount, 'Zakat');\r\n } else {\r\n // Fallback if addToCart is not defined\r\n alert(`Calculated Zakat amount: ${amountText}`);\r\n }\r\n } else {\r\n alert(\"Invalid zakat amount. Please check your inputs.\");\r\n }\r\n}\r\n\r\n// Input validation\r\nfunction validateZakatInput(input) {\r\n const value = parseFloat(input.value);\r\n const min = parseFloat(input.getAttribute('min')) || 0;\r\n \r\n if (isNaN(value) || value < min) {\r\n input.classList.add('zakatcalculator-section__input--invalid');\r\n return false;\r\n } else {\r\n input.classList.remove('zakatcalculator-section__input--invalid');\r\n input.classList.add('zakatcalculator-section__input--valid');\r\n return true;\r\n }\r\n}","animate_delay":"0"},"editing":false,"element_name":"gva_text_noeditor"}],"editing":false,"element_name":"gva_column"}],"editing":false,"element_name":"gva_row"},{"settings":{"element":"gva_row","bg_particles":"off","bg_position":"center top","bg_repeat":"no-repeat","bg_attachment":"scroll","bg_size":"cover","style_space":"remove_margin remove_padding remove_padding_col","layout":"container-fw","class":"partner","margin_top":"30","margin_bottom":"30"},"columns":[{"settings":{"element":"gva_column"},"col_lg":12,"elements":[{"settings":{"content":"\r\n \r\n Strategic Partnerships\r\n Our partners in creating hope\r\n \r\n \r\n ","animate_delay":"0"},"editing":false,"element_name":"gva_text_noeditor"},{"settings":{"title_admin":"Partners: Partners Block - en","block_drupal":"views_block__partners_block_2","hidden_title":"on","align_title":"title-align-right","remove_margin":"on","style_text":"text-dark","animate_delay":"0"},"editing":false,"element_name":"gva_drupal_block"}],"editing":false,"element_name":"gva_column"}],"editing":false,"element_name":"gva_row"}]') (Line: 47)
Drupal\gavias_content_builder\Plugin\Field\FieldFormatter\GaviasContentBuilderFormatter->viewElements(Object, 'en') (Line: 89)
Drupal\Core\Field\FormatterBase->view(Object, 'en') (Line: 263)
Drupal\Core\Entity\Entity\EntityViewDisplay->buildMultiple(Array) (Line: 351)
Drupal\Core\Entity\EntityViewBuilder->buildComponents(Array, Array, Array, 'full') (Line: 24)
Drupal\node\NodeViewBuilder->buildComponents(Array, Array, Array, 'full') (Line: 293)
Drupal\Core\Entity\EntityViewBuilder->buildMultiple(Array) (Line: 250)
Drupal\Core\Entity\EntityViewBuilder->build(Array)
call_user_func_array(Array, Array) (Line: 100)
Drupal\Core\Render\Renderer->doTrustedCallback(Array, Array, 'Render #pre_render callbacks must be methods of a class that implements \Drupal\Core\Security\TrustedCallbackInterface or be an anonymous function. The callback was %s. Support for this callback implementation is deprecated in 8.8.0 and will be removed in Drupal 9.0.0. See https://www.drupal.org/node/2966725', 'silenced_deprecation', 'Drupal\Core\Render\Element\RenderCallbackInterface') (Line: 781)
Drupal\Core\Render\Renderer->doCallback('#pre_render', Array, Array) (Line: 372)
Drupal\Core\Render\Renderer->doRender(Array, ) (Line: 200)
Drupal\Core\Render\Renderer->render(Array, ) (Line: 226)
Drupal\Core\Render\MainContent\HtmlRenderer->Drupal\Core\Render\MainContent\{closure}() (Line: 573)
Drupal\Core\Render\Renderer->executeInRenderContext(Object, Object) (Line: 227)
Drupal\Core\Render\MainContent\HtmlRenderer->prepare(Array, Object, Object) (Line: 117)
Drupal\Core\Render\MainContent\HtmlRenderer->renderResponse(Array, Object, Object) (Line: 90)
Drupal\Core\EventSubscriber\MainContentViewSubscriber->onViewRenderArray(Object, 'kernel.view', Object)
call_user_func(Array, Object, 'kernel.view', Object) (Line: 111)
Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher->dispatch('kernel.view', Object) (Line: 156)
Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object, 1) (Line: 68)
Symfony\Component\HttpKernel\HttpKernel->handle(Object, 1, 1) (Line: 57)
Drupal\Core\StackMiddleware\Session->handle(Object, 1, 1) (Line: 47)
Drupal\Core\StackMiddleware\KernelPreHandle->handle(Object, 1, 1) (Line: 191)
Drupal\page_cache\StackMiddleware\PageCache->fetch(Object, 1, 1) (Line: 128)
Drupal\page_cache\StackMiddleware\PageCache->lookup(Object, 1, 1) (Line: 82)
Drupal\page_cache\StackMiddleware\PageCache->handle(Object, 1, 1) (Line: 47)
Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle(Object, 1, 1) (Line: 52)
Drupal\Core\StackMiddleware\NegotiationMiddleware->handle(Object, 1, 1) (Line: 23)
Stack\StackedHttpKernel->handle(Object, 1, 1) (Line: 708)
Drupal\Core\DrupalKernel->handle(Object) (Line: 19)
- Deprecated function: implode(): Passing glue string after array is deprecated. Swap the parameters in element_gva_column->render_content() (line 462 of themes/gavias_kunco/gva_content_builder/gva_column.php).
element_gva_column->render_content(Array, '
Take action for animals now
<a href="#" class="btn-theme">Donation Now</a>
') (Line: 110)
gavias_content_builder_render_element('gva_column', Array, '
Take action for animals now
<a href="#" class="btn-theme">Donation Now</a>
') (Line: 58)
gavias_content_builder_render_el(Array) (Line: 22)
gavias_content_builder_frontend('[{"settings":{"bg_particles":"off","bg_position":"center top","bg_repeat":"no-repeat","bg_attachment":"scroll","bg_size":"cover","style_space":"remove_padding","layout":"container-fw"},"columns":[{"settings":{"element":"gva_column","bg_position":"center top","bg_repeat":"no-repeat","bg_attachment":"scroll","bg_size":"cover","el_class":"front"},"col_lg":12,"elements":[{"settings":{"content":"\r\n \r\n \r\n \r\n \r\n Urgent Appeal\r\n \r\n Be a helping hand for them in\r\n times of crisis\r\n \r\n \r\n At \"Wejdan Charity\", we work with full transparency to deliver your donations to those in need in conflict and poverty-stricken areas.\r\n \r\n \r\n <a>\r\n Charity Donations \r\n </a>\r\n <a>\r\n Our Projects \r\n </a>\r\n \r\n \r\n \r\n \r\n","animate_delay":"0"},"editing":false,"element_name":"gva_text_noeditor"}],"editing":false,"element_name":"gva_column"}],"editing":false,"element_name":"gva_row"},{"settings":{"element":"gva_row","bg_particles":"off","bg_position":"center top","bg_repeat":"no-repeat","bg_attachment":"scroll","bg_size":"cover","style_space":"remove_padding","layout":"container","class":"before-help-region"},"columns":[{"settings":{"element":"gva_column"},"col_lg":12,"elements":[{"settings":{"title":"Take action for animals now","link":"#","button_title":"Donation Now","button_align":"button-right-v2","style_text":"text-light","style_button":"btn-theme","donorbox":"off","target":"off","el_class":"margin","animate":"fade-up","animate_delay":"0"},"editing":false,"element_name":"gva_call_to_action"}],"editing":false,"element_name":"gva_column"}],"editing":false,"element_name":"gva_row"},{"settings":{"element":"gva_row","bg_particles":"off","bg_position":"center top","bg_repeat":"no-repeat","bg_attachment":"scroll","bg_size":"cover","style_space":"remove_padding","layout":"container-fw","bg_color":"#f9fafb"},"columns":[{"settings":{"element":"gva_column","bg_position":"center top","bg_repeat":"no-repeat","bg_attachment":"scroll","bg_size":"cover","el_class":"about"},"col_lg":12,"elements":[{"settings":{"content":"\r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n \r\n \r\n Who We Are\r\n \r\n \r\n We plant hope.. \r\n and build people and the future\r\n \r\n \r\n Wejdan Charity is a leading humanitarian organization, founded with an ambitious vision to be a bridge of الخير between donors and those in need.\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n Development Stages\r\n A continuous journey of growth\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n Areas of Work\r\n We reach where the need is\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \"We work with passion to bring smiles\"\r\n \r\n \r\n \r\n \r\n \r\n","animate_delay":"0"},"editing":false,"element_name":"gva_text_noeditor"}],"editing":false,"element_name":"gva_column"}],"editing":false,"element_name":"gva_row"},{"settings":{"element":"gva_row","bg_particles":"off","bg_position":"center top","bg_repeat":"no-repeat","bg_attachment":"scroll","bg_size":"cover","style_space":"remove_margin remove_padding remove_padding_col","layout":"container-fw","class":"partner","margin_top":"30","margin_bottom":"30"},"columns":[{"settings":{"element":"gva_column"},"col_lg":12,"elements":[{"settings":{"content":"\r\n\r\n \r\n \r\n Initiatives & Programs\r\n Our Areas of Work\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n Ongoing Charity\r\n Water wells, mosque construction\r\n \r\n \r\n \r\n \r\n \r\n \r\n Student Sponsorship\r\n Building the future through education\r\n \r\n \r\n \r\n \r\n \r\n \r\n Humanitarian Cases\r\n Patient treatment, surgeries\r\n \r\n \r\n \r\n \r\n \r\n \r\n Development Projects\r\n Empowering productive families\r\n \r\n \r\n<a>Learn more about our programs and initiatives</a>\r\n \r\n","animate_delay":"0"},"editing":false,"element_name":"gva_text_noeditor"}],"editing":false,"element_name":"gva_column"}],"editing":false,"element_name":"gva_row"},{"settings":{"element":"gva_row","bg_particles":"off","bg_position":"center top","bg_repeat":"no-repeat","bg_attachment":"scroll","bg_size":"cover","style_space":"remove_margin remove_padding remove_padding_col","layout":"container","class":"newsfront"},"columns":[{"settings":{"element":"gva_column"},"col_lg":12,"elements":[{"settings":{"content":"\r\n \r\n \r\n Our News\r\n \r\n \r\n \r\nNews that tells the story of giving \r\n \r\n","animate_delay":"0"},"editing":false,"element_name":"gva_text_noeditor"},{"settings":{"title_admin":"news: news Block -en","block_drupal":"views_block__news_block_3","hidden_title":"on","align_title":"title-align-left","remove_margin":"on","style_text":"text-dark","animate_delay":"0"},"editing":false,"element_name":"gva_drupal_block"}],"editing":false,"element_name":"gva_column"}],"editing":false,"element_name":"gva_row"},{"settings":{"bg_particles":"off","bg_position":"center top","bg_repeat":"no-repeat","bg_attachment":"scroll","bg_size":"cover","style_space":"remove_padding","layout":"container-fw","element":"gva_row","class":"sliderfrontpage"},"columns":[{"settings":{"element":"gva_column","bg_position":"center top","bg_repeat":"no-repeat","bg_attachment":"scroll","bg_size":"cover"},"col_lg":12,"elements":[{"settings":{"title_admin":"news: campigns-en","block_drupal":"views_block__news_block_5","hidden_title":"on","align_title":"title-align-right","remove_margin":"on","style_text":"text-dark","animate_delay":"0"},"editing":false,"element_name":"gva_drupal_block"}],"editing":false,"element_name":"gva_column"}],"editing":false,"element_name":"gva_row"},{"settings":{"element":"gva_row","bg_particles":"off","bg_position":"center top","bg_repeat":"no-repeat","bg_attachment":"scroll","bg_size":"cover","style_space":"remove_margin remove_padding remove_padding_col","layout":"container-fw","class":"partner"},"columns":[{"settings":{"element":"gva_column"},"col_lg":12,"elements":[{"settings":{"content":"\r\n \r\n \r\n \r\n Our Distinguished Projects\r\n \r\n \r\n \r\n At Wejdan Charity, we strive to provide support and assistance to communities in need who are affected by disasters, crises, and wars, with the aim of improving quality of life and promoting sustainable development. Our projects span across several areas:\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n Relief Projects\r\n Emergency response to disasters and wars, providing food and medicine.\r\n \r\n<a> Browse Projects </a>\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n Development Projects\r\n Empowering communities and building capacities.\r\n \r\n<a> Browse Projects </a>\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n Seasonal Projects\r\n Ramadan campaigns, Qurbani, and winter clothing.\r\n \r\n<a> Browse Projects </a>\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n Endowment Projects\r\n An investment for the hereafter—mosques, wells, and charitable endowments.\r\n<a> Browse Projects </a>\r\n \r\n \r\n \r\n \r\n","animate_delay":"0"},"editing":false,"element_name":"gva_text_noeditor"}],"editing":false,"element_name":"gva_column"}],"editing":false,"element_name":"gva_row"},{"settings":{"element":"gva_row","bg_particles":"off","bg_position":"center top","bg_repeat":"no-repeat","bg_attachment":"scroll","bg_size":"cover","style_space":"remove_margin remove_padding remove_padding_col","layout":"container-fw","class":"partner"},"columns":[{"settings":{"element":"gva_column"},"col_lg":12,"elements":[{"settings":{"content":"\r\n \r\n \r\n\r\n \r\n \r\n Our Achievements in Numbers\r\n Your trust makes the difference\r\n \r\n \r\n\r\n \r\n \r\n 0\r\n Beneficiaries worldwide\r\n \r\n \r\n \r\n 0\r\n Projects implemented\r\n \r\n \r\n \r\n 0\r\n Countries we operate in\r\n \r\n \r\n \r\n 0\r\n Volunteers\r\n \r\n \r\n \r\n \r\n\r\n\r\n// Enhanced counter animation for facts section\r\nfunction animateFactsCounters() {\r\n const statNumbers = document.querySelectorAll('.facts-section__stat-number');\r\n \r\n const observer = new IntersectionObserver((entries) => {\r\n entries.forEach(entry => {\r\n if (entry.isIntersecting) {\r\n const counter = entry.target;\r\n const target = parseInt(counter.getAttribute('data-target'));\r\n const duration = 2000;\r\n const increment = target / (duration / 16);\r\n \r\n let current = 0;\r\n const updateCounter = () => {\r\n current += increment;\r\n if (current < target) {\r\n // Format number with K for thousands\r\n let displayNum = Math.ceil(current);\r\n if (displayNum >= 1000) {\r\n counter.textContent = (displayNum / 1000).toFixed(1).replace('.0', '') + 'K';\r\n } else {\r\n counter.textContent = displayNum.toLocaleString();\r\n }\r\n requestAnimationFrame(updateCounter);\r\n } else {\r\n // Final formatting\r\n if (target >= 1000) {\r\n counter.textContent = (target / 1000).toFixed(1).replace('.0', '') + 'K';\r\n counter.classList.add('formatted');\r\n } else {\r\n counter.textContent = target.toLocaleString();\r\n }\r\n counter.classList.add('animated');\r\n setTimeout(() => counter.classList.remove('animated'), 600);\r\n }\r\n };\r\n updateCounter();\r\n observer.unobserve(counter);\r\n }\r\n });\r\n }, { threshold: 0.5, rootMargin: '0px 0px -50px 0px' });\r\n \r\n statNumbers.forEach(counter => observer.observe(counter));\r\n}\r\n\r\n// Call this function when DOM is loaded\r\ndocument.addEventListener('DOMContentLoaded', () => {\r\n animateFactsCounters();\r\n});","animate_delay":"0"},"editing":false,"element_name":"gva_text_noeditor"}],"editing":false,"element_name":"gva_column"}],"editing":false,"element_name":"gva_row"},{"settings":{"element":"gva_row","bg_particles":"off","bg_position":"center top","bg_repeat":"no-repeat","bg_attachment":"scroll","bg_size":"cover","style_space":"remove_margin remove_padding remove_padding_col","layout":"container-fw","class":"zakatcalc"},"columns":[{"settings":{"element":"gva_column"},"col_lg":12,"elements":[{"settings":{"content":"\r\n\r\n \r\n \r\n \r\n \r\nSmart Zakat Calculator\r\n A precise and comprehensive tool\r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n \r\n \r\n Money & Savings\r\n \r\n \r\n \r\n Cash (on hand or at home)\r\n \r\n \r\n $\r\n \r\n \r\n \r\n Bank balances\r\n \r\n \r\n $\r\n \r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n Gold & Silver\r\n \r\n \r\n Refresh Prices\r\n \r\n \r\n \r\n \r\n \r\n Gold weight (grams)\r\n \r\n \r\n \r\n \r\n Current gold price per gram\r\n \r\n Live\r\n \r\n \r\n \r\n \r\n $ / gram\r\n \r\n \r\n \r\n\r\n \r\n \r\n Silver weight (grams)\r\n \r\n \r\n \r\n \r\n Current silver price per gram\r\n \r\n Live\r\n \r\n \r\n \r\n \r\n $ / gram\r\n \r\n \r\n \r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n Zakat Summary\r\n \r\n \r\n Total assets:\r\n 0.00 $\r\n \r\n \r\n Net zakatable assets:\r\n 0.00 $\r\n \r\n \r\n Nisab value (85g gold):\r\n ...\r\n \r\n \r\n Enter data to check eligibility\r\n \r\n \r\n \r\n\r\n \r\n \r\n Zakat due (2.5%)\r\n 0.00 $\r\n \r\n \r\n <a>\r\n \r\n Contact via WhatsApp for consultation and donation\r\n </a>\r\n \r\n \r\n \r\n \r\n\r\n\r\n// Zakat Calculator Logic\r\nlet zakatcalculatorPricesLoaded = false;\r\n\r\n// Initialize calculator when DOM is loaded\r\ndocument.addEventListener('DOMContentLoaded', () => {\r\n zakatcalculatorFetchPrices();\r\n zakatcalculatorCalculate();\r\n \r\n // Add input event listeners for real-time calculation\r\n const inputs = document.querySelectorAll('.zakatcalculator-section__input');\r\n inputs.forEach(input => {\r\n input.addEventListener('input', zakatcalculatorCalculate);\r\n });\r\n \r\n // Format numbers as user types\r\n inputs.forEach(input => {\r\n input.addEventListener('blur', function() {\r\n if (this.value) {\r\n const value = parseFloat(this.value);\r\n if (!isNaN(value)) {\r\n this.value = value.toLocaleString('en-US', {\r\n minimumFractionDigits: 2,\r\n maximumFractionDigits: 2\r\n });\r\n }\r\n }\r\n });\r\n \r\n input.addEventListener('focus', function() {\r\n if (this.value) {\r\n this.value = this.value.replace(/[^\\d.]/g, '');\r\n }\r\n });\r\n });\r\n});\r\n\r\n// Fetch metal prices\r\nasync function zakatcalculatorFetchPrices() {\r\n const goldInput = document.getElementById('goldPrice');\r\n const silverInput = document.getElementById('silverPrice');\r\n const refreshButton = document.querySelector('.zakatcalculator-section__refresh-button');\r\n const refreshIcon = document.querySelector('.zakatcalculator-section__refresh-icon');\r\n \r\n if (!refreshButton || !refreshIcon) return;\r\n \r\n // Show loading state\r\n refreshButton.disabled = true;\r\n refreshIcon.classList.add('zakatcalculator-section__refresh-icon--spinning');\r\n goldInput.classList.add('zakatcalculator-section__input--loading');\r\n silverInput.classList.add('zakatcalculator-section__input--loading');\r\n \r\n try {\r\n // Simulate API call with delay\r\n await new Promise(resolve => setTimeout(resolve, 1500));\r\n \r\n // Mock data (in a real app, you would fetch from an API)\r\n const liveGoldPrice = 76.50;\r\n const liveSilverPrice = 0.95;\r\n \r\n // Update inputs\r\n goldInput.value = liveGoldPrice.toFixed(2);\r\n silverInput.value = liveSilverPrice.toFixed(2);\r\n \r\n // Remove loading state\r\n goldInput.classList.remove('zakatcalculator-section__input--loading');\r\n silverInput.classList.remove('zakatcalculator-section__input--loading');\r\n goldInput.classList.add('zakatcalculator-section__input--valid');\r\n silverInput.classList.add('zakatcalculator-section__input--valid');\r\n \r\n zakatcalculatorPricesLoaded = true;\r\n \r\n // Show success feedback\r\n refreshButton.innerHTML = ' Updated';\r\n refreshButton.style.backgroundColor = '#617f67';\r\n refreshButton.style.color = 'white';\r\n \r\n setTimeout(() => {\r\n refreshButton.innerHTML = ' Refresh Prices';\r\n refreshButton.style.backgroundColor = '';\r\n refreshButton.style.color = '';\r\n }, 2000);\r\n \r\n } catch (error) {\r\n console.error(\"Failed to fetch prices\", error);\r\n \r\n // Fallback values\r\n goldInput.value = 75.00;\r\n silverInput.value = 0.90;\r\n \r\n // Show error state\r\n goldInput.classList.remove('zakatcalculator-section__input--loading');\r\n silverInput.classList.remove('zakatcalculator-section__input--loading');\r\n goldInput.classList.add('zakatcalculator-section__input--invalid');\r\n silverInput.classList.add('zakatcalculator-section__input--invalid');\r\n \r\n refreshButton.innerHTML = ' Update Failed';\r\n refreshButton.style.backgroundColor = '#dc2626';\r\n refreshButton.style.color = 'white';\r\n \r\n setTimeout(() => {\r\n refreshButton.innerHTML = ' Refresh Prices';\r\n refreshButton.style.backgroundColor = '';\r\n refreshButton.style.color = '';\r\n }, 2000);\r\n \r\n } finally {\r\n refreshButton.disabled = false;\r\n refreshIcon.classList.remove('zakatcalculator-section__refresh-icon--spinning');\r\n \r\n // Recalculate zakat\r\n zakatcalculatorCalculate();\r\n }\r\n}\r\n\r\n// Calculate zakat\r\nfunction zakatcalculatorCalculate() {\r\n const cashHand = parseFloat(document.getElementById('cashHand').value) || 0;\r\n const cashBank = parseFloat(document.getElementById('cashBank').value) || 0;\r\n const goldWeight = parseFloat(document.getElementById('goldWeight').value) || 0;\r\n const goldPrice = parseFloat(document.getElementById('goldPrice').value) || 0;\r\n const silverWeight = parseFloat(document.getElementById('silverWeight').value) || 0;\r\n const silverPrice = parseFloat(document.getElementById('silverPrice').value) || 0;\r\n \r\n // Calculate totals\r\n const totalAssets = cashHand + cashBank + (goldWeight * goldPrice) + (silverWeight * silverPrice);\r\n const nisabThreshold = 85 * goldPrice;\r\n \r\n // Update display\r\n document.getElementById('totalAssetsDisplay').textContent = \r\n formatCurrency(totalAssets);\r\n \r\n document.getElementById('netAssetsDisplay').textContent = \r\n formatCurrency(totalAssets);\r\n \r\n if (goldPrice > 0) {\r\n document.getElementById('nisabValueDisplay').textContent = \r\n formatCurrency(nisabThreshold);\r\n } else {\r\n document.getElementById('nisabValueDisplay').textContent = '...';\r\n }\r\n \r\n // Update status and final zakat\r\n const statusBadge = document.getElementById('statusBadge');\r\n const finalDisplay = document.getElementById('finalZakatDisplay');\r\n const payButton = document.querySelector('.zakatcalculator-section__pay-button');\r\n \r\n if (totalAssets >= nisabThreshold && goldPrice > 0 && zakatcalculatorPricesLoaded) {\r\n const zakatAmount = totalAssets * 0.025;\r\n finalDisplay.textContent = formatCurrency(zakatAmount);\r\n \r\n // Update status badge\r\n statusBadge.textContent = '✓ Zakat is due (Nisab reached)';\r\n statusBadge.className = 'zakatcalculator-section__status zakatcalculator-section__status--eligible';\r\n \r\n // Enable pay button\r\n payButton.disabled = false;\r\n payButton.innerHTML = ' Pay Zakat Now';\r\n \r\n } else {\r\n finalDisplay.textContent = '0.00 $';\r\n \r\n // Update status badge\r\n if (!zakatcalculatorPricesLoaded) {\r\n statusBadge.textContent = 'Enter data to check eligibility';\r\n statusBadge.className = 'zakatcalculator-section__status zakatcalculator-section__status--not-eligible';\r\n } else if (totalAssets < nisabThreshold) {\r\n statusBadge.textContent = 'Zakat is not due (Nisab not reached)';\r\n statusBadge.className = 'zakatcalculator-section__status zakatcalculator-section__status--not-eligible';\r\n } else {\r\n statusBadge.textContent = 'Enter data to check eligibility';\r\n statusBadge.className = 'zakatcalculator-section__status zakatcalculator-section__status--not-eligible';\r\n }\r\n \r\n // Disable pay button\r\n payButton.disabled = true;\r\n payButton.innerHTML = ' Pay Zakat Now';\r\n }\r\n}\r\n\r\n// Format currency\r\nfunction formatCurrency(amount) {\r\n return new Intl.NumberFormat('en-US', {\r\n style: 'currency',\r\n currency: 'USD',\r\n minimumFractionDigits: 2,\r\n maximumFractionDigits: 2\r\n }).format(amount);\r\n}\r\n\r\n// Add zakat to cart\r\nfunction zakatcalculatorAddToCart() {\r\n const amountText = document.getElementById('finalZakatDisplay').textContent;\r\n const amount = parseFloat(amountText.replace(/[^0-9.-]+/g, \"\"));\r\n \r\n if (amount > 0 && !isNaN(amount)) {\r\n // Use your existing addToCart function\r\n if (typeof addToCart === 'function') {\r\n addToCart('Calculated Zakat', amount, 'Zakat');\r\n } else {\r\n // Fallback if addToCart is not defined\r\n alert(`Calculated Zakat amount: ${amountText}`);\r\n }\r\n } else {\r\n alert(\"Invalid zakat amount. Please check your inputs.\");\r\n }\r\n}\r\n\r\n// Input validation\r\nfunction validateZakatInput(input) {\r\n const value = parseFloat(input.value);\r\n const min = parseFloat(input.getAttribute('min')) || 0;\r\n \r\n if (isNaN(value) || value < min) {\r\n input.classList.add('zakatcalculator-section__input--invalid');\r\n return false;\r\n } else {\r\n input.classList.remove('zakatcalculator-section__input--invalid');\r\n input.classList.add('zakatcalculator-section__input--valid');\r\n return true;\r\n }\r\n}","animate_delay":"0"},"editing":false,"element_name":"gva_text_noeditor"}],"editing":false,"element_name":"gva_column"}],"editing":false,"element_name":"gva_row"},{"settings":{"element":"gva_row","bg_particles":"off","bg_position":"center top","bg_repeat":"no-repeat","bg_attachment":"scroll","bg_size":"cover","style_space":"remove_margin remove_padding remove_padding_col","layout":"container-fw","class":"partner","margin_top":"30","margin_bottom":"30"},"columns":[{"settings":{"element":"gva_column"},"col_lg":12,"elements":[{"settings":{"content":"\r\n \r\n Strategic Partnerships\r\n Our partners in creating hope\r\n \r\n \r\n ","animate_delay":"0"},"editing":false,"element_name":"gva_text_noeditor"},{"settings":{"title_admin":"Partners: Partners Block - en","block_drupal":"views_block__partners_block_2","hidden_title":"on","align_title":"title-align-right","remove_margin":"on","style_text":"text-dark","animate_delay":"0"},"editing":false,"element_name":"gva_drupal_block"}],"editing":false,"element_name":"gva_column"}],"editing":false,"element_name":"gva_row"}]') (Line: 47)
Drupal\gavias_content_builder\Plugin\Field\FieldFormatter\GaviasContentBuilderFormatter->viewElements(Object, 'en') (Line: 89)
Drupal\Core\Field\FormatterBase->view(Object, 'en') (Line: 263)
Drupal\Core\Entity\Entity\EntityViewDisplay->buildMultiple(Array) (Line: 351)
Drupal\Core\Entity\EntityViewBuilder->buildComponents(Array, Array, Array, 'full') (Line: 24)
Drupal\node\NodeViewBuilder->buildComponents(Array, Array, Array, 'full') (Line: 293)
Drupal\Core\Entity\EntityViewBuilder->buildMultiple(Array) (Line: 250)
Drupal\Core\Entity\EntityViewBuilder->build(Array)
call_user_func_array(Array, Array) (Line: 100)
Drupal\Core\Render\Renderer->doTrustedCallback(Array, Array, 'Render #pre_render callbacks must be methods of a class that implements \Drupal\Core\Security\TrustedCallbackInterface or be an anonymous function. The callback was %s. Support for this callback implementation is deprecated in 8.8.0 and will be removed in Drupal 9.0.0. See https://www.drupal.org/node/2966725', 'silenced_deprecation', 'Drupal\Core\Render\Element\RenderCallbackInterface') (Line: 781)
Drupal\Core\Render\Renderer->doCallback('#pre_render', Array, Array) (Line: 372)
Drupal\Core\Render\Renderer->doRender(Array, ) (Line: 200)
Drupal\Core\Render\Renderer->render(Array, ) (Line: 226)
Drupal\Core\Render\MainContent\HtmlRenderer->Drupal\Core\Render\MainContent\{closure}() (Line: 573)
Drupal\Core\Render\Renderer->executeInRenderContext(Object, Object) (Line: 227)
Drupal\Core\Render\MainContent\HtmlRenderer->prepare(Array, Object, Object) (Line: 117)
Drupal\Core\Render\MainContent\HtmlRenderer->renderResponse(Array, Object, Object) (Line: 90)
Drupal\Core\EventSubscriber\MainContentViewSubscriber->onViewRenderArray(Object, 'kernel.view', Object)
call_user_func(Array, Object, 'kernel.view', Object) (Line: 111)
Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher->dispatch('kernel.view', Object) (Line: 156)
Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object, 1) (Line: 68)
Symfony\Component\HttpKernel\HttpKernel->handle(Object, 1, 1) (Line: 57)
Drupal\Core\StackMiddleware\Session->handle(Object, 1, 1) (Line: 47)
Drupal\Core\StackMiddleware\KernelPreHandle->handle(Object, 1, 1) (Line: 191)
Drupal\page_cache\StackMiddleware\PageCache->fetch(Object, 1, 1) (Line: 128)
Drupal\page_cache\StackMiddleware\PageCache->lookup(Object, 1, 1) (Line: 82)
Drupal\page_cache\StackMiddleware\PageCache->handle(Object, 1, 1) (Line: 47)
Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle(Object, 1, 1) (Line: 52)
Drupal\Core\StackMiddleware\NegotiationMiddleware->handle(Object, 1, 1) (Line: 23)
Stack\StackedHttpKernel->handle(Object, 1, 1) (Line: 708)
Drupal\Core\DrupalKernel->handle(Object) (Line: 19)
- Deprecated function: implode(): Passing glue string after array is deprecated. Swap the parameters in element_gva_column->render_content() (line 463 of themes/gavias_kunco/gva_content_builder/gva_column.php).
element_gva_column->render_content(Array, '
Take action for animals now
<a href="#" class="btn-theme">Donation Now</a>
') (Line: 110)
gavias_content_builder_render_element('gva_column', Array, '
Take action for animals now
<a href="#" class="btn-theme">Donation Now</a>
') (Line: 58)
gavias_content_builder_render_el(Array) (Line: 22)
gavias_content_builder_frontend('[{"settings":{"bg_particles":"off","bg_position":"center top","bg_repeat":"no-repeat","bg_attachment":"scroll","bg_size":"cover","style_space":"remove_padding","layout":"container-fw"},"columns":[{"settings":{"element":"gva_column","bg_position":"center top","bg_repeat":"no-repeat","bg_attachment":"scroll","bg_size":"cover","el_class":"front"},"col_lg":12,"elements":[{"settings":{"content":"\r\n \r\n \r\n \r\n \r\n Urgent Appeal\r\n \r\n Be a helping hand for them in\r\n times of crisis\r\n \r\n \r\n At \"Wejdan Charity\", we work with full transparency to deliver your donations to those in need in conflict and poverty-stricken areas.\r\n \r\n \r\n <a>\r\n Charity Donations \r\n </a>\r\n <a>\r\n Our Projects \r\n </a>\r\n \r\n \r\n \r\n \r\n","animate_delay":"0"},"editing":false,"element_name":"gva_text_noeditor"}],"editing":false,"element_name":"gva_column"}],"editing":false,"element_name":"gva_row"},{"settings":{"element":"gva_row","bg_particles":"off","bg_position":"center top","bg_repeat":"no-repeat","bg_attachment":"scroll","bg_size":"cover","style_space":"remove_padding","layout":"container","class":"before-help-region"},"columns":[{"settings":{"element":"gva_column"},"col_lg":12,"elements":[{"settings":{"title":"Take action for animals now","link":"#","button_title":"Donation Now","button_align":"button-right-v2","style_text":"text-light","style_button":"btn-theme","donorbox":"off","target":"off","el_class":"margin","animate":"fade-up","animate_delay":"0"},"editing":false,"element_name":"gva_call_to_action"}],"editing":false,"element_name":"gva_column"}],"editing":false,"element_name":"gva_row"},{"settings":{"element":"gva_row","bg_particles":"off","bg_position":"center top","bg_repeat":"no-repeat","bg_attachment":"scroll","bg_size":"cover","style_space":"remove_padding","layout":"container-fw","bg_color":"#f9fafb"},"columns":[{"settings":{"element":"gva_column","bg_position":"center top","bg_repeat":"no-repeat","bg_attachment":"scroll","bg_size":"cover","el_class":"about"},"col_lg":12,"elements":[{"settings":{"content":"\r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n \r\n \r\n Who We Are\r\n \r\n \r\n We plant hope.. \r\n and build people and the future\r\n \r\n \r\n Wejdan Charity is a leading humanitarian organization, founded with an ambitious vision to be a bridge of الخير between donors and those in need.\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n Development Stages\r\n A continuous journey of growth\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n Areas of Work\r\n We reach where the need is\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \"We work with passion to bring smiles\"\r\n \r\n \r\n \r\n \r\n \r\n","animate_delay":"0"},"editing":false,"element_name":"gva_text_noeditor"}],"editing":false,"element_name":"gva_column"}],"editing":false,"element_name":"gva_row"},{"settings":{"element":"gva_row","bg_particles":"off","bg_position":"center top","bg_repeat":"no-repeat","bg_attachment":"scroll","bg_size":"cover","style_space":"remove_margin remove_padding remove_padding_col","layout":"container-fw","class":"partner","margin_top":"30","margin_bottom":"30"},"columns":[{"settings":{"element":"gva_column"},"col_lg":12,"elements":[{"settings":{"content":"\r\n\r\n \r\n \r\n Initiatives & Programs\r\n Our Areas of Work\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n Ongoing Charity\r\n Water wells, mosque construction\r\n \r\n \r\n \r\n \r\n \r\n \r\n Student Sponsorship\r\n Building the future through education\r\n \r\n \r\n \r\n \r\n \r\n \r\n Humanitarian Cases\r\n Patient treatment, surgeries\r\n \r\n \r\n \r\n \r\n \r\n \r\n Development Projects\r\n Empowering productive families\r\n \r\n \r\n<a>Learn more about our programs and initiatives</a>\r\n \r\n","animate_delay":"0"},"editing":false,"element_name":"gva_text_noeditor"}],"editing":false,"element_name":"gva_column"}],"editing":false,"element_name":"gva_row"},{"settings":{"element":"gva_row","bg_particles":"off","bg_position":"center top","bg_repeat":"no-repeat","bg_attachment":"scroll","bg_size":"cover","style_space":"remove_margin remove_padding remove_padding_col","layout":"container","class":"newsfront"},"columns":[{"settings":{"element":"gva_column"},"col_lg":12,"elements":[{"settings":{"content":"\r\n \r\n \r\n Our News\r\n \r\n \r\n \r\nNews that tells the story of giving \r\n \r\n","animate_delay":"0"},"editing":false,"element_name":"gva_text_noeditor"},{"settings":{"title_admin":"news: news Block -en","block_drupal":"views_block__news_block_3","hidden_title":"on","align_title":"title-align-left","remove_margin":"on","style_text":"text-dark","animate_delay":"0"},"editing":false,"element_name":"gva_drupal_block"}],"editing":false,"element_name":"gva_column"}],"editing":false,"element_name":"gva_row"},{"settings":{"bg_particles":"off","bg_position":"center top","bg_repeat":"no-repeat","bg_attachment":"scroll","bg_size":"cover","style_space":"remove_padding","layout":"container-fw","element":"gva_row","class":"sliderfrontpage"},"columns":[{"settings":{"element":"gva_column","bg_position":"center top","bg_repeat":"no-repeat","bg_attachment":"scroll","bg_size":"cover"},"col_lg":12,"elements":[{"settings":{"title_admin":"news: campigns-en","block_drupal":"views_block__news_block_5","hidden_title":"on","align_title":"title-align-right","remove_margin":"on","style_text":"text-dark","animate_delay":"0"},"editing":false,"element_name":"gva_drupal_block"}],"editing":false,"element_name":"gva_column"}],"editing":false,"element_name":"gva_row"},{"settings":{"element":"gva_row","bg_particles":"off","bg_position":"center top","bg_repeat":"no-repeat","bg_attachment":"scroll","bg_size":"cover","style_space":"remove_margin remove_padding remove_padding_col","layout":"container-fw","class":"partner"},"columns":[{"settings":{"element":"gva_column"},"col_lg":12,"elements":[{"settings":{"content":"\r\n \r\n \r\n \r\n Our Distinguished Projects\r\n \r\n \r\n \r\n At Wejdan Charity, we strive to provide support and assistance to communities in need who are affected by disasters, crises, and wars, with the aim of improving quality of life and promoting sustainable development. Our projects span across several areas:\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n Relief Projects\r\n Emergency response to disasters and wars, providing food and medicine.\r\n \r\n<a> Browse Projects </a>\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n Development Projects\r\n Empowering communities and building capacities.\r\n \r\n<a> Browse Projects </a>\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n Seasonal Projects\r\n Ramadan campaigns, Qurbani, and winter clothing.\r\n \r\n<a> Browse Projects </a>\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n Endowment Projects\r\n An investment for the hereafter—mosques, wells, and charitable endowments.\r\n<a> Browse Projects </a>\r\n \r\n \r\n \r\n \r\n","animate_delay":"0"},"editing":false,"element_name":"gva_text_noeditor"}],"editing":false,"element_name":"gva_column"}],"editing":false,"element_name":"gva_row"},{"settings":{"element":"gva_row","bg_particles":"off","bg_position":"center top","bg_repeat":"no-repeat","bg_attachment":"scroll","bg_size":"cover","style_space":"remove_margin remove_padding remove_padding_col","layout":"container-fw","class":"partner"},"columns":[{"settings":{"element":"gva_column"},"col_lg":12,"elements":[{"settings":{"content":"\r\n \r\n \r\n\r\n \r\n \r\n Our Achievements in Numbers\r\n Your trust makes the difference\r\n \r\n \r\n\r\n \r\n \r\n 0\r\n Beneficiaries worldwide\r\n \r\n \r\n \r\n 0\r\n Projects implemented\r\n \r\n \r\n \r\n 0\r\n Countries we operate in\r\n \r\n \r\n \r\n 0\r\n Volunteers\r\n \r\n \r\n \r\n \r\n\r\n\r\n// Enhanced counter animation for facts section\r\nfunction animateFactsCounters() {\r\n const statNumbers = document.querySelectorAll('.facts-section__stat-number');\r\n \r\n const observer = new IntersectionObserver((entries) => {\r\n entries.forEach(entry => {\r\n if (entry.isIntersecting) {\r\n const counter = entry.target;\r\n const target = parseInt(counter.getAttribute('data-target'));\r\n const duration = 2000;\r\n const increment = target / (duration / 16);\r\n \r\n let current = 0;\r\n const updateCounter = () => {\r\n current += increment;\r\n if (current < target) {\r\n // Format number with K for thousands\r\n let displayNum = Math.ceil(current);\r\n if (displayNum >= 1000) {\r\n counter.textContent = (displayNum / 1000).toFixed(1).replace('.0', '') + 'K';\r\n } else {\r\n counter.textContent = displayNum.toLocaleString();\r\n }\r\n requestAnimationFrame(updateCounter);\r\n } else {\r\n // Final formatting\r\n if (target >= 1000) {\r\n counter.textContent = (target / 1000).toFixed(1).replace('.0', '') + 'K';\r\n counter.classList.add('formatted');\r\n } else {\r\n counter.textContent = target.toLocaleString();\r\n }\r\n counter.classList.add('animated');\r\n setTimeout(() => counter.classList.remove('animated'), 600);\r\n }\r\n };\r\n updateCounter();\r\n observer.unobserve(counter);\r\n }\r\n });\r\n }, { threshold: 0.5, rootMargin: '0px 0px -50px 0px' });\r\n \r\n statNumbers.forEach(counter => observer.observe(counter));\r\n}\r\n\r\n// Call this function when DOM is loaded\r\ndocument.addEventListener('DOMContentLoaded', () => {\r\n animateFactsCounters();\r\n});","animate_delay":"0"},"editing":false,"element_name":"gva_text_noeditor"}],"editing":false,"element_name":"gva_column"}],"editing":false,"element_name":"gva_row"},{"settings":{"element":"gva_row","bg_particles":"off","bg_position":"center top","bg_repeat":"no-repeat","bg_attachment":"scroll","bg_size":"cover","style_space":"remove_margin remove_padding remove_padding_col","layout":"container-fw","class":"zakatcalc"},"columns":[{"settings":{"element":"gva_column"},"col_lg":12,"elements":[{"settings":{"content":"\r\n\r\n \r\n \r\n \r\n \r\nSmart Zakat Calculator\r\n A precise and comprehensive tool\r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n \r\n \r\n Money & Savings\r\n \r\n \r\n \r\n Cash (on hand or at home)\r\n \r\n \r\n $\r\n \r\n \r\n \r\n Bank balances\r\n \r\n \r\n $\r\n \r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n Gold & Silver\r\n \r\n \r\n Refresh Prices\r\n \r\n \r\n \r\n \r\n \r\n Gold weight (grams)\r\n \r\n \r\n \r\n \r\n Current gold price per gram\r\n \r\n Live\r\n \r\n \r\n \r\n \r\n $ / gram\r\n \r\n \r\n \r\n\r\n \r\n \r\n Silver weight (grams)\r\n \r\n \r\n \r\n \r\n Current silver price per gram\r\n \r\n Live\r\n \r\n \r\n \r\n \r\n $ / gram\r\n \r\n \r\n \r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n Zakat Summary\r\n \r\n \r\n Total assets:\r\n 0.00 $\r\n \r\n \r\n Net zakatable assets:\r\n 0.00 $\r\n \r\n \r\n Nisab value (85g gold):\r\n ...\r\n \r\n \r\n Enter data to check eligibility\r\n \r\n \r\n \r\n\r\n \r\n \r\n Zakat due (2.5%)\r\n 0.00 $\r\n \r\n \r\n <a>\r\n \r\n Contact via WhatsApp for consultation and donation\r\n </a>\r\n \r\n \r\n \r\n \r\n\r\n\r\n// Zakat Calculator Logic\r\nlet zakatcalculatorPricesLoaded = false;\r\n\r\n// Initialize calculator when DOM is loaded\r\ndocument.addEventListener('DOMContentLoaded', () => {\r\n zakatcalculatorFetchPrices();\r\n zakatcalculatorCalculate();\r\n \r\n // Add input event listeners for real-time calculation\r\n const inputs = document.querySelectorAll('.zakatcalculator-section__input');\r\n inputs.forEach(input => {\r\n input.addEventListener('input', zakatcalculatorCalculate);\r\n });\r\n \r\n // Format numbers as user types\r\n inputs.forEach(input => {\r\n input.addEventListener('blur', function() {\r\n if (this.value) {\r\n const value = parseFloat(this.value);\r\n if (!isNaN(value)) {\r\n this.value = value.toLocaleString('en-US', {\r\n minimumFractionDigits: 2,\r\n maximumFractionDigits: 2\r\n });\r\n }\r\n }\r\n });\r\n \r\n input.addEventListener('focus', function() {\r\n if (this.value) {\r\n this.value = this.value.replace(/[^\\d.]/g, '');\r\n }\r\n });\r\n });\r\n});\r\n\r\n// Fetch metal prices\r\nasync function zakatcalculatorFetchPrices() {\r\n const goldInput = document.getElementById('goldPrice');\r\n const silverInput = document.getElementById('silverPrice');\r\n const refreshButton = document.querySelector('.zakatcalculator-section__refresh-button');\r\n const refreshIcon = document.querySelector('.zakatcalculator-section__refresh-icon');\r\n \r\n if (!refreshButton || !refreshIcon) return;\r\n \r\n // Show loading state\r\n refreshButton.disabled = true;\r\n refreshIcon.classList.add('zakatcalculator-section__refresh-icon--spinning');\r\n goldInput.classList.add('zakatcalculator-section__input--loading');\r\n silverInput.classList.add('zakatcalculator-section__input--loading');\r\n \r\n try {\r\n // Simulate API call with delay\r\n await new Promise(resolve => setTimeout(resolve, 1500));\r\n \r\n // Mock data (in a real app, you would fetch from an API)\r\n const liveGoldPrice = 76.50;\r\n const liveSilverPrice = 0.95;\r\n \r\n // Update inputs\r\n goldInput.value = liveGoldPrice.toFixed(2);\r\n silverInput.value = liveSilverPrice.toFixed(2);\r\n \r\n // Remove loading state\r\n goldInput.classList.remove('zakatcalculator-section__input--loading');\r\n silverInput.classList.remove('zakatcalculator-section__input--loading');\r\n goldInput.classList.add('zakatcalculator-section__input--valid');\r\n silverInput.classList.add('zakatcalculator-section__input--valid');\r\n \r\n zakatcalculatorPricesLoaded = true;\r\n \r\n // Show success feedback\r\n refreshButton.innerHTML = ' Updated';\r\n refreshButton.style.backgroundColor = '#617f67';\r\n refreshButton.style.color = 'white';\r\n \r\n setTimeout(() => {\r\n refreshButton.innerHTML = ' Refresh Prices';\r\n refreshButton.style.backgroundColor = '';\r\n refreshButton.style.color = '';\r\n }, 2000);\r\n \r\n } catch (error) {\r\n console.error(\"Failed to fetch prices\", error);\r\n \r\n // Fallback values\r\n goldInput.value = 75.00;\r\n silverInput.value = 0.90;\r\n \r\n // Show error state\r\n goldInput.classList.remove('zakatcalculator-section__input--loading');\r\n silverInput.classList.remove('zakatcalculator-section__input--loading');\r\n goldInput.classList.add('zakatcalculator-section__input--invalid');\r\n silverInput.classList.add('zakatcalculator-section__input--invalid');\r\n \r\n refreshButton.innerHTML = ' Update Failed';\r\n refreshButton.style.backgroundColor = '#dc2626';\r\n refreshButton.style.color = 'white';\r\n \r\n setTimeout(() => {\r\n refreshButton.innerHTML = ' Refresh Prices';\r\n refreshButton.style.backgroundColor = '';\r\n refreshButton.style.color = '';\r\n }, 2000);\r\n \r\n } finally {\r\n refreshButton.disabled = false;\r\n refreshIcon.classList.remove('zakatcalculator-section__refresh-icon--spinning');\r\n \r\n // Recalculate zakat\r\n zakatcalculatorCalculate();\r\n }\r\n}\r\n\r\n// Calculate zakat\r\nfunction zakatcalculatorCalculate() {\r\n const cashHand = parseFloat(document.getElementById('cashHand').value) || 0;\r\n const cashBank = parseFloat(document.getElementById('cashBank').value) || 0;\r\n const goldWeight = parseFloat(document.getElementById('goldWeight').value) || 0;\r\n const goldPrice = parseFloat(document.getElementById('goldPrice').value) || 0;\r\n const silverWeight = parseFloat(document.getElementById('silverWeight').value) || 0;\r\n const silverPrice = parseFloat(document.getElementById('silverPrice').value) || 0;\r\n \r\n // Calculate totals\r\n const totalAssets = cashHand + cashBank + (goldWeight * goldPrice) + (silverWeight * silverPrice);\r\n const nisabThreshold = 85 * goldPrice;\r\n \r\n // Update display\r\n document.getElementById('totalAssetsDisplay').textContent = \r\n formatCurrency(totalAssets);\r\n \r\n document.getElementById('netAssetsDisplay').textContent = \r\n formatCurrency(totalAssets);\r\n \r\n if (goldPrice > 0) {\r\n document.getElementById('nisabValueDisplay').textContent = \r\n formatCurrency(nisabThreshold);\r\n } else {\r\n document.getElementById('nisabValueDisplay').textContent = '...';\r\n }\r\n \r\n // Update status and final zakat\r\n const statusBadge = document.getElementById('statusBadge');\r\n const finalDisplay = document.getElementById('finalZakatDisplay');\r\n const payButton = document.querySelector('.zakatcalculator-section__pay-button');\r\n \r\n if (totalAssets >= nisabThreshold && goldPrice > 0 && zakatcalculatorPricesLoaded) {\r\n const zakatAmount = totalAssets * 0.025;\r\n finalDisplay.textContent = formatCurrency(zakatAmount);\r\n \r\n // Update status badge\r\n statusBadge.textContent = '✓ Zakat is due (Nisab reached)';\r\n statusBadge.className = 'zakatcalculator-section__status zakatcalculator-section__status--eligible';\r\n \r\n // Enable pay button\r\n payButton.disabled = false;\r\n payButton.innerHTML = ' Pay Zakat Now';\r\n \r\n } else {\r\n finalDisplay.textContent = '0.00 $';\r\n \r\n // Update status badge\r\n if (!zakatcalculatorPricesLoaded) {\r\n statusBadge.textContent = 'Enter data to check eligibility';\r\n statusBadge.className = 'zakatcalculator-section__status zakatcalculator-section__status--not-eligible';\r\n } else if (totalAssets < nisabThreshold) {\r\n statusBadge.textContent = 'Zakat is not due (Nisab not reached)';\r\n statusBadge.className = 'zakatcalculator-section__status zakatcalculator-section__status--not-eligible';\r\n } else {\r\n statusBadge.textContent = 'Enter data to check eligibility';\r\n statusBadge.className = 'zakatcalculator-section__status zakatcalculator-section__status--not-eligible';\r\n }\r\n \r\n // Disable pay button\r\n payButton.disabled = true;\r\n payButton.innerHTML = ' Pay Zakat Now';\r\n }\r\n}\r\n\r\n// Format currency\r\nfunction formatCurrency(amount) {\r\n return new Intl.NumberFormat('en-US', {\r\n style: 'currency',\r\n currency: 'USD',\r\n minimumFractionDigits: 2,\r\n maximumFractionDigits: 2\r\n }).format(amount);\r\n}\r\n\r\n// Add zakat to cart\r\nfunction zakatcalculatorAddToCart() {\r\n const amountText = document.getElementById('finalZakatDisplay').textContent;\r\n const amount = parseFloat(amountText.replace(/[^0-9.-]+/g, \"\"));\r\n \r\n if (amount > 0 && !isNaN(amount)) {\r\n // Use your existing addToCart function\r\n if (typeof addToCart === 'function') {\r\n addToCart('Calculated Zakat', amount, 'Zakat');\r\n } else {\r\n // Fallback if addToCart is not defined\r\n alert(`Calculated Zakat amount: ${amountText}`);\r\n }\r\n } else {\r\n alert(\"Invalid zakat amount. Please check your inputs.\");\r\n }\r\n}\r\n\r\n// Input validation\r\nfunction validateZakatInput(input) {\r\n const value = parseFloat(input.value);\r\n const min = parseFloat(input.getAttribute('min')) || 0;\r\n \r\n if (isNaN(value) || value < min) {\r\n input.classList.add('zakatcalculator-section__input--invalid');\r\n return false;\r\n } else {\r\n input.classList.remove('zakatcalculator-section__input--invalid');\r\n input.classList.add('zakatcalculator-section__input--valid');\r\n return true;\r\n }\r\n}","animate_delay":"0"},"editing":false,"element_name":"gva_text_noeditor"}],"editing":false,"element_name":"gva_column"}],"editing":false,"element_name":"gva_row"},{"settings":{"element":"gva_row","bg_particles":"off","bg_position":"center top","bg_repeat":"no-repeat","bg_attachment":"scroll","bg_size":"cover","style_space":"remove_margin remove_padding remove_padding_col","layout":"container-fw","class":"partner","margin_top":"30","margin_bottom":"30"},"columns":[{"settings":{"element":"gva_column"},"col_lg":12,"elements":[{"settings":{"content":"\r\n \r\n Strategic Partnerships\r\n Our partners in creating hope\r\n \r\n \r\n ","animate_delay":"0"},"editing":false,"element_name":"gva_text_noeditor"},{"settings":{"title_admin":"Partners: Partners Block - en","block_drupal":"views_block__partners_block_2","hidden_title":"on","align_title":"title-align-right","remove_margin":"on","style_text":"text-dark","animate_delay":"0"},"editing":false,"element_name":"gva_drupal_block"}],"editing":false,"element_name":"gva_column"}],"editing":false,"element_name":"gva_row"}]') (Line: 47)
Drupal\gavias_content_builder\Plugin\Field\FieldFormatter\GaviasContentBuilderFormatter->viewElements(Object, 'en') (Line: 89)
Drupal\Core\Field\FormatterBase->view(Object, 'en') (Line: 263)
Drupal\Core\Entity\Entity\EntityViewDisplay->buildMultiple(Array) (Line: 351)
Drupal\Core\Entity\EntityViewBuilder->buildComponents(Array, Array, Array, 'full') (Line: 24)
Drupal\node\NodeViewBuilder->buildComponents(Array, Array, Array, 'full') (Line: 293)
Drupal\Core\Entity\EntityViewBuilder->buildMultiple(Array) (Line: 250)
Drupal\Core\Entity\EntityViewBuilder->build(Array)
call_user_func_array(Array, Array) (Line: 100)
Drupal\Core\Render\Renderer->doTrustedCallback(Array, Array, 'Render #pre_render callbacks must be methods of a class that implements \Drupal\Core\Security\TrustedCallbackInterface or be an anonymous function. The callback was %s. Support for this callback implementation is deprecated in 8.8.0 and will be removed in Drupal 9.0.0. See https://www.drupal.org/node/2966725', 'silenced_deprecation', 'Drupal\Core\Render\Element\RenderCallbackInterface') (Line: 781)
Drupal\Core\Render\Renderer->doCallback('#pre_render', Array, Array) (Line: 372)
Drupal\Core\Render\Renderer->doRender(Array, ) (Line: 200)
Drupal\Core\Render\Renderer->render(Array, ) (Line: 226)
Drupal\Core\Render\MainContent\HtmlRenderer->Drupal\Core\Render\MainContent\{closure}() (Line: 573)
Drupal\Core\Render\Renderer->executeInRenderContext(Object, Object) (Line: 227)
Drupal\Core\Render\MainContent\HtmlRenderer->prepare(Array, Object, Object) (Line: 117)
Drupal\Core\Render\MainContent\HtmlRenderer->renderResponse(Array, Object, Object) (Line: 90)
Drupal\Core\EventSubscriber\MainContentViewSubscriber->onViewRenderArray(Object, 'kernel.view', Object)
call_user_func(Array, Object, 'kernel.view', Object) (Line: 111)
Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher->dispatch('kernel.view', Object) (Line: 156)
Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object, 1) (Line: 68)
Symfony\Component\HttpKernel\HttpKernel->handle(Object, 1, 1) (Line: 57)
Drupal\Core\StackMiddleware\Session->handle(Object, 1, 1) (Line: 47)
Drupal\Core\StackMiddleware\KernelPreHandle->handle(Object, 1, 1) (Line: 191)
Drupal\page_cache\StackMiddleware\PageCache->fetch(Object, 1, 1) (Line: 128)
Drupal\page_cache\StackMiddleware\PageCache->lookup(Object, 1, 1) (Line: 82)
Drupal\page_cache\StackMiddleware\PageCache->handle(Object, 1, 1) (Line: 47)
Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle(Object, 1, 1) (Line: 52)
Drupal\Core\StackMiddleware\NegotiationMiddleware->handle(Object, 1, 1) (Line: 23)
Stack\StackedHttpKernel->handle(Object, 1, 1) (Line: 708)
Drupal\Core\DrupalKernel->handle(Object) (Line: 19)
- Deprecated function: implode(): Passing glue string after array is deprecated. Swap the parameters in element_gva_row->render_content() (line 317 of themes/gavias_kunco/gva_content_builder/gva_row.php).
element_gva_row->render_content(Array, '
Take action for animals now
<a href="#" class="btn-theme">Donation Now</a>
') (Line: 110)
gavias_content_builder_render_element('gva_row', Array, '
Take action for animals now
<a href="#" class="btn-theme">Donation Now</a>
') (Line: 62)
gavias_content_builder_render_el(Array) (Line: 22)
gavias_content_builder_frontend('[{"settings":{"bg_particles":"off","bg_position":"center top","bg_repeat":"no-repeat","bg_attachment":"scroll","bg_size":"cover","style_space":"remove_padding","layout":"container-fw"},"columns":[{"settings":{"element":"gva_column","bg_position":"center top","bg_repeat":"no-repeat","bg_attachment":"scroll","bg_size":"cover","el_class":"front"},"col_lg":12,"elements":[{"settings":{"content":"\r\n \r\n \r\n \r\n \r\n Urgent Appeal\r\n \r\n Be a helping hand for them in\r\n times of crisis\r\n \r\n \r\n At \"Wejdan Charity\", we work with full transparency to deliver your donations to those in need in conflict and poverty-stricken areas.\r\n \r\n \r\n <a>\r\n Charity Donations \r\n </a>\r\n <a>\r\n Our Projects \r\n </a>\r\n \r\n \r\n \r\n \r\n","animate_delay":"0"},"editing":false,"element_name":"gva_text_noeditor"}],"editing":false,"element_name":"gva_column"}],"editing":false,"element_name":"gva_row"},{"settings":{"element":"gva_row","bg_particles":"off","bg_position":"center top","bg_repeat":"no-repeat","bg_attachment":"scroll","bg_size":"cover","style_space":"remove_padding","layout":"container","class":"before-help-region"},"columns":[{"settings":{"element":"gva_column"},"col_lg":12,"elements":[{"settings":{"title":"Take action for animals now","link":"#","button_title":"Donation Now","button_align":"button-right-v2","style_text":"text-light","style_button":"btn-theme","donorbox":"off","target":"off","el_class":"margin","animate":"fade-up","animate_delay":"0"},"editing":false,"element_name":"gva_call_to_action"}],"editing":false,"element_name":"gva_column"}],"editing":false,"element_name":"gva_row"},{"settings":{"element":"gva_row","bg_particles":"off","bg_position":"center top","bg_repeat":"no-repeat","bg_attachment":"scroll","bg_size":"cover","style_space":"remove_padding","layout":"container-fw","bg_color":"#f9fafb"},"columns":[{"settings":{"element":"gva_column","bg_position":"center top","bg_repeat":"no-repeat","bg_attachment":"scroll","bg_size":"cover","el_class":"about"},"col_lg":12,"elements":[{"settings":{"content":"\r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n \r\n \r\n Who We Are\r\n \r\n \r\n We plant hope.. \r\n and build people and the future\r\n \r\n \r\n Wejdan Charity is a leading humanitarian organization, founded with an ambitious vision to be a bridge of الخير between donors and those in need.\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n Development Stages\r\n A continuous journey of growth\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n Areas of Work\r\n We reach where the need is\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \"We work with passion to bring smiles\"\r\n \r\n \r\n \r\n \r\n \r\n","animate_delay":"0"},"editing":false,"element_name":"gva_text_noeditor"}],"editing":false,"element_name":"gva_column"}],"editing":false,"element_name":"gva_row"},{"settings":{"element":"gva_row","bg_particles":"off","bg_position":"center top","bg_repeat":"no-repeat","bg_attachment":"scroll","bg_size":"cover","style_space":"remove_margin remove_padding remove_padding_col","layout":"container-fw","class":"partner","margin_top":"30","margin_bottom":"30"},"columns":[{"settings":{"element":"gva_column"},"col_lg":12,"elements":[{"settings":{"content":"\r\n\r\n \r\n \r\n Initiatives & Programs\r\n Our Areas of Work\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n Ongoing Charity\r\n Water wells, mosque construction\r\n \r\n \r\n \r\n \r\n \r\n \r\n Student Sponsorship\r\n Building the future through education\r\n \r\n \r\n \r\n \r\n \r\n \r\n Humanitarian Cases\r\n Patient treatment, surgeries\r\n \r\n \r\n \r\n \r\n \r\n \r\n Development Projects\r\n Empowering productive families\r\n \r\n \r\n<a>Learn more about our programs and initiatives</a>\r\n \r\n","animate_delay":"0"},"editing":false,"element_name":"gva_text_noeditor"}],"editing":false,"element_name":"gva_column"}],"editing":false,"element_name":"gva_row"},{"settings":{"element":"gva_row","bg_particles":"off","bg_position":"center top","bg_repeat":"no-repeat","bg_attachment":"scroll","bg_size":"cover","style_space":"remove_margin remove_padding remove_padding_col","layout":"container","class":"newsfront"},"columns":[{"settings":{"element":"gva_column"},"col_lg":12,"elements":[{"settings":{"content":"\r\n \r\n \r\n Our News\r\n \r\n \r\n \r\nNews that tells the story of giving \r\n \r\n","animate_delay":"0"},"editing":false,"element_name":"gva_text_noeditor"},{"settings":{"title_admin":"news: news Block -en","block_drupal":"views_block__news_block_3","hidden_title":"on","align_title":"title-align-left","remove_margin":"on","style_text":"text-dark","animate_delay":"0"},"editing":false,"element_name":"gva_drupal_block"}],"editing":false,"element_name":"gva_column"}],"editing":false,"element_name":"gva_row"},{"settings":{"bg_particles":"off","bg_position":"center top","bg_repeat":"no-repeat","bg_attachment":"scroll","bg_size":"cover","style_space":"remove_padding","layout":"container-fw","element":"gva_row","class":"sliderfrontpage"},"columns":[{"settings":{"element":"gva_column","bg_position":"center top","bg_repeat":"no-repeat","bg_attachment":"scroll","bg_size":"cover"},"col_lg":12,"elements":[{"settings":{"title_admin":"news: campigns-en","block_drupal":"views_block__news_block_5","hidden_title":"on","align_title":"title-align-right","remove_margin":"on","style_text":"text-dark","animate_delay":"0"},"editing":false,"element_name":"gva_drupal_block"}],"editing":false,"element_name":"gva_column"}],"editing":false,"element_name":"gva_row"},{"settings":{"element":"gva_row","bg_particles":"off","bg_position":"center top","bg_repeat":"no-repeat","bg_attachment":"scroll","bg_size":"cover","style_space":"remove_margin remove_padding remove_padding_col","layout":"container-fw","class":"partner"},"columns":[{"settings":{"element":"gva_column"},"col_lg":12,"elements":[{"settings":{"content":"\r\n \r\n \r\n \r\n Our Distinguished Projects\r\n \r\n \r\n \r\n At Wejdan Charity, we strive to provide support and assistance to communities in need who are affected by disasters, crises, and wars, with the aim of improving quality of life and promoting sustainable development. Our projects span across several areas:\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n Relief Projects\r\n Emergency response to disasters and wars, providing food and medicine.\r\n \r\n<a> Browse Projects </a>\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n Development Projects\r\n Empowering communities and building capacities.\r\n \r\n<a> Browse Projects </a>\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n Seasonal Projects\r\n Ramadan campaigns, Qurbani, and winter clothing.\r\n \r\n<a> Browse Projects </a>\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n Endowment Projects\r\n An investment for the hereafter—mosques, wells, and charitable endowments.\r\n<a> Browse Projects </a>\r\n \r\n \r\n \r\n \r\n","animate_delay":"0"},"editing":false,"element_name":"gva_text_noeditor"}],"editing":false,"element_name":"gva_column"}],"editing":false,"element_name":"gva_row"},{"settings":{"element":"gva_row","bg_particles":"off","bg_position":"center top","bg_repeat":"no-repeat","bg_attachment":"scroll","bg_size":"cover","style_space":"remove_margin remove_padding remove_padding_col","layout":"container-fw","class":"partner"},"columns":[{"settings":{"element":"gva_column"},"col_lg":12,"elements":[{"settings":{"content":"\r\n \r\n \r\n\r\n \r\n \r\n Our Achievements in Numbers\r\n Your trust makes the difference\r\n \r\n \r\n\r\n \r\n \r\n 0\r\n Beneficiaries worldwide\r\n \r\n \r\n \r\n 0\r\n Projects implemented\r\n \r\n \r\n \r\n 0\r\n Countries we operate in\r\n \r\n \r\n \r\n 0\r\n Volunteers\r\n \r\n \r\n \r\n \r\n\r\n\r\n// Enhanced counter animation for facts section\r\nfunction animateFactsCounters() {\r\n const statNumbers = document.querySelectorAll('.facts-section__stat-number');\r\n \r\n const observer = new IntersectionObserver((entries) => {\r\n entries.forEach(entry => {\r\n if (entry.isIntersecting) {\r\n const counter = entry.target;\r\n const target = parseInt(counter.getAttribute('data-target'));\r\n const duration = 2000;\r\n const increment = target / (duration / 16);\r\n \r\n let current = 0;\r\n const updateCounter = () => {\r\n current += increment;\r\n if (current < target) {\r\n // Format number with K for thousands\r\n let displayNum = Math.ceil(current);\r\n if (displayNum >= 1000) {\r\n counter.textContent = (displayNum / 1000).toFixed(1).replace('.0', '') + 'K';\r\n } else {\r\n counter.textContent = displayNum.toLocaleString();\r\n }\r\n requestAnimationFrame(updateCounter);\r\n } else {\r\n // Final formatting\r\n if (target >= 1000) {\r\n counter.textContent = (target / 1000).toFixed(1).replace('.0', '') + 'K';\r\n counter.classList.add('formatted');\r\n } else {\r\n counter.textContent = target.toLocaleString();\r\n }\r\n counter.classList.add('animated');\r\n setTimeout(() => counter.classList.remove('animated'), 600);\r\n }\r\n };\r\n updateCounter();\r\n observer.unobserve(counter);\r\n }\r\n });\r\n }, { threshold: 0.5, rootMargin: '0px 0px -50px 0px' });\r\n \r\n statNumbers.forEach(counter => observer.observe(counter));\r\n}\r\n\r\n// Call this function when DOM is loaded\r\ndocument.addEventListener('DOMContentLoaded', () => {\r\n animateFactsCounters();\r\n});","animate_delay":"0"},"editing":false,"element_name":"gva_text_noeditor"}],"editing":false,"element_name":"gva_column"}],"editing":false,"element_name":"gva_row"},{"settings":{"element":"gva_row","bg_particles":"off","bg_position":"center top","bg_repeat":"no-repeat","bg_attachment":"scroll","bg_size":"cover","style_space":"remove_margin remove_padding remove_padding_col","layout":"container-fw","class":"zakatcalc"},"columns":[{"settings":{"element":"gva_column"},"col_lg":12,"elements":[{"settings":{"content":"\r\n\r\n \r\n \r\n \r\n \r\nSmart Zakat Calculator\r\n A precise and comprehensive tool\r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n \r\n \r\n Money & Savings\r\n \r\n \r\n \r\n Cash (on hand or at home)\r\n \r\n \r\n $\r\n \r\n \r\n \r\n Bank balances\r\n \r\n \r\n $\r\n \r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n Gold & Silver\r\n \r\n \r\n Refresh Prices\r\n \r\n \r\n \r\n \r\n \r\n Gold weight (grams)\r\n \r\n \r\n \r\n \r\n Current gold price per gram\r\n \r\n Live\r\n \r\n \r\n \r\n \r\n $ / gram\r\n \r\n \r\n \r\n\r\n \r\n \r\n Silver weight (grams)\r\n \r\n \r\n \r\n \r\n Current silver price per gram\r\n \r\n Live\r\n \r\n \r\n \r\n \r\n $ / gram\r\n \r\n \r\n \r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n Zakat Summary\r\n \r\n \r\n Total assets:\r\n 0.00 $\r\n \r\n \r\n Net zakatable assets:\r\n 0.00 $\r\n \r\n \r\n Nisab value (85g gold):\r\n ...\r\n \r\n \r\n Enter data to check eligibility\r\n \r\n \r\n \r\n\r\n \r\n \r\n Zakat due (2.5%)\r\n 0.00 $\r\n \r\n \r\n <a>\r\n \r\n Contact via WhatsApp for consultation and donation\r\n </a>\r\n \r\n \r\n \r\n \r\n\r\n\r\n// Zakat Calculator Logic\r\nlet zakatcalculatorPricesLoaded = false;\r\n\r\n// Initialize calculator when DOM is loaded\r\ndocument.addEventListener('DOMContentLoaded', () => {\r\n zakatcalculatorFetchPrices();\r\n zakatcalculatorCalculate();\r\n \r\n // Add input event listeners for real-time calculation\r\n const inputs = document.querySelectorAll('.zakatcalculator-section__input');\r\n inputs.forEach(input => {\r\n input.addEventListener('input', zakatcalculatorCalculate);\r\n });\r\n \r\n // Format numbers as user types\r\n inputs.forEach(input => {\r\n input.addEventListener('blur', function() {\r\n if (this.value) {\r\n const value = parseFloat(this.value);\r\n if (!isNaN(value)) {\r\n this.value = value.toLocaleString('en-US', {\r\n minimumFractionDigits: 2,\r\n maximumFractionDigits: 2\r\n });\r\n }\r\n }\r\n });\r\n \r\n input.addEventListener('focus', function() {\r\n if (this.value) {\r\n this.value = this.value.replace(/[^\\d.]/g, '');\r\n }\r\n });\r\n });\r\n});\r\n\r\n// Fetch metal prices\r\nasync function zakatcalculatorFetchPrices() {\r\n const goldInput = document.getElementById('goldPrice');\r\n const silverInput = document.getElementById('silverPrice');\r\n const refreshButton = document.querySelector('.zakatcalculator-section__refresh-button');\r\n const refreshIcon = document.querySelector('.zakatcalculator-section__refresh-icon');\r\n \r\n if (!refreshButton || !refreshIcon) return;\r\n \r\n // Show loading state\r\n refreshButton.disabled = true;\r\n refreshIcon.classList.add('zakatcalculator-section__refresh-icon--spinning');\r\n goldInput.classList.add('zakatcalculator-section__input--loading');\r\n silverInput.classList.add('zakatcalculator-section__input--loading');\r\n \r\n try {\r\n // Simulate API call with delay\r\n await new Promise(resolve => setTimeout(resolve, 1500));\r\n \r\n // Mock data (in a real app, you would fetch from an API)\r\n const liveGoldPrice = 76.50;\r\n const liveSilverPrice = 0.95;\r\n \r\n // Update inputs\r\n goldInput.value = liveGoldPrice.toFixed(2);\r\n silverInput.value = liveSilverPrice.toFixed(2);\r\n \r\n // Remove loading state\r\n goldInput.classList.remove('zakatcalculator-section__input--loading');\r\n silverInput.classList.remove('zakatcalculator-section__input--loading');\r\n goldInput.classList.add('zakatcalculator-section__input--valid');\r\n silverInput.classList.add('zakatcalculator-section__input--valid');\r\n \r\n zakatcalculatorPricesLoaded = true;\r\n \r\n // Show success feedback\r\n refreshButton.innerHTML = ' Updated';\r\n refreshButton.style.backgroundColor = '#617f67';\r\n refreshButton.style.color = 'white';\r\n \r\n setTimeout(() => {\r\n refreshButton.innerHTML = ' Refresh Prices';\r\n refreshButton.style.backgroundColor = '';\r\n refreshButton.style.color = '';\r\n }, 2000);\r\n \r\n } catch (error) {\r\n console.error(\"Failed to fetch prices\", error);\r\n \r\n // Fallback values\r\n goldInput.value = 75.00;\r\n silverInput.value = 0.90;\r\n \r\n // Show error state\r\n goldInput.classList.remove('zakatcalculator-section__input--loading');\r\n silverInput.classList.remove('zakatcalculator-section__input--loading');\r\n goldInput.classList.add('zakatcalculator-section__input--invalid');\r\n silverInput.classList.add('zakatcalculator-section__input--invalid');\r\n \r\n refreshButton.innerHTML = ' Update Failed';\r\n refreshButton.style.backgroundColor = '#dc2626';\r\n refreshButton.style.color = 'white';\r\n \r\n setTimeout(() => {\r\n refreshButton.innerHTML = ' Refresh Prices';\r\n refreshButton.style.backgroundColor = '';\r\n refreshButton.style.color = '';\r\n }, 2000);\r\n \r\n } finally {\r\n refreshButton.disabled = false;\r\n refreshIcon.classList.remove('zakatcalculator-section__refresh-icon--spinning');\r\n \r\n // Recalculate zakat\r\n zakatcalculatorCalculate();\r\n }\r\n}\r\n\r\n// Calculate zakat\r\nfunction zakatcalculatorCalculate() {\r\n const cashHand = parseFloat(document.getElementById('cashHand').value) || 0;\r\n const cashBank = parseFloat(document.getElementById('cashBank').value) || 0;\r\n const goldWeight = parseFloat(document.getElementById('goldWeight').value) || 0;\r\n const goldPrice = parseFloat(document.getElementById('goldPrice').value) || 0;\r\n const silverWeight = parseFloat(document.getElementById('silverWeight').value) || 0;\r\n const silverPrice = parseFloat(document.getElementById('silverPrice').value) || 0;\r\n \r\n // Calculate totals\r\n const totalAssets = cashHand + cashBank + (goldWeight * goldPrice) + (silverWeight * silverPrice);\r\n const nisabThreshold = 85 * goldPrice;\r\n \r\n // Update display\r\n document.getElementById('totalAssetsDisplay').textContent = \r\n formatCurrency(totalAssets);\r\n \r\n document.getElementById('netAssetsDisplay').textContent = \r\n formatCurrency(totalAssets);\r\n \r\n if (goldPrice > 0) {\r\n document.getElementById('nisabValueDisplay').textContent = \r\n formatCurrency(nisabThreshold);\r\n } else {\r\n document.getElementById('nisabValueDisplay').textContent = '...';\r\n }\r\n \r\n // Update status and final zakat\r\n const statusBadge = document.getElementById('statusBadge');\r\n const finalDisplay = document.getElementById('finalZakatDisplay');\r\n const payButton = document.querySelector('.zakatcalculator-section__pay-button');\r\n \r\n if (totalAssets >= nisabThreshold && goldPrice > 0 && zakatcalculatorPricesLoaded) {\r\n const zakatAmount = totalAssets * 0.025;\r\n finalDisplay.textContent = formatCurrency(zakatAmount);\r\n \r\n // Update status badge\r\n statusBadge.textContent = '✓ Zakat is due (Nisab reached)';\r\n statusBadge.className = 'zakatcalculator-section__status zakatcalculator-section__status--eligible';\r\n \r\n // Enable pay button\r\n payButton.disabled = false;\r\n payButton.innerHTML = ' Pay Zakat Now';\r\n \r\n } else {\r\n finalDisplay.textContent = '0.00 $';\r\n \r\n // Update status badge\r\n if (!zakatcalculatorPricesLoaded) {\r\n statusBadge.textContent = 'Enter data to check eligibility';\r\n statusBadge.className = 'zakatcalculator-section__status zakatcalculator-section__status--not-eligible';\r\n } else if (totalAssets < nisabThreshold) {\r\n statusBadge.textContent = 'Zakat is not due (Nisab not reached)';\r\n statusBadge.className = 'zakatcalculator-section__status zakatcalculator-section__status--not-eligible';\r\n } else {\r\n statusBadge.textContent = 'Enter data to check eligibility';\r\n statusBadge.className = 'zakatcalculator-section__status zakatcalculator-section__status--not-eligible';\r\n }\r\n \r\n // Disable pay button\r\n payButton.disabled = true;\r\n payButton.innerHTML = ' Pay Zakat Now';\r\n }\r\n}\r\n\r\n// Format currency\r\nfunction formatCurrency(amount) {\r\n return new Intl.NumberFormat('en-US', {\r\n style: 'currency',\r\n currency: 'USD',\r\n minimumFractionDigits: 2,\r\n maximumFractionDigits: 2\r\n }).format(amount);\r\n}\r\n\r\n// Add zakat to cart\r\nfunction zakatcalculatorAddToCart() {\r\n const amountText = document.getElementById('finalZakatDisplay').textContent;\r\n const amount = parseFloat(amountText.replace(/[^0-9.-]+/g, \"\"));\r\n \r\n if (amount > 0 && !isNaN(amount)) {\r\n // Use your existing addToCart function\r\n if (typeof addToCart === 'function') {\r\n addToCart('Calculated Zakat', amount, 'Zakat');\r\n } else {\r\n // Fallback if addToCart is not defined\r\n alert(`Calculated Zakat amount: ${amountText}`);\r\n }\r\n } else {\r\n alert(\"Invalid zakat amount. Please check your inputs.\");\r\n }\r\n}\r\n\r\n// Input validation\r\nfunction validateZakatInput(input) {\r\n const value = parseFloat(input.value);\r\n const min = parseFloat(input.getAttribute('min')) || 0;\r\n \r\n if (isNaN(value) || value < min) {\r\n input.classList.add('zakatcalculator-section__input--invalid');\r\n return false;\r\n } else {\r\n input.classList.remove('zakatcalculator-section__input--invalid');\r\n input.classList.add('zakatcalculator-section__input--valid');\r\n return true;\r\n }\r\n}","animate_delay":"0"},"editing":false,"element_name":"gva_text_noeditor"}],"editing":false,"element_name":"gva_column"}],"editing":false,"element_name":"gva_row"},{"settings":{"element":"gva_row","bg_particles":"off","bg_position":"center top","bg_repeat":"no-repeat","bg_attachment":"scroll","bg_size":"cover","style_space":"remove_margin remove_padding remove_padding_col","layout":"container-fw","class":"partner","margin_top":"30","margin_bottom":"30"},"columns":[{"settings":{"element":"gva_column"},"col_lg":12,"elements":[{"settings":{"content":"\r\n \r\n Strategic Partnerships\r\n Our partners in creating hope\r\n \r\n \r\n ","animate_delay":"0"},"editing":false,"element_name":"gva_text_noeditor"},{"settings":{"title_admin":"Partners: Partners Block - en","block_drupal":"views_block__partners_block_2","hidden_title":"on","align_title":"title-align-right","remove_margin":"on","style_text":"text-dark","animate_delay":"0"},"editing":false,"element_name":"gva_drupal_block"}],"editing":false,"element_name":"gva_column"}],"editing":false,"element_name":"gva_row"}]') (Line: 47)
Drupal\gavias_content_builder\Plugin\Field\FieldFormatter\GaviasContentBuilderFormatter->viewElements(Object, 'en') (Line: 89)
Drupal\Core\Field\FormatterBase->view(Object, 'en') (Line: 263)
Drupal\Core\Entity\Entity\EntityViewDisplay->buildMultiple(Array) (Line: 351)
Drupal\Core\Entity\EntityViewBuilder->buildComponents(Array, Array, Array, 'full') (Line: 24)
Drupal\node\NodeViewBuilder->buildComponents(Array, Array, Array, 'full') (Line: 293)
Drupal\Core\Entity\EntityViewBuilder->buildMultiple(Array) (Line: 250)
Drupal\Core\Entity\EntityViewBuilder->build(Array)
call_user_func_array(Array, Array) (Line: 100)
Drupal\Core\Render\Renderer->doTrustedCallback(Array, Array, 'Render #pre_render callbacks must be methods of a class that implements \Drupal\Core\Security\TrustedCallbackInterface or be an anonymous function. The callback was %s. Support for this callback implementation is deprecated in 8.8.0 and will be removed in Drupal 9.0.0. See https://www.drupal.org/node/2966725', 'silenced_deprecation', 'Drupal\Core\Render\Element\RenderCallbackInterface') (Line: 781)
Drupal\Core\Render\Renderer->doCallback('#pre_render', Array, Array) (Line: 372)
Drupal\Core\Render\Renderer->doRender(Array, ) (Line: 200)
Drupal\Core\Render\Renderer->render(Array, ) (Line: 226)
Drupal\Core\Render\MainContent\HtmlRenderer->Drupal\Core\Render\MainContent\{closure}() (Line: 573)
Drupal\Core\Render\Renderer->executeInRenderContext(Object, Object) (Line: 227)
Drupal\Core\Render\MainContent\HtmlRenderer->prepare(Array, Object, Object) (Line: 117)
Drupal\Core\Render\MainContent\HtmlRenderer->renderResponse(Array, Object, Object) (Line: 90)
Drupal\Core\EventSubscriber\MainContentViewSubscriber->onViewRenderArray(Object, 'kernel.view', Object)
call_user_func(Array, Object, 'kernel.view', Object) (Line: 111)
Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher->dispatch('kernel.view', Object) (Line: 156)
Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object, 1) (Line: 68)
Symfony\Component\HttpKernel\HttpKernel->handle(Object, 1, 1) (Line: 57)
Drupal\Core\StackMiddleware\Session->handle(Object, 1, 1) (Line: 47)
Drupal\Core\StackMiddleware\KernelPreHandle->handle(Object, 1, 1) (Line: 191)
Drupal\page_cache\StackMiddleware\PageCache->fetch(Object, 1, 1) (Line: 128)
Drupal\page_cache\StackMiddleware\PageCache->lookup(Object, 1, 1) (Line: 82)
Drupal\page_cache\StackMiddleware\PageCache->handle(Object, 1, 1) (Line: 47)
Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle(Object, 1, 1) (Line: 52)
Drupal\Core\StackMiddleware\NegotiationMiddleware->handle(Object, 1, 1) (Line: 23)
Stack\StackedHttpKernel->handle(Object, 1, 1) (Line: 708)
Drupal\Core\DrupalKernel->handle(Object) (Line: 19)
- Deprecated function: implode(): Passing glue string after array is deprecated. Swap the parameters in element_gva_column->render_content() (line 462 of themes/gavias_kunco/gva_content_builder/gva_column.php).
element_gva_column->render_content(Array, '
Who We Are
We plant hope..
and build people and the future
Wejdan Charity is a leading humanitarian organization, founded with an ambitious vision to be a bridge of الخير between donors and those in need.
Development Stages
A continuous journey of growth
Areas of Work
We reach where the need is
"We work with passion to bring smiles"
') (Line: 110)
gavias_content_builder_render_element('gva_column', Array, '
Who We Are
We plant hope..
and build people and the future
Wejdan Charity is a leading humanitarian organization, founded with an ambitious vision to be a bridge of الخير between donors and those in need.
Development Stages
A continuous journey of growth
Areas of Work
We reach where the need is
"We work with passion to bring smiles"
') (Line: 58)
gavias_content_builder_render_el(Array) (Line: 22)
gavias_content_builder_frontend('[{"settings":{"bg_particles":"off","bg_position":"center top","bg_repeat":"no-repeat","bg_attachment":"scroll","bg_size":"cover","style_space":"remove_padding","layout":"container-fw"},"columns":[{"settings":{"element":"gva_column","bg_position":"center top","bg_repeat":"no-repeat","bg_attachment":"scroll","bg_size":"cover","el_class":"front"},"col_lg":12,"elements":[{"settings":{"content":"\r\n \r\n \r\n \r\n \r\n Urgent Appeal\r\n \r\n Be a helping hand for them in\r\n times of crisis\r\n \r\n \r\n At \"Wejdan Charity\", we work with full transparency to deliver your donations to those in need in conflict and poverty-stricken areas.\r\n \r\n \r\n <a>\r\n Charity Donations \r\n </a>\r\n <a>\r\n Our Projects \r\n </a>\r\n \r\n \r\n \r\n \r\n","animate_delay":"0"},"editing":false,"element_name":"gva_text_noeditor"}],"editing":false,"element_name":"gva_column"}],"editing":false,"element_name":"gva_row"},{"settings":{"element":"gva_row","bg_particles":"off","bg_position":"center top","bg_repeat":"no-repeat","bg_attachment":"scroll","bg_size":"cover","style_space":"remove_padding","layout":"container","class":"before-help-region"},"columns":[{"settings":{"element":"gva_column"},"col_lg":12,"elements":[{"settings":{"title":"Take action for animals now","link":"#","button_title":"Donation Now","button_align":"button-right-v2","style_text":"text-light","style_button":"btn-theme","donorbox":"off","target":"off","el_class":"margin","animate":"fade-up","animate_delay":"0"},"editing":false,"element_name":"gva_call_to_action"}],"editing":false,"element_name":"gva_column"}],"editing":false,"element_name":"gva_row"},{"settings":{"element":"gva_row","bg_particles":"off","bg_position":"center top","bg_repeat":"no-repeat","bg_attachment":"scroll","bg_size":"cover","style_space":"remove_padding","layout":"container-fw","bg_color":"#f9fafb"},"columns":[{"settings":{"element":"gva_column","bg_position":"center top","bg_repeat":"no-repeat","bg_attachment":"scroll","bg_size":"cover","el_class":"about"},"col_lg":12,"elements":[{"settings":{"content":"\r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n \r\n \r\n Who We Are\r\n \r\n \r\n We plant hope.. \r\n and build people and the future\r\n \r\n \r\n Wejdan Charity is a leading humanitarian organization, founded with an ambitious vision to be a bridge of الخير between donors and those in need.\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n Development Stages\r\n A continuous journey of growth\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n Areas of Work\r\n We reach where the need is\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \"We work with passion to bring smiles\"\r\n \r\n \r\n \r\n \r\n \r\n","animate_delay":"0"},"editing":false,"element_name":"gva_text_noeditor"}],"editing":false,"element_name":"gva_column"}],"editing":false,"element_name":"gva_row"},{"settings":{"element":"gva_row","bg_particles":"off","bg_position":"center top","bg_repeat":"no-repeat","bg_attachment":"scroll","bg_size":"cover","style_space":"remove_margin remove_padding remove_padding_col","layout":"container-fw","class":"partner","margin_top":"30","margin_bottom":"30"},"columns":[{"settings":{"element":"gva_column"},"col_lg":12,"elements":[{"settings":{"content":"\r\n\r\n \r\n \r\n Initiatives & Programs\r\n Our Areas of Work\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n Ongoing Charity\r\n Water wells, mosque construction\r\n \r\n \r\n \r\n \r\n \r\n \r\n Student Sponsorship\r\n Building the future through education\r\n \r\n \r\n \r\n \r\n \r\n \r\n Humanitarian Cases\r\n Patient treatment, surgeries\r\n \r\n \r\n \r\n \r\n \r\n \r\n Development Projects\r\n Empowering productive families\r\n \r\n \r\n<a>Learn more about our programs and initiatives</a>\r\n \r\n","animate_delay":"0"},"editing":false,"element_name":"gva_text_noeditor"}],"editing":false,"element_name":"gva_column"}],"editing":false,"element_name":"gva_row"},{"settings":{"element":"gva_row","bg_particles":"off","bg_position":"center top","bg_repeat":"no-repeat","bg_attachment":"scroll","bg_size":"cover","style_space":"remove_margin remove_padding remove_padding_col","layout":"container","class":"newsfront"},"columns":[{"settings":{"element":"gva_column"},"col_lg":12,"elements":[{"settings":{"content":"\r\n \r\n \r\n Our News\r\n \r\n \r\n \r\nNews that tells the story of giving \r\n \r\n","animate_delay":"0"},"editing":false,"element_name":"gva_text_noeditor"},{"settings":{"title_admin":"news: news Block -en","block_drupal":"views_block__news_block_3","hidden_title":"on","align_title":"title-align-left","remove_margin":"on","style_text":"text-dark","animate_delay":"0"},"editing":false,"element_name":"gva_drupal_block"}],"editing":false,"element_name":"gva_column"}],"editing":false,"element_name":"gva_row"},{"settings":{"bg_particles":"off","bg_position":"center top","bg_repeat":"no-repeat","bg_attachment":"scroll","bg_size":"cover","style_space":"remove_padding","layout":"container-fw","element":"gva_row","class":"sliderfrontpage"},"columns":[{"settings":{"element":"gva_column","bg_position":"center top","bg_repeat":"no-repeat","bg_attachment":"scroll","bg_size":"cover"},"col_lg":12,"elements":[{"settings":{"title_admin":"news: campigns-en","block_drupal":"views_block__news_block_5","hidden_title":"on","align_title":"title-align-right","remove_margin":"on","style_text":"text-dark","animate_delay":"0"},"editing":false,"element_name":"gva_drupal_block"}],"editing":false,"element_name":"gva_column"}],"editing":false,"element_name":"gva_row"},{"settings":{"element":"gva_row","bg_particles":"off","bg_position":"center top","bg_repeat":"no-repeat","bg_attachment":"scroll","bg_size":"cover","style_space":"remove_margin remove_padding remove_padding_col","layout":"container-fw","class":"partner"},"columns":[{"settings":{"element":"gva_column"},"col_lg":12,"elements":[{"settings":{"content":"\r\n \r\n \r\n \r\n Our Distinguished Projects\r\n \r\n \r\n \r\n At Wejdan Charity, we strive to provide support and assistance to communities in need who are affected by disasters, crises, and wars, with the aim of improving quality of life and promoting sustainable development. Our projects span across several areas:\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n Relief Projects\r\n Emergency response to disasters and wars, providing food and medicine.\r\n \r\n<a> Browse Projects </a>\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n Development Projects\r\n Empowering communities and building capacities.\r\n \r\n<a> Browse Projects </a>\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n Seasonal Projects\r\n Ramadan campaigns, Qurbani, and winter clothing.\r\n \r\n<a> Browse Projects </a>\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n Endowment Projects\r\n An investment for the hereafter—mosques, wells, and charitable endowments.\r\n<a> Browse Projects </a>\r\n \r\n \r\n \r\n \r\n","animate_delay":"0"},"editing":false,"element_name":"gva_text_noeditor"}],"editing":false,"element_name":"gva_column"}],"editing":false,"element_name":"gva_row"},{"settings":{"element":"gva_row","bg_particles":"off","bg_position":"center top","bg_repeat":"no-repeat","bg_attachment":"scroll","bg_size":"cover","style_space":"remove_margin remove_padding remove_padding_col","layout":"container-fw","class":"partner"},"columns":[{"settings":{"element":"gva_column"},"col_lg":12,"elements":[{"settings":{"content":"\r\n \r\n \r\n\r\n \r\n \r\n Our Achievements in Numbers\r\n Your trust makes the difference\r\n \r\n \r\n\r\n \r\n \r\n 0\r\n Beneficiaries worldwide\r\n \r\n \r\n \r\n 0\r\n Projects implemented\r\n \r\n \r\n \r\n 0\r\n Countries we operate in\r\n \r\n \r\n \r\n 0\r\n Volunteers\r\n \r\n \r\n \r\n \r\n\r\n\r\n// Enhanced counter animation for facts section\r\nfunction animateFactsCounters() {\r\n const statNumbers = document.querySelectorAll('.facts-section__stat-number');\r\n \r\n const observer = new IntersectionObserver((entries) => {\r\n entries.forEach(entry => {\r\n if (entry.isIntersecting) {\r\n const counter = entry.target;\r\n const target = parseInt(counter.getAttribute('data-target'));\r\n const duration = 2000;\r\n const increment = target / (duration / 16);\r\n \r\n let current = 0;\r\n const updateCounter = () => {\r\n current += increment;\r\n if (current < target) {\r\n // Format number with K for thousands\r\n let displayNum = Math.ceil(current);\r\n if (displayNum >= 1000) {\r\n counter.textContent = (displayNum / 1000).toFixed(1).replace('.0', '') + 'K';\r\n } else {\r\n counter.textContent = displayNum.toLocaleString();\r\n }\r\n requestAnimationFrame(updateCounter);\r\n } else {\r\n // Final formatting\r\n if (target >= 1000) {\r\n counter.textContent = (target / 1000).toFixed(1).replace('.0', '') + 'K';\r\n counter.classList.add('formatted');\r\n } else {\r\n counter.textContent = target.toLocaleString();\r\n }\r\n counter.classList.add('animated');\r\n setTimeout(() => counter.classList.remove('animated'), 600);\r\n }\r\n };\r\n updateCounter();\r\n observer.unobserve(counter);\r\n }\r\n });\r\n }, { threshold: 0.5, rootMargin: '0px 0px -50px 0px' });\r\n \r\n statNumbers.forEach(counter => observer.observe(counter));\r\n}\r\n\r\n// Call this function when DOM is loaded\r\ndocument.addEventListener('DOMContentLoaded', () => {\r\n animateFactsCounters();\r\n});","animate_delay":"0"},"editing":false,"element_name":"gva_text_noeditor"}],"editing":false,"element_name":"gva_column"}],"editing":false,"element_name":"gva_row"},{"settings":{"element":"gva_row","bg_particles":"off","bg_position":"center top","bg_repeat":"no-repeat","bg_attachment":"scroll","bg_size":"cover","style_space":"remove_margin remove_padding remove_padding_col","layout":"container-fw","class":"zakatcalc"},"columns":[{"settings":{"element":"gva_column"},"col_lg":12,"elements":[{"settings":{"content":"\r\n\r\n \r\n \r\n \r\n \r\nSmart Zakat Calculator\r\n A precise and comprehensive tool\r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n \r\n \r\n Money & Savings\r\n \r\n \r\n \r\n Cash (on hand or at home)\r\n \r\n \r\n $\r\n \r\n \r\n \r\n Bank balances\r\n \r\n \r\n $\r\n \r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n Gold & Silver\r\n \r\n \r\n Refresh Prices\r\n \r\n \r\n \r\n \r\n \r\n Gold weight (grams)\r\n \r\n \r\n \r\n \r\n Current gold price per gram\r\n \r\n Live\r\n \r\n \r\n \r\n \r\n $ / gram\r\n \r\n \r\n \r\n\r\n \r\n \r\n Silver weight (grams)\r\n \r\n \r\n \r\n \r\n Current silver price per gram\r\n \r\n Live\r\n \r\n \r\n \r\n \r\n $ / gram\r\n \r\n \r\n \r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n Zakat Summary\r\n \r\n \r\n Total assets:\r\n 0.00 $\r\n \r\n \r\n Net zakatable assets:\r\n 0.00 $\r\n \r\n \r\n Nisab value (85g gold):\r\n ...\r\n \r\n \r\n Enter data to check eligibility\r\n \r\n \r\n \r\n\r\n \r\n \r\n Zakat due (2.5%)\r\n 0.00 $\r\n \r\n \r\n <a>\r\n \r\n Contact via WhatsApp for consultation and donation\r\n </a>\r\n \r\n \r\n \r\n \r\n\r\n\r\n// Zakat Calculator Logic\r\nlet zakatcalculatorPricesLoaded = false;\r\n\r\n// Initialize calculator when DOM is loaded\r\ndocument.addEventListener('DOMContentLoaded', () => {\r\n zakatcalculatorFetchPrices();\r\n zakatcalculatorCalculate();\r\n \r\n // Add input event listeners for real-time calculation\r\n const inputs = document.querySelectorAll('.zakatcalculator-section__input');\r\n inputs.forEach(input => {\r\n input.addEventListener('input', zakatcalculatorCalculate);\r\n });\r\n \r\n // Format numbers as user types\r\n inputs.forEach(input => {\r\n input.addEventListener('blur', function() {\r\n if (this.value) {\r\n const value = parseFloat(this.value);\r\n if (!isNaN(value)) {\r\n this.value = value.toLocaleString('en-US', {\r\n minimumFractionDigits: 2,\r\n maximumFractionDigits: 2\r\n });\r\n }\r\n }\r\n });\r\n \r\n input.addEventListener('focus', function() {\r\n if (this.value) {\r\n this.value = this.value.replace(/[^\\d.]/g, '');\r\n }\r\n });\r\n });\r\n});\r\n\r\n// Fetch metal prices\r\nasync function zakatcalculatorFetchPrices() {\r\n const goldInput = document.getElementById('goldPrice');\r\n const silverInput = document.getElementById('silverPrice');\r\n const refreshButton = document.querySelector('.zakatcalculator-section__refresh-button');\r\n const refreshIcon = document.querySelector('.zakatcalculator-section__refresh-icon');\r\n \r\n if (!refreshButton || !refreshIcon) return;\r\n \r\n // Show loading state\r\n refreshButton.disabled = true;\r\n refreshIcon.classList.add('zakatcalculator-section__refresh-icon--spinning');\r\n goldInput.classList.add('zakatcalculator-section__input--loading');\r\n silverInput.classList.add('zakatcalculator-section__input--loading');\r\n \r\n try {\r\n // Simulate API call with delay\r\n await new Promise(resolve => setTimeout(resolve, 1500));\r\n \r\n // Mock data (in a real app, you would fetch from an API)\r\n const liveGoldPrice = 76.50;\r\n const liveSilverPrice = 0.95;\r\n \r\n // Update inputs\r\n goldInput.value = liveGoldPrice.toFixed(2);\r\n silverInput.value = liveSilverPrice.toFixed(2);\r\n \r\n // Remove loading state\r\n goldInput.classList.remove('zakatcalculator-section__input--loading');\r\n silverInput.classList.remove('zakatcalculator-section__input--loading');\r\n goldInput.classList.add('zakatcalculator-section__input--valid');\r\n silverInput.classList.add('zakatcalculator-section__input--valid');\r\n \r\n zakatcalculatorPricesLoaded = true;\r\n \r\n // Show success feedback\r\n refreshButton.innerHTML = ' Updated';\r\n refreshButton.style.backgroundColor = '#617f67';\r\n refreshButton.style.color = 'white';\r\n \r\n setTimeout(() => {\r\n refreshButton.innerHTML = ' Refresh Prices';\r\n refreshButton.style.backgroundColor = '';\r\n refreshButton.style.color = '';\r\n }, 2000);\r\n \r\n } catch (error) {\r\n console.error(\"Failed to fetch prices\", error);\r\n \r\n // Fallback values\r\n goldInput.value = 75.00;\r\n silverInput.value = 0.90;\r\n \r\n // Show error state\r\n goldInput.classList.remove('zakatcalculator-section__input--loading');\r\n silverInput.classList.remove('zakatcalculator-section__input--loading');\r\n goldInput.classList.add('zakatcalculator-section__input--invalid');\r\n silverInput.classList.add('zakatcalculator-section__input--invalid');\r\n \r\n refreshButton.innerHTML = ' Update Failed';\r\n refreshButton.style.backgroundColor = '#dc2626';\r\n refreshButton.style.color = 'white';\r\n \r\n setTimeout(() => {\r\n refreshButton.innerHTML = ' Refresh Prices';\r\n refreshButton.style.backgroundColor = '';\r\n refreshButton.style.color = '';\r\n }, 2000);\r\n \r\n } finally {\r\n refreshButton.disabled = false;\r\n refreshIcon.classList.remove('zakatcalculator-section__refresh-icon--spinning');\r\n \r\n // Recalculate zakat\r\n zakatcalculatorCalculate();\r\n }\r\n}\r\n\r\n// Calculate zakat\r\nfunction zakatcalculatorCalculate() {\r\n const cashHand = parseFloat(document.getElementById('cashHand').value) || 0;\r\n const cashBank = parseFloat(document.getElementById('cashBank').value) || 0;\r\n const goldWeight = parseFloat(document.getElementById('goldWeight').value) || 0;\r\n const goldPrice = parseFloat(document.getElementById('goldPrice').value) || 0;\r\n const silverWeight = parseFloat(document.getElementById('silverWeight').value) || 0;\r\n const silverPrice = parseFloat(document.getElementById('silverPrice').value) || 0;\r\n \r\n // Calculate totals\r\n const totalAssets = cashHand + cashBank + (goldWeight * goldPrice) + (silverWeight * silverPrice);\r\n const nisabThreshold = 85 * goldPrice;\r\n \r\n // Update display\r\n document.getElementById('totalAssetsDisplay').textContent = \r\n formatCurrency(totalAssets);\r\n \r\n document.getElementById('netAssetsDisplay').textContent = \r\n formatCurrency(totalAssets);\r\n \r\n if (goldPrice > 0) {\r\n document.getElementById('nisabValueDisplay').textContent = \r\n formatCurrency(nisabThreshold);\r\n } else {\r\n document.getElementById('nisabValueDisplay').textContent = '...';\r\n }\r\n \r\n // Update status and final zakat\r\n const statusBadge = document.getElementById('statusBadge');\r\n const finalDisplay = document.getElementById('finalZakatDisplay');\r\n const payButton = document.querySelector('.zakatcalculator-section__pay-button');\r\n \r\n if (totalAssets >= nisabThreshold && goldPrice > 0 && zakatcalculatorPricesLoaded) {\r\n const zakatAmount = totalAssets * 0.025;\r\n finalDisplay.textContent = formatCurrency(zakatAmount);\r\n \r\n // Update status badge\r\n statusBadge.textContent = '✓ Zakat is due (Nisab reached)';\r\n statusBadge.className = 'zakatcalculator-section__status zakatcalculator-section__status--eligible';\r\n \r\n // Enable pay button\r\n payButton.disabled = false;\r\n payButton.innerHTML = ' Pay Zakat Now';\r\n \r\n } else {\r\n finalDisplay.textContent = '0.00 $';\r\n \r\n // Update status badge\r\n if (!zakatcalculatorPricesLoaded) {\r\n statusBadge.textContent = 'Enter data to check eligibility';\r\n statusBadge.className = 'zakatcalculator-section__status zakatcalculator-section__status--not-eligible';\r\n } else if (totalAssets < nisabThreshold) {\r\n statusBadge.textContent = 'Zakat is not due (Nisab not reached)';\r\n statusBadge.className = 'zakatcalculator-section__status zakatcalculator-section__status--not-eligible';\r\n } else {\r\n statusBadge.textContent = 'Enter data to check eligibility';\r\n statusBadge.className = 'zakatcalculator-section__status zakatcalculator-section__status--not-eligible';\r\n }\r\n \r\n // Disable pay button\r\n payButton.disabled = true;\r\n payButton.innerHTML = ' Pay Zakat Now';\r\n }\r\n}\r\n\r\n// Format currency\r\nfunction formatCurrency(amount) {\r\n return new Intl.NumberFormat('en-US', {\r\n style: 'currency',\r\n currency: 'USD',\r\n minimumFractionDigits: 2,\r\n maximumFractionDigits: 2\r\n }).format(amount);\r\n}\r\n\r\n// Add zakat to cart\r\nfunction zakatcalculatorAddToCart() {\r\n const amountText = document.getElementById('finalZakatDisplay').textContent;\r\n const amount = parseFloat(amountText.replace(/[^0-9.-]+/g, \"\"));\r\n \r\n if (amount > 0 && !isNaN(amount)) {\r\n // Use your existing addToCart function\r\n if (typeof addToCart === 'function') {\r\n addToCart('Calculated Zakat', amount, 'Zakat');\r\n } else {\r\n // Fallback if addToCart is not defined\r\n alert(`Calculated Zakat amount: ${amountText}`);\r\n }\r\n } else {\r\n alert(\"Invalid zakat amount. Please check your inputs.\");\r\n }\r\n}\r\n\r\n// Input validation\r\nfunction validateZakatInput(input) {\r\n const value = parseFloat(input.value);\r\n const min = parseFloat(input.getAttribute('min')) || 0;\r\n \r\n if (isNaN(value) || value < min) {\r\n input.classList.add('zakatcalculator-section__input--invalid');\r\n return false;\r\n } else {\r\n input.classList.remove('zakatcalculator-section__input--invalid');\r\n input.classList.add('zakatcalculator-section__input--valid');\r\n return true;\r\n }\r\n}","animate_delay":"0"},"editing":false,"element_name":"gva_text_noeditor"}],"editing":false,"element_name":"gva_column"}],"editing":false,"element_name":"gva_row"},{"settings":{"element":"gva_row","bg_particles":"off","bg_position":"center top","bg_repeat":"no-repeat","bg_attachment":"scroll","bg_size":"cover","style_space":"remove_margin remove_padding remove_padding_col","layout":"container-fw","class":"partner","margin_top":"30","margin_bottom":"30"},"columns":[{"settings":{"element":"gva_column"},"col_lg":12,"elements":[{"settings":{"content":"\r\n \r\n Strategic Partnerships\r\n Our partners in creating hope\r\n \r\n \r\n ","animate_delay":"0"},"editing":false,"element_name":"gva_text_noeditor"},{"settings":{"title_admin":"Partners: Partners Block - en","block_drupal":"views_block__partners_block_2","hidden_title":"on","align_title":"title-align-right","remove_margin":"on","style_text":"text-dark","animate_delay":"0"},"editing":false,"element_name":"gva_drupal_block"}],"editing":false,"element_name":"gva_column"}],"editing":false,"element_name":"gva_row"}]') (Line: 47)
Drupal\gavias_content_builder\Plugin\Field\FieldFormatter\GaviasContentBuilderFormatter->viewElements(Object, 'en') (Line: 89)
Drupal\Core\Field\FormatterBase->view(Object, 'en') (Line: 263)
Drupal\Core\Entity\Entity\EntityViewDisplay->buildMultiple(Array) (Line: 351)
Drupal\Core\Entity\EntityViewBuilder->buildComponents(Array, Array, Array, 'full') (Line: 24)
Drupal\node\NodeViewBuilder->buildComponents(Array, Array, Array, 'full') (Line: 293)
Drupal\Core\Entity\EntityViewBuilder->buildMultiple(Array) (Line: 250)
Drupal\Core\Entity\EntityViewBuilder->build(Array)
call_user_func_array(Array, Array) (Line: 100)
Drupal\Core\Render\Renderer->doTrustedCallback(Array, Array, 'Render #pre_render callbacks must be methods of a class that implements \Drupal\Core\Security\TrustedCallbackInterface or be an anonymous function. The callback was %s. Support for this callback implementation is deprecated in 8.8.0 and will be removed in Drupal 9.0.0. See https://www.drupal.org/node/2966725', 'silenced_deprecation', 'Drupal\Core\Render\Element\RenderCallbackInterface') (Line: 781)
Drupal\Core\Render\Renderer->doCallback('#pre_render', Array, Array) (Line: 372)
Drupal\Core\Render\Renderer->doRender(Array, ) (Line: 200)
Drupal\Core\Render\Renderer->render(Array, ) (Line: 226)
Drupal\Core\Render\MainContent\HtmlRenderer->Drupal\Core\Render\MainContent\{closure}() (Line: 573)
Drupal\Core\Render\Renderer->executeInRenderContext(Object, Object) (Line: 227)
Drupal\Core\Render\MainContent\HtmlRenderer->prepare(Array, Object, Object) (Line: 117)
Drupal\Core\Render\MainContent\HtmlRenderer->renderResponse(Array, Object, Object) (Line: 90)
Drupal\Core\EventSubscriber\MainContentViewSubscriber->onViewRenderArray(Object, 'kernel.view', Object)
call_user_func(Array, Object, 'kernel.view', Object) (Line: 111)
Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher->dispatch('kernel.view', Object) (Line: 156)
Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object, 1) (Line: 68)
Symfony\Component\HttpKernel\HttpKernel->handle(Object, 1, 1) (Line: 57)
Drupal\Core\StackMiddleware\Session->handle(Object, 1, 1) (Line: 47)
Drupal\Core\StackMiddleware\KernelPreHandle->handle(Object, 1, 1) (Line: 191)
Drupal\page_cache\StackMiddleware\PageCache->fetch(Object, 1, 1) (Line: 128)
Drupal\page_cache\StackMiddleware\PageCache->lookup(Object, 1, 1) (Line: 82)
Drupal\page_cache\StackMiddleware\PageCache->handle(Object, 1, 1) (Line: 47)
Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle(Object, 1, 1) (Line: 52)
Drupal\Core\StackMiddleware\NegotiationMiddleware->handle(Object, 1, 1) (Line: 23)
Stack\StackedHttpKernel->handle(Object, 1, 1) (Line: 708)
Drupal\Core\DrupalKernel->handle(Object) (Line: 19)
- Deprecated function: implode(): Passing glue string after array is deprecated. Swap the parameters in element_gva_column->render_content() (line 463 of themes/gavias_kunco/gva_content_builder/gva_column.php).
element_gva_column->render_content(Array, '
Who We Are
We plant hope..
and build people and the future
Wejdan Charity is a leading humanitarian organization, founded with an ambitious vision to be a bridge of الخير between donors and those in need.
Development Stages
A continuous journey of growth
Areas of Work
We reach where the need is
"We work with passion to bring smiles"
') (Line: 110)
gavias_content_builder_render_element('gva_column', Array, '
Who We Are
We plant hope..
and build people and the future
Wejdan Charity is a leading humanitarian organization, founded with an ambitious vision to be a bridge of الخير between donors and those in need.
Development Stages
A continuous journey of growth
Areas of Work
We reach where the need is
"We work with passion to bring smiles"
') (Line: 58)
gavias_content_builder_render_el(Array) (Line: 22)
gavias_content_builder_frontend('[{"settings":{"bg_particles":"off","bg_position":"center top","bg_repeat":"no-repeat","bg_attachment":"scroll","bg_size":"cover","style_space":"remove_padding","layout":"container-fw"},"columns":[{"settings":{"element":"gva_column","bg_position":"center top","bg_repeat":"no-repeat","bg_attachment":"scroll","bg_size":"cover","el_class":"front"},"col_lg":12,"elements":[{"settings":{"content":"\r\n \r\n \r\n \r\n \r\n Urgent Appeal\r\n \r\n Be a helping hand for them in\r\n times of crisis\r\n \r\n \r\n At \"Wejdan Charity\", we work with full transparency to deliver your donations to those in need in conflict and poverty-stricken areas.\r\n \r\n \r\n <a>\r\n Charity Donations \r\n </a>\r\n <a>\r\n Our Projects \r\n </a>\r\n \r\n \r\n \r\n \r\n","animate_delay":"0"},"editing":false,"element_name":"gva_text_noeditor"}],"editing":false,"element_name":"gva_column"}],"editing":false,"element_name":"gva_row"},{"settings":{"element":"gva_row","bg_particles":"off","bg_position":"center top","bg_repeat":"no-repeat","bg_attachment":"scroll","bg_size":"cover","style_space":"remove_padding","layout":"container","class":"before-help-region"},"columns":[{"settings":{"element":"gva_column"},"col_lg":12,"elements":[{"settings":{"title":"Take action for animals now","link":"#","button_title":"Donation Now","button_align":"button-right-v2","style_text":"text-light","style_button":"btn-theme","donorbox":"off","target":"off","el_class":"margin","animate":"fade-up","animate_delay":"0"},"editing":false,"element_name":"gva_call_to_action"}],"editing":false,"element_name":"gva_column"}],"editing":false,"element_name":"gva_row"},{"settings":{"element":"gva_row","bg_particles":"off","bg_position":"center top","bg_repeat":"no-repeat","bg_attachment":"scroll","bg_size":"cover","style_space":"remove_padding","layout":"container-fw","bg_color":"#f9fafb"},"columns":[{"settings":{"element":"gva_column","bg_position":"center top","bg_repeat":"no-repeat","bg_attachment":"scroll","bg_size":"cover","el_class":"about"},"col_lg":12,"elements":[{"settings":{"content":"\r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n \r\n \r\n Who We Are\r\n \r\n \r\n We plant hope.. \r\n and build people and the future\r\n \r\n \r\n Wejdan Charity is a leading humanitarian organization, founded with an ambitious vision to be a bridge of الخير between donors and those in need.\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n Development Stages\r\n A continuous journey of growth\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n Areas of Work\r\n We reach where the need is\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \"We work with passion to bring smiles\"\r\n \r\n \r\n \r\n \r\n \r\n","animate_delay":"0"},"editing":false,"element_name":"gva_text_noeditor"}],"editing":false,"element_name":"gva_column"}],"editing":false,"element_name":"gva_row"},{"settings":{"element":"gva_row","bg_particles":"off","bg_position":"center top","bg_repeat":"no-repeat","bg_attachment":"scroll","bg_size":"cover","style_space":"remove_margin remove_padding remove_padding_col","layout":"container-fw","class":"partner","margin_top":"30","margin_bottom":"30"},"columns":[{"settings":{"element":"gva_column"},"col_lg":12,"elements":[{"settings":{"content":"\r\n\r\n \r\n \r\n Initiatives & Programs\r\n Our Areas of Work\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n Ongoing Charity\r\n Water wells, mosque construction\r\n \r\n \r\n \r\n \r\n \r\n \r\n Student Sponsorship\r\n Building the future through education\r\n \r\n \r\n \r\n \r\n \r\n \r\n Humanitarian Cases\r\n Patient treatment, surgeries\r\n \r\n \r\n \r\n \r\n \r\n \r\n Development Projects\r\n Empowering productive families\r\n \r\n \r\n<a>Learn more about our programs and initiatives</a>\r\n \r\n","animate_delay":"0"},"editing":false,"element_name":"gva_text_noeditor"}],"editing":false,"element_name":"gva_column"}],"editing":false,"element_name":"gva_row"},{"settings":{"element":"gva_row","bg_particles":"off","bg_position":"center top","bg_repeat":"no-repeat","bg_attachment":"scroll","bg_size":"cover","style_space":"remove_margin remove_padding remove_padding_col","layout":"container","class":"newsfront"},"columns":[{"settings":{"element":"gva_column"},"col_lg":12,"elements":[{"settings":{"content":"\r\n \r\n \r\n Our News\r\n \r\n \r\n \r\nNews that tells the story of giving \r\n \r\n","animate_delay":"0"},"editing":false,"element_name":"gva_text_noeditor"},{"settings":{"title_admin":"news: news Block -en","block_drupal":"views_block__news_block_3","hidden_title":"on","align_title":"title-align-left","remove_margin":"on","style_text":"text-dark","animate_delay":"0"},"editing":false,"element_name":"gva_drupal_block"}],"editing":false,"element_name":"gva_column"}],"editing":false,"element_name":"gva_row"},{"settings":{"bg_particles":"off","bg_position":"center top","bg_repeat":"no-repeat","bg_attachment":"scroll","bg_size":"cover","style_space":"remove_padding","layout":"container-fw","element":"gva_row","class":"sliderfrontpage"},"columns":[{"settings":{"element":"gva_column","bg_position":"center top","bg_repeat":"no-repeat","bg_attachment":"scroll","bg_size":"cover"},"col_lg":12,"elements":[{"settings":{"title_admin":"news: campigns-en","block_drupal":"views_block__news_block_5","hidden_title":"on","align_title":"title-align-right","remove_margin":"on","style_text":"text-dark","animate_delay":"0"},"editing":false,"element_name":"gva_drupal_block"}],"editing":false,"element_name":"gva_column"}],"editing":false,"element_name":"gva_row"},{"settings":{"element":"gva_row","bg_particles":"off","bg_position":"center top","bg_repeat":"no-repeat","bg_attachment":"scroll","bg_size":"cover","style_space":"remove_margin remove_padding remove_padding_col","layout":"container-fw","class":"partner"},"columns":[{"settings":{"element":"gva_column"},"col_lg":12,"elements":[{"settings":{"content":"\r\n \r\n \r\n \r\n Our Distinguished Projects\r\n \r\n \r\n \r\n At Wejdan Charity, we strive to provide support and assistance to communities in need who are affected by disasters, crises, and wars, with the aim of improving quality of life and promoting sustainable development. Our projects span across several areas:\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n Relief Projects\r\n Emergency response to disasters and wars, providing food and medicine.\r\n \r\n<a> Browse Projects </a>\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n Development Projects\r\n Empowering communities and building capacities.\r\n \r\n<a> Browse Projects </a>\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n Seasonal Projects\r\n Ramadan campaigns, Qurbani, and winter clothing.\r\n \r\n<a> Browse Projects </a>\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n Endowment Projects\r\n An investment for the hereafter—mosques, wells, and charitable endowments.\r\n<a> Browse Projects </a>\r\n \r\n \r\n \r\n \r\n","animate_delay":"0"},"editing":false,"element_name":"gva_text_noeditor"}],"editing":false,"element_name":"gva_column"}],"editing":false,"element_name":"gva_row"},{"settings":{"element":"gva_row","bg_particles":"off","bg_position":"center top","bg_repeat":"no-repeat","bg_attachment":"scroll","bg_size":"cover","style_space":"remove_margin remove_padding remove_padding_col","layout":"container-fw","class":"partner"},"columns":[{"settings":{"element":"gva_column"},"col_lg":12,"elements":[{"settings":{"content":"\r\n \r\n \r\n\r\n \r\n \r\n Our Achievements in Numbers\r\n Your trust makes the difference\r\n \r\n \r\n\r\n \r\n \r\n 0\r\n Beneficiaries worldwide\r\n \r\n \r\n \r\n 0\r\n Projects implemented\r\n \r\n \r\n \r\n 0\r\n Countries we operate in\r\n \r\n \r\n \r\n 0\r\n Volunteers\r\n \r\n \r\n \r\n \r\n\r\n\r\n// Enhanced counter animation for facts section\r\nfunction animateFactsCounters() {\r\n const statNumbers = document.querySelectorAll('.facts-section__stat-number');\r\n \r\n const observer = new IntersectionObserver((entries) => {\r\n entries.forEach(entry => {\r\n if (entry.isIntersecting) {\r\n const counter = entry.target;\r\n const target = parseInt(counter.getAttribute('data-target'));\r\n const duration = 2000;\r\n const increment = target / (duration / 16);\r\n \r\n let current = 0;\r\n const updateCounter = () => {\r\n current += increment;\r\n if (current < target) {\r\n // Format number with K for thousands\r\n let displayNum = Math.ceil(current);\r\n if (displayNum >= 1000) {\r\n counter.textContent = (displayNum / 1000).toFixed(1).replace('.0', '') + 'K';\r\n } else {\r\n counter.textContent = displayNum.toLocaleString();\r\n }\r\n requestAnimationFrame(updateCounter);\r\n } else {\r\n // Final formatting\r\n if (target >= 1000) {\r\n counter.textContent = (target / 1000).toFixed(1).replace('.0', '') + 'K';\r\n counter.classList.add('formatted');\r\n } else {\r\n counter.textContent = target.toLocaleString();\r\n }\r\n counter.classList.add('animated');\r\n setTimeout(() => counter.classList.remove('animated'), 600);\r\n }\r\n };\r\n updateCounter();\r\n observer.unobserve(counter);\r\n }\r\n });\r\n }, { threshold: 0.5, rootMargin: '0px 0px -50px 0px' });\r\n \r\n statNumbers.forEach(counter => observer.observe(counter));\r\n}\r\n\r\n// Call this function when DOM is loaded\r\ndocument.addEventListener('DOMContentLoaded', () => {\r\n animateFactsCounters();\r\n});","animate_delay":"0"},"editing":false,"element_name":"gva_text_noeditor"}],"editing":false,"element_name":"gva_column"}],"editing":false,"element_name":"gva_row"},{"settings":{"element":"gva_row","bg_particles":"off","bg_position":"center top","bg_repeat":"no-repeat","bg_attachment":"scroll","bg_size":"cover","style_space":"remove_margin remove_padding remove_padding_col","layout":"container-fw","class":"zakatcalc"},"columns":[{"settings":{"element":"gva_column"},"col_lg":12,"elements":[{"settings":{"content":"\r\n\r\n \r\n \r\n \r\n \r\nSmart Zakat Calculator\r\n A precise and comprehensive tool\r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n \r\n \r\n Money & Savings\r\n \r\n \r\n \r\n Cash (on hand or at home)\r\n \r\n \r\n $\r\n \r\n \r\n \r\n Bank balances\r\n \r\n \r\n $\r\n \r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n Gold & Silver\r\n \r\n \r\n Refresh Prices\r\n \r\n \r\n \r\n \r\n \r\n Gold weight (grams)\r\n \r\n \r\n \r\n \r\n Current gold price per gram\r\n \r\n Live\r\n \r\n \r\n \r\n \r\n $ / gram\r\n \r\n \r\n \r\n\r\n \r\n \r\n Silver weight (grams)\r\n \r\n \r\n \r\n \r\n Current silver price per gram\r\n \r\n Live\r\n \r\n \r\n \r\n \r\n $ / gram\r\n \r\n \r\n \r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n Zakat Summary\r\n \r\n \r\n Total assets:\r\n 0.00 $\r\n \r\n \r\n Net zakatable assets:\r\n 0.00 $\r\n \r\n \r\n Nisab value (85g gold):\r\n ...\r\n \r\n \r\n Enter data to check eligibility\r\n \r\n \r\n \r\n\r\n \r\n \r\n Zakat due (2.5%)\r\n 0.00 $\r\n \r\n \r\n <a>\r\n \r\n Contact via WhatsApp for consultation and donation\r\n </a>\r\n \r\n \r\n \r\n \r\n\r\n\r\n// Zakat Calculator Logic\r\nlet zakatcalculatorPricesLoaded = false;\r\n\r\n// Initialize calculator when DOM is loaded\r\ndocument.addEventListener('DOMContentLoaded', () => {\r\n zakatcalculatorFetchPrices();\r\n zakatcalculatorCalculate();\r\n \r\n // Add input event listeners for real-time calculation\r\n const inputs = document.querySelectorAll('.zakatcalculator-section__input');\r\n inputs.forEach(input => {\r\n input.addEventListener('input', zakatcalculatorCalculate);\r\n });\r\n \r\n // Format numbers as user types\r\n inputs.forEach(input => {\r\n input.addEventListener('blur', function() {\r\n if (this.value) {\r\n const value = parseFloat(this.value);\r\n if (!isNaN(value)) {\r\n this.value = value.toLocaleString('en-US', {\r\n minimumFractionDigits: 2,\r\n maximumFractionDigits: 2\r\n });\r\n }\r\n }\r\n });\r\n \r\n input.addEventListener('focus', function() {\r\n if (this.value) {\r\n this.value = this.value.replace(/[^\\d.]/g, '');\r\n }\r\n });\r\n });\r\n});\r\n\r\n// Fetch metal prices\r\nasync function zakatcalculatorFetchPrices() {\r\n const goldInput = document.getElementById('goldPrice');\r\n const silverInput = document.getElementById('silverPrice');\r\n const refreshButton = document.querySelector('.zakatcalculator-section__refresh-button');\r\n const refreshIcon = document.querySelector('.zakatcalculator-section__refresh-icon');\r\n \r\n if (!refreshButton || !refreshIcon) return;\r\n \r\n // Show loading state\r\n refreshButton.disabled = true;\r\n refreshIcon.classList.add('zakatcalculator-section__refresh-icon--spinning');\r\n goldInput.classList.add('zakatcalculator-section__input--loading');\r\n silverInput.classList.add('zakatcalculator-section__input--loading');\r\n \r\n try {\r\n // Simulate API call with delay\r\n await new Promise(resolve => setTimeout(resolve, 1500));\r\n \r\n // Mock data (in a real app, you would fetch from an API)\r\n const liveGoldPrice = 76.50;\r\n const liveSilverPrice = 0.95;\r\n \r\n // Update inputs\r\n goldInput.value = liveGoldPrice.toFixed(2);\r\n silverInput.value = liveSilverPrice.toFixed(2);\r\n \r\n // Remove loading state\r\n goldInput.classList.remove('zakatcalculator-section__input--loading');\r\n silverInput.classList.remove('zakatcalculator-section__input--loading');\r\n goldInput.classList.add('zakatcalculator-section__input--valid');\r\n silverInput.classList.add('zakatcalculator-section__input--valid');\r\n \r\n zakatcalculatorPricesLoaded = true;\r\n \r\n // Show success feedback\r\n refreshButton.innerHTML = ' Updated';\r\n refreshButton.style.backgroundColor = '#617f67';\r\n refreshButton.style.color = 'white';\r\n \r\n setTimeout(() => {\r\n refreshButton.innerHTML = ' Refresh Prices';\r\n refreshButton.style.backgroundColor = '';\r\n refreshButton.style.color = '';\r\n }, 2000);\r\n \r\n } catch (error) {\r\n console.error(\"Failed to fetch prices\", error);\r\n \r\n // Fallback values\r\n goldInput.value = 75.00;\r\n silverInput.value = 0.90;\r\n \r\n // Show error state\r\n goldInput.classList.remove('zakatcalculator-section__input--loading');\r\n silverInput.classList.remove('zakatcalculator-section__input--loading');\r\n goldInput.classList.add('zakatcalculator-section__input--invalid');\r\n silverInput.classList.add('zakatcalculator-section__input--invalid');\r\n \r\n refreshButton.innerHTML = ' Update Failed';\r\n refreshButton.style.backgroundColor = '#dc2626';\r\n refreshButton.style.color = 'white';\r\n \r\n setTimeout(() => {\r\n refreshButton.innerHTML = ' Refresh Prices';\r\n refreshButton.style.backgroundColor = '';\r\n refreshButton.style.color = '';\r\n }, 2000);\r\n \r\n } finally {\r\n refreshButton.disabled = false;\r\n refreshIcon.classList.remove('zakatcalculator-section__refresh-icon--spinning');\r\n \r\n // Recalculate zakat\r\n zakatcalculatorCalculate();\r\n }\r\n}\r\n\r\n// Calculate zakat\r\nfunction zakatcalculatorCalculate() {\r\n const cashHand = parseFloat(document.getElementById('cashHand').value) || 0;\r\n const cashBank = parseFloat(document.getElementById('cashBank').value) || 0;\r\n const goldWeight = parseFloat(document.getElementById('goldWeight').value) || 0;\r\n const goldPrice = parseFloat(document.getElementById('goldPrice').value) || 0;\r\n const silverWeight = parseFloat(document.getElementById('silverWeight').value) || 0;\r\n const silverPrice = parseFloat(document.getElementById('silverPrice').value) || 0;\r\n \r\n // Calculate totals\r\n const totalAssets = cashHand + cashBank + (goldWeight * goldPrice) + (silverWeight * silverPrice);\r\n const nisabThreshold = 85 * goldPrice;\r\n \r\n // Update display\r\n document.getElementById('totalAssetsDisplay').textContent = \r\n formatCurrency(totalAssets);\r\n \r\n document.getElementById('netAssetsDisplay').textContent = \r\n formatCurrency(totalAssets);\r\n \r\n if (goldPrice > 0) {\r\n document.getElementById('nisabValueDisplay').textContent = \r\n formatCurrency(nisabThreshold);\r\n } else {\r\n document.getElementById('nisabValueDisplay').textContent = '...';\r\n }\r\n \r\n // Update status and final zakat\r\n const statusBadge = document.getElementById('statusBadge');\r\n const finalDisplay = document.getElementById('finalZakatDisplay');\r\n const payButton = document.querySelector('.zakatcalculator-section__pay-button');\r\n \r\n if (totalAssets >= nisabThreshold && goldPrice > 0 && zakatcalculatorPricesLoaded) {\r\n const zakatAmount = totalAssets * 0.025;\r\n finalDisplay.textContent = formatCurrency(zakatAmount);\r\n \r\n // Update status badge\r\n statusBadge.textContent = '✓ Zakat is due (Nisab reached)';\r\n statusBadge.className = 'zakatcalculator-section__status zakatcalculator-section__status--eligible';\r\n \r\n // Enable pay button\r\n payButton.disabled = false;\r\n payButton.innerHTML = ' Pay Zakat Now';\r\n \r\n } else {\r\n finalDisplay.textContent = '0.00 $';\r\n \r\n // Update status badge\r\n if (!zakatcalculatorPricesLoaded) {\r\n statusBadge.textContent = 'Enter data to check eligibility';\r\n statusBadge.className = 'zakatcalculator-section__status zakatcalculator-section__status--not-eligible';\r\n } else if (totalAssets < nisabThreshold) {\r\n statusBadge.textContent = 'Zakat is not due (Nisab not reached)';\r\n statusBadge.className = 'zakatcalculator-section__status zakatcalculator-section__status--not-eligible';\r\n } else {\r\n statusBadge.textContent = 'Enter data to check eligibility';\r\n statusBadge.className = 'zakatcalculator-section__status zakatcalculator-section__status--not-eligible';\r\n }\r\n \r\n // Disable pay button\r\n payButton.disabled = true;\r\n payButton.innerHTML = ' Pay Zakat Now';\r\n }\r\n}\r\n\r\n// Format currency\r\nfunction formatCurrency(amount) {\r\n return new Intl.NumberFormat('en-US', {\r\n style: 'currency',\r\n currency: 'USD',\r\n minimumFractionDigits: 2,\r\n maximumFractionDigits: 2\r\n }).format(amount);\r\n}\r\n\r\n// Add zakat to cart\r\nfunction zakatcalculatorAddToCart() {\r\n const amountText = document.getElementById('finalZakatDisplay').textContent;\r\n const amount = parseFloat(amountText.replace(/[^0-9.-]+/g, \"\"));\r\n \r\n if (amount > 0 && !isNaN(amount)) {\r\n // Use your existing addToCart function\r\n if (typeof addToCart === 'function') {\r\n addToCart('Calculated Zakat', amount, 'Zakat');\r\n } else {\r\n // Fallback if addToCart is not defined\r\n alert(`Calculated Zakat amount: ${amountText}`);\r\n }\r\n } else {\r\n alert(\"Invalid zakat amount. Please check your inputs.\");\r\n }\r\n}\r\n\r\n// Input validation\r\nfunction validateZakatInput(input) {\r\n const value = parseFloat(input.value);\r\n const min = parseFloat(input.getAttribute('min')) || 0;\r\n \r\n if (isNaN(value) || value < min) {\r\n input.classList.add('zakatcalculator-section__input--invalid');\r\n return false;\r\n } else {\r\n input.classList.remove('zakatcalculator-section__input--invalid');\r\n input.classList.add('zakatcalculator-section__input--valid');\r\n return true;\r\n }\r\n}","animate_delay":"0"},"editing":false,"element_name":"gva_text_noeditor"}],"editing":false,"element_name":"gva_column"}],"editing":false,"element_name":"gva_row"},{"settings":{"element":"gva_row","bg_particles":"off","bg_position":"center top","bg_repeat":"no-repeat","bg_attachment":"scroll","bg_size":"cover","style_space":"remove_margin remove_padding remove_padding_col","layout":"container-fw","class":"partner","margin_top":"30","margin_bottom":"30"},"columns":[{"settings":{"element":"gva_column"},"col_lg":12,"elements":[{"settings":{"content":"\r\n \r\n Strategic Partnerships\r\n Our partners in creating hope\r\n \r\n \r\n ","animate_delay":"0"},"editing":false,"element_name":"gva_text_noeditor"},{"settings":{"title_admin":"Partners: Partners Block - en","block_drupal":"views_block__partners_block_2","hidden_title":"on","align_title":"title-align-right","remove_margin":"on","style_text":"text-dark","animate_delay":"0"},"editing":false,"element_name":"gva_drupal_block"}],"editing":false,"element_name":"gva_column"}],"editing":false,"element_name":"gva_row"}]') (Line: 47)
Drupal\gavias_content_builder\Plugin\Field\FieldFormatter\GaviasContentBuilderFormatter->viewElements(Object, 'en') (Line: 89)
Drupal\Core\Field\FormatterBase->view(Object, 'en') (Line: 263)
Drupal\Core\Entity\Entity\EntityViewDisplay->buildMultiple(Array) (Line: 351)
Drupal\Core\Entity\EntityViewBuilder->buildComponents(Array, Array, Array, 'full') (Line: 24)
Drupal\node\NodeViewBuilder->buildComponents(Array, Array, Array, 'full') (Line: 293)
Drupal\Core\Entity\EntityViewBuilder->buildMultiple(Array) (Line: 250)
Drupal\Core\Entity\EntityViewBuilder->build(Array)
call_user_func_array(Array, Array) (Line: 100)
Drupal\Core\Render\Renderer->doTrustedCallback(Array, Array, 'Render #pre_render callbacks must be methods of a class that implements \Drupal\Core\Security\TrustedCallbackInterface or be an anonymous function. The callback was %s. Support for this callback implementation is deprecated in 8.8.0 and will be removed in Drupal 9.0.0. See https://www.drupal.org/node/2966725', 'silenced_deprecation', 'Drupal\Core\Render\Element\RenderCallbackInterface') (Line: 781)
Drupal\Core\Render\Renderer->doCallback('#pre_render', Array, Array) (Line: 372)
Drupal\Core\Render\Renderer->doRender(Array, ) (Line: 200)
Drupal\Core\Render\Renderer->render(Array, ) (Line: 226)
Drupal\Core\Render\MainContent\HtmlRenderer->Drupal\Core\Render\MainContent\{closure}() (Line: 573)
Drupal\Core\Render\Renderer->executeInRenderContext(Object, Object) (Line: 227)
Drupal\Core\Render\MainContent\HtmlRenderer->prepare(Array, Object, Object) (Line: 117)
Drupal\Core\Render\MainContent\HtmlRenderer->renderResponse(Array, Object, Object) (Line: 90)
Drupal\Core\EventSubscriber\MainContentViewSubscriber->onViewRenderArray(Object, 'kernel.view', Object)
call_user_func(Array, Object, 'kernel.view', Object) (Line: 111)
Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher->dispatch('kernel.view', Object) (Line: 156)
Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object, 1) (Line: 68)
Symfony\Component\HttpKernel\HttpKernel->handle(Object, 1, 1) (Line: 57)
Drupal\Core\StackMiddleware\Session->handle(Object, 1, 1) (Line: 47)
Drupal\Core\StackMiddleware\KernelPreHandle->handle(Object, 1, 1) (Line: 191)
Drupal\page_cache\StackMiddleware\PageCache->fetch(Object, 1, 1) (Line: 128)
Drupal\page_cache\StackMiddleware\PageCache->lookup(Object, 1, 1) (Line: 82)
Drupal\page_cache\StackMiddleware\PageCache->handle(Object, 1, 1) (Line: 47)
Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle(Object, 1, 1) (Line: 52)
Drupal\Core\StackMiddleware\NegotiationMiddleware->handle(Object, 1, 1) (Line: 23)
Stack\StackedHttpKernel->handle(Object, 1, 1) (Line: 708)
Drupal\Core\DrupalKernel->handle(Object) (Line: 19)
- Deprecated function: implode(): Passing glue string after array is deprecated. Swap the parameters in element_gva_row->render_content() (line 317 of themes/gavias_kunco/gva_content_builder/gva_row.php).
element_gva_row->render_content(Array, '
Who We Are
We plant hope..
and build people and the future
Wejdan Charity is a leading humanitarian organization, founded with an ambitious vision to be a bridge of الخير between donors and those in need.
Development Stages
A continuous journey of growth
Areas of Work
We reach where the need is
"We work with passion to bring smiles"
') (Line: 110)
gavias_content_builder_render_element('gva_row', Array, '
Who We Are
We plant hope..
and build people and the future
Wejdan Charity is a leading humanitarian organization, founded with an ambitious vision to be a bridge of الخير between donors and those in need.
Development Stages
A continuous journey of growth
Areas of Work
We reach where the need is
"We work with passion to bring smiles"
') (Line: 62)
gavias_content_builder_render_el(Array) (Line: 22)
gavias_content_builder_frontend('[{"settings":{"bg_particles":"off","bg_position":"center top","bg_repeat":"no-repeat","bg_attachment":"scroll","bg_size":"cover","style_space":"remove_padding","layout":"container-fw"},"columns":[{"settings":{"element":"gva_column","bg_position":"center top","bg_repeat":"no-repeat","bg_attachment":"scroll","bg_size":"cover","el_class":"front"},"col_lg":12,"elements":[{"settings":{"content":"\r\n \r\n \r\n \r\n \r\n Urgent Appeal\r\n \r\n Be a helping hand for them in\r\n times of crisis\r\n \r\n \r\n At \"Wejdan Charity\", we work with full transparency to deliver your donations to those in need in conflict and poverty-stricken areas.\r\n \r\n \r\n <a>\r\n Charity Donations \r\n </a>\r\n <a>\r\n Our Projects \r\n </a>\r\n \r\n \r\n \r\n \r\n","animate_delay":"0"},"editing":false,"element_name":"gva_text_noeditor"}],"editing":false,"element_name":"gva_column"}],"editing":false,"element_name":"gva_row"},{"settings":{"element":"gva_row","bg_particles":"off","bg_position":"center top","bg_repeat":"no-repeat","bg_attachment":"scroll","bg_size":"cover","style_space":"remove_padding","layout":"container","class":"before-help-region"},"columns":[{"settings":{"element":"gva_column"},"col_lg":12,"elements":[{"settings":{"title":"Take action for animals now","link":"#","button_title":"Donation Now","button_align":"button-right-v2","style_text":"text-light","style_button":"btn-theme","donorbox":"off","target":"off","el_class":"margin","animate":"fade-up","animate_delay":"0"},"editing":false,"element_name":"gva_call_to_action"}],"editing":false,"element_name":"gva_column"}],"editing":false,"element_name":"gva_row"},{"settings":{"element":"gva_row","bg_particles":"off","bg_position":"center top","bg_repeat":"no-repeat","bg_attachment":"scroll","bg_size":"cover","style_space":"remove_padding","layout":"container-fw","bg_color":"#f9fafb"},"columns":[{"settings":{"element":"gva_column","bg_position":"center top","bg_repeat":"no-repeat","bg_attachment":"scroll","bg_size":"cover","el_class":"about"},"col_lg":12,"elements":[{"settings":{"content":"\r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n \r\n \r\n Who We Are\r\n \r\n \r\n We plant hope.. \r\n and build people and the future\r\n \r\n \r\n Wejdan Charity is a leading humanitarian organization, founded with an ambitious vision to be a bridge of الخير between donors and those in need.\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n Development Stages\r\n A continuous journey of growth\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n Areas of Work\r\n We reach where the need is\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \"We work with passion to bring smiles\"\r\n \r\n \r\n \r\n \r\n \r\n","animate_delay":"0"},"editing":false,"element_name":"gva_text_noeditor"}],"editing":false,"element_name":"gva_column"}],"editing":false,"element_name":"gva_row"},{"settings":{"element":"gva_row","bg_particles":"off","bg_position":"center top","bg_repeat":"no-repeat","bg_attachment":"scroll","bg_size":"cover","style_space":"remove_margin remove_padding remove_padding_col","layout":"container-fw","class":"partner","margin_top":"30","margin_bottom":"30"},"columns":[{"settings":{"element":"gva_column"},"col_lg":12,"elements":[{"settings":{"content":"\r\n\r\n \r\n \r\n Initiatives & Programs\r\n Our Areas of Work\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n Ongoing Charity\r\n Water wells, mosque construction\r\n \r\n \r\n \r\n \r\n \r\n \r\n Student Sponsorship\r\n Building the future through education\r\n \r\n \r\n \r\n \r\n \r\n \r\n Humanitarian Cases\r\n Patient treatment, surgeries\r\n \r\n \r\n \r\n \r\n \r\n \r\n Development Projects\r\n Empowering productive families\r\n \r\n \r\n<a>Learn more about our programs and initiatives</a>\r\n \r\n","animate_delay":"0"},"editing":false,"element_name":"gva_text_noeditor"}],"editing":false,"element_name":"gva_column"}],"editing":false,"element_name":"gva_row"},{"settings":{"element":"gva_row","bg_particles":"off","bg_position":"center top","bg_repeat":"no-repeat","bg_attachment":"scroll","bg_size":"cover","style_space":"remove_margin remove_padding remove_padding_col","layout":"container","class":"newsfront"},"columns":[{"settings":{"element":"gva_column"},"col_lg":12,"elements":[{"settings":{"content":"\r\n \r\n \r\n Our News\r\n \r\n \r\n \r\nNews that tells the story of giving \r\n \r\n","animate_delay":"0"},"editing":false,"element_name":"gva_text_noeditor"},{"settings":{"title_admin":"news: news Block -en","block_drupal":"views_block__news_block_3","hidden_title":"on","align_title":"title-align-left","remove_margin":"on","style_text":"text-dark","animate_delay":"0"},"editing":false,"element_name":"gva_drupal_block"}],"editing":false,"element_name":"gva_column"}],"editing":false,"element_name":"gva_row"},{"settings":{"bg_particles":"off","bg_position":"center top","bg_repeat":"no-repeat","bg_attachment":"scroll","bg_size":"cover","style_space":"remove_padding","layout":"container-fw","element":"gva_row","class":"sliderfrontpage"},"columns":[{"settings":{"element":"gva_column","bg_position":"center top","bg_repeat":"no-repeat","bg_attachment":"scroll","bg_size":"cover"},"col_lg":12,"elements":[{"settings":{"title_admin":"news: campigns-en","block_drupal":"views_block__news_block_5","hidden_title":"on","align_title":"title-align-right","remove_margin":"on","style_text":"text-dark","animate_delay":"0"},"editing":false,"element_name":"gva_drupal_block"}],"editing":false,"element_name":"gva_column"}],"editing":false,"element_name":"gva_row"},{"settings":{"element":"gva_row","bg_particles":"off","bg_position":"center top","bg_repeat":"no-repeat","bg_attachment":"scroll","bg_size":"cover","style_space":"remove_margin remove_padding remove_padding_col","layout":"container-fw","class":"partner"},"columns":[{"settings":{"element":"gva_column"},"col_lg":12,"elements":[{"settings":{"content":"\r\n \r\n \r\n \r\n Our Distinguished Projects\r\n \r\n \r\n \r\n At Wejdan Charity, we strive to provide support and assistance to communities in need who are affected by disasters, crises, and wars, with the aim of improving quality of life and promoting sustainable development. Our projects span across several areas:\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n Relief Projects\r\n Emergency response to disasters and wars, providing food and medicine.\r\n \r\n<a> Browse Projects </a>\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n Development Projects\r\n Empowering communities and building capacities.\r\n \r\n<a> Browse Projects </a>\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n Seasonal Projects\r\n Ramadan campaigns, Qurbani, and winter clothing.\r\n \r\n<a> Browse Projects </a>\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n Endowment Projects\r\n An investment for the hereafter—mosques, wells, and charitable endowments.\r\n<a> Browse Projects </a>\r\n \r\n \r\n \r\n \r\n","animate_delay":"0"},"editing":false,"element_name":"gva_text_noeditor"}],"editing":false,"element_name":"gva_column"}],"editing":false,"element_name":"gva_row"},{"settings":{"element":"gva_row","bg_particles":"off","bg_position":"center top","bg_repeat":"no-repeat","bg_attachment":"scroll","bg_size":"cover","style_space":"remove_margin remove_padding remove_padding_col","layout":"container-fw","class":"partner"},"columns":[{"settings":{"element":"gva_column"},"col_lg":12,"elements":[{"settings":{"content":"\r\n \r\n \r\n\r\n \r\n \r\n Our Achievements in Numbers\r\n Your trust makes the difference\r\n \r\n \r\n\r\n \r\n \r\n 0\r\n Beneficiaries worldwide\r\n \r\n \r\n \r\n 0\r\n Projects implemented\r\n \r\n \r\n \r\n 0\r\n Countries we operate in\r\n \r\n \r\n \r\n 0\r\n Volunteers\r\n \r\n \r\n \r\n \r\n\r\n\r\n// Enhanced counter animation for facts section\r\nfunction animateFactsCounters() {\r\n const statNumbers = document.querySelectorAll('.facts-section__stat-number');\r\n \r\n const observer = new IntersectionObserver((entries) => {\r\n entries.forEach(entry => {\r\n if (entry.isIntersecting) {\r\n const counter = entry.target;\r\n const target = parseInt(counter.getAttribute('data-target'));\r\n const duration = 2000;\r\n const increment = target / (duration / 16);\r\n \r\n let current = 0;\r\n const updateCounter = () => {\r\n current += increment;\r\n if (current < target) {\r\n // Format number with K for thousands\r\n let displayNum = Math.ceil(current);\r\n if (displayNum >= 1000) {\r\n counter.textContent = (displayNum / 1000).toFixed(1).replace('.0', '') + 'K';\r\n } else {\r\n counter.textContent = displayNum.toLocaleString();\r\n }\r\n requestAnimationFrame(updateCounter);\r\n } else {\r\n // Final formatting\r\n if (target >= 1000) {\r\n counter.textContent = (target / 1000).toFixed(1).replace('.0', '') + 'K';\r\n counter.classList.add('formatted');\r\n } else {\r\n counter.textContent = target.toLocaleString();\r\n }\r\n counter.classList.add('animated');\r\n setTimeout(() => counter.classList.remove('animated'), 600);\r\n }\r\n };\r\n updateCounter();\r\n observer.unobserve(counter);\r\n }\r\n });\r\n }, { threshold: 0.5, rootMargin: '0px 0px -50px 0px' });\r\n \r\n statNumbers.forEach(counter => observer.observe(counter));\r\n}\r\n\r\n// Call this function when DOM is loaded\r\ndocument.addEventListener('DOMContentLoaded', () => {\r\n animateFactsCounters();\r\n});","animate_delay":"0"},"editing":false,"element_name":"gva_text_noeditor"}],"editing":false,"element_name":"gva_column"}],"editing":false,"element_name":"gva_row"},{"settings":{"element":"gva_row","bg_particles":"off","bg_position":"center top","bg_repeat":"no-repeat","bg_attachment":"scroll","bg_size":"cover","style_space":"remove_margin remove_padding remove_padding_col","layout":"container-fw","class":"zakatcalc"},"columns":[{"settings":{"element":"gva_column"},"col_lg":12,"elements":[{"settings":{"content":"\r\n\r\n \r\n \r\n \r\n \r\nSmart Zakat Calculator\r\n A precise and comprehensive tool\r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n \r\n \r\n Money & Savings\r\n \r\n \r\n \r\n Cash (on hand or at home)\r\n \r\n \r\n $\r\n \r\n \r\n \r\n Bank balances\r\n \r\n \r\n $\r\n \r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n Gold & Silver\r\n \r\n \r\n Refresh Prices\r\n \r\n \r\n \r\n \r\n \r\n Gold weight (grams)\r\n \r\n \r\n \r\n \r\n Current gold price per gram\r\n \r\n Live\r\n \r\n \r\n \r\n \r\n $ / gram\r\n \r\n \r\n \r\n\r\n \r\n \r\n Silver weight (grams)\r\n \r\n \r\n \r\n \r\n Current silver price per gram\r\n \r\n Live\r\n \r\n \r\n \r\n \r\n $ / gram\r\n \r\n \r\n \r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n Zakat Summary\r\n \r\n \r\n Total assets:\r\n 0.00 $\r\n \r\n \r\n Net zakatable assets:\r\n 0.00 $\r\n \r\n \r\n Nisab value (85g gold):\r\n ...\r\n \r\n \r\n Enter data to check eligibility\r\n \r\n \r\n \r\n\r\n \r\n \r\n Zakat due (2.5%)\r\n 0.00 $\r\n \r\n \r\n <a>\r\n \r\n Contact via WhatsApp for consultation and donation\r\n </a>\r\n \r\n \r\n \r\n \r\n\r\n\r\n// Zakat Calculator Logic\r\nlet zakatcalculatorPricesLoaded = false;\r\n\r\n// Initialize calculator when DOM is loaded\r\ndocument.addEventListener('DOMContentLoaded', () => {\r\n zakatcalculatorFetchPrices();\r\n zakatcalculatorCalculate();\r\n \r\n // Add input event listeners for real-time calculation\r\n const inputs = document.querySelectorAll('.zakatcalculator-section__input');\r\n inputs.forEach(input => {\r\n input.addEventListener('input', zakatcalculatorCalculate);\r\n });\r\n \r\n // Format numbers as user types\r\n inputs.forEach(input => {\r\n input.addEventListener('blur', function() {\r\n if (this.value) {\r\n const value = parseFloat(this.value);\r\n if (!isNaN(value)) {\r\n this.value = value.toLocaleString('en-US', {\r\n minimumFractionDigits: 2,\r\n maximumFractionDigits: 2\r\n });\r\n }\r\n }\r\n });\r\n \r\n input.addEventListener('focus', function() {\r\n if (this.value) {\r\n this.value = this.value.replace(/[^\\d.]/g, '');\r\n }\r\n });\r\n });\r\n});\r\n\r\n// Fetch metal prices\r\nasync function zakatcalculatorFetchPrices() {\r\n const goldInput = document.getElementById('goldPrice');\r\n const silverInput = document.getElementById('silverPrice');\r\n const refreshButton = document.querySelector('.zakatcalculator-section__refresh-button');\r\n const refreshIcon = document.querySelector('.zakatcalculator-section__refresh-icon');\r\n \r\n if (!refreshButton || !refreshIcon) return;\r\n \r\n // Show loading state\r\n refreshButton.disabled = true;\r\n refreshIcon.classList.add('zakatcalculator-section__refresh-icon--spinning');\r\n goldInput.classList.add('zakatcalculator-section__input--loading');\r\n silverInput.classList.add('zakatcalculator-section__input--loading');\r\n \r\n try {\r\n // Simulate API call with delay\r\n await new Promise(resolve => setTimeout(resolve, 1500));\r\n \r\n // Mock data (in a real app, you would fetch from an API)\r\n const liveGoldPrice = 76.50;\r\n const liveSilverPrice = 0.95;\r\n \r\n // Update inputs\r\n goldInput.value = liveGoldPrice.toFixed(2);\r\n silverInput.value = liveSilverPrice.toFixed(2);\r\n \r\n // Remove loading state\r\n goldInput.classList.remove('zakatcalculator-section__input--loading');\r\n silverInput.classList.remove('zakatcalculator-section__input--loading');\r\n goldInput.classList.add('zakatcalculator-section__input--valid');\r\n silverInput.classList.add('zakatcalculator-section__input--valid');\r\n \r\n zakatcalculatorPricesLoaded = true;\r\n \r\n // Show success feedback\r\n refreshButton.innerHTML = ' Updated';\r\n refreshButton.style.backgroundColor = '#617f67';\r\n refreshButton.style.color = 'white';\r\n \r\n setTimeout(() => {\r\n refreshButton.innerHTML = ' Refresh Prices';\r\n refreshButton.style.backgroundColor = '';\r\n refreshButton.style.color = '';\r\n }, 2000);\r\n \r\n } catch (error) {\r\n console.error(\"Failed to fetch prices\", error);\r\n \r\n // Fallback values\r\n goldInput.value = 75.00;\r\n silverInput.value = 0.90;\r\n \r\n // Show error state\r\n goldInput.classList.remove('zakatcalculator-section__input--loading');\r\n silverInput.classList.remove('zakatcalculator-section__input--loading');\r\n goldInput.classList.add('zakatcalculator-section__input--invalid');\r\n silverInput.classList.add('zakatcalculator-section__input--invalid');\r\n \r\n refreshButton.innerHTML = ' Update Failed';\r\n refreshButton.style.backgroundColor = '#dc2626';\r\n refreshButton.style.color = 'white';\r\n \r\n setTimeout(() => {\r\n refreshButton.innerHTML = ' Refresh Prices';\r\n refreshButton.style.backgroundColor = '';\r\n refreshButton.style.color = '';\r\n }, 2000);\r\n \r\n } finally {\r\n refreshButton.disabled = false;\r\n refreshIcon.classList.remove('zakatcalculator-section__refresh-icon--spinning');\r\n \r\n // Recalculate zakat\r\n zakatcalculatorCalculate();\r\n }\r\n}\r\n\r\n// Calculate zakat\r\nfunction zakatcalculatorCalculate() {\r\n const cashHand = parseFloat(document.getElementById('cashHand').value) || 0;\r\n const cashBank = parseFloat(document.getElementById('cashBank').value) || 0;\r\n const goldWeight = parseFloat(document.getElementById('goldWeight').value) || 0;\r\n const goldPrice = parseFloat(document.getElementById('goldPrice').value) || 0;\r\n const silverWeight = parseFloat(document.getElementById('silverWeight').value) || 0;\r\n const silverPrice = parseFloat(document.getElementById('silverPrice').value) || 0;\r\n \r\n // Calculate totals\r\n const totalAssets = cashHand + cashBank + (goldWeight * goldPrice) + (silverWeight * silverPrice);\r\n const nisabThreshold = 85 * goldPrice;\r\n \r\n // Update display\r\n document.getElementById('totalAssetsDisplay').textContent = \r\n formatCurrency(totalAssets);\r\n \r\n document.getElementById('netAssetsDisplay').textContent = \r\n formatCurrency(totalAssets);\r\n \r\n if (goldPrice > 0) {\r\n document.getElementById('nisabValueDisplay').textContent = \r\n formatCurrency(nisabThreshold);\r\n } else {\r\n document.getElementById('nisabValueDisplay').textContent = '...';\r\n }\r\n \r\n // Update status and final zakat\r\n const statusBadge = document.getElementById('statusBadge');\r\n const finalDisplay = document.getElementById('finalZakatDisplay');\r\n const payButton = document.querySelector('.zakatcalculator-section__pay-button');\r\n \r\n if (totalAssets >= nisabThreshold && goldPrice > 0 && zakatcalculatorPricesLoaded) {\r\n const zakatAmount = totalAssets * 0.025;\r\n finalDisplay.textContent = formatCurrency(zakatAmount);\r\n \r\n // Update status badge\r\n statusBadge.textContent = '✓ Zakat is due (Nisab reached)';\r\n statusBadge.className = 'zakatcalculator-section__status zakatcalculator-section__status--eligible';\r\n \r\n // Enable pay button\r\n payButton.disabled = false;\r\n payButton.innerHTML = ' Pay Zakat Now';\r\n \r\n } else {\r\n finalDisplay.textContent = '0.00 $';\r\n \r\n // Update status badge\r\n if (!zakatcalculatorPricesLoaded) {\r\n statusBadge.textContent = 'Enter data to check eligibility';\r\n statusBadge.className = 'zakatcalculator-section__status zakatcalculator-section__status--not-eligible';\r\n } else if (totalAssets < nisabThreshold) {\r\n statusBadge.textContent = 'Zakat is not due (Nisab not reached)';\r\n statusBadge.className = 'zakatcalculator-section__status zakatcalculator-section__status--not-eligible';\r\n } else {\r\n statusBadge.textContent = 'Enter data to check eligibility';\r\n statusBadge.className = 'zakatcalculator-section__status zakatcalculator-section__status--not-eligible';\r\n }\r\n \r\n // Disable pay button\r\n payButton.disabled = true;\r\n payButton.innerHTML = ' Pay Zakat Now';\r\n }\r\n}\r\n\r\n// Format currency\r\nfunction formatCurrency(amount) {\r\n return new Intl.NumberFormat('en-US', {\r\n style: 'currency',\r\n currency: 'USD',\r\n minimumFractionDigits: 2,\r\n maximumFractionDigits: 2\r\n }).format(amount);\r\n}\r\n\r\n// Add zakat to cart\r\nfunction zakatcalculatorAddToCart() {\r\n const amountText = document.getElementById('finalZakatDisplay').textContent;\r\n const amount = parseFloat(amountText.replace(/[^0-9.-]+/g, \"\"));\r\n \r\n if (amount > 0 && !isNaN(amount)) {\r\n // Use your existing addToCart function\r\n if (typeof addToCart === 'function') {\r\n addToCart('Calculated Zakat', amount, 'Zakat');\r\n } else {\r\n // Fallback if addToCart is not defined\r\n alert(`Calculated Zakat amount: ${amountText}`);\r\n }\r\n } else {\r\n alert(\"Invalid zakat amount. Please check your inputs.\");\r\n }\r\n}\r\n\r\n// Input validation\r\nfunction validateZakatInput(input) {\r\n const value = parseFloat(input.value);\r\n const min = parseFloat(input.getAttribute('min')) || 0;\r\n \r\n if (isNaN(value) || value < min) {\r\n input.classList.add('zakatcalculator-section__input--invalid');\r\n return false;\r\n } else {\r\n input.classList.remove('zakatcalculator-section__input--invalid');\r\n input.classList.add('zakatcalculator-section__input--valid');\r\n return true;\r\n }\r\n}","animate_delay":"0"},"editing":false,"element_name":"gva_text_noeditor"}],"editing":false,"element_name":"gva_column"}],"editing":false,"element_name":"gva_row"},{"settings":{"element":"gva_row","bg_particles":"off","bg_position":"center top","bg_repeat":"no-repeat","bg_attachment":"scroll","bg_size":"cover","style_space":"remove_margin remove_padding remove_padding_col","layout":"container-fw","class":"partner","margin_top":"30","margin_bottom":"30"},"columns":[{"settings":{"element":"gva_column"},"col_lg":12,"elements":[{"settings":{"content":"\r\n \r\n Strategic Partnerships\r\n Our partners in creating hope\r\n \r\n \r\n ","animate_delay":"0"},"editing":false,"element_name":"gva_text_noeditor"},{"settings":{"title_admin":"Partners: Partners Block - en","block_drupal":"views_block__partners_block_2","hidden_title":"on","align_title":"title-align-right","remove_margin":"on","style_text":"text-dark","animate_delay":"0"},"editing":false,"element_name":"gva_drupal_block"}],"editing":false,"element_name":"gva_column"}],"editing":false,"element_name":"gva_row"}]') (Line: 47)
Drupal\gavias_content_builder\Plugin\Field\FieldFormatter\GaviasContentBuilderFormatter->viewElements(Object, 'en') (Line: 89)
Drupal\Core\Field\FormatterBase->view(Object, 'en') (Line: 263)
Drupal\Core\Entity\Entity\EntityViewDisplay->buildMultiple(Array) (Line: 351)
Drupal\Core\Entity\EntityViewBuilder->buildComponents(Array, Array, Array, 'full') (Line: 24)
Drupal\node\NodeViewBuilder->buildComponents(Array, Array, Array, 'full') (Line: 293)
Drupal\Core\Entity\EntityViewBuilder->buildMultiple(Array) (Line: 250)
Drupal\Core\Entity\EntityViewBuilder->build(Array)
call_user_func_array(Array, Array) (Line: 100)
Drupal\Core\Render\Renderer->doTrustedCallback(Array, Array, 'Render #pre_render callbacks must be methods of a class that implements \Drupal\Core\Security\TrustedCallbackInterface or be an anonymous function. The callback was %s. Support for this callback implementation is deprecated in 8.8.0 and will be removed in Drupal 9.0.0. See https://www.drupal.org/node/2966725', 'silenced_deprecation', 'Drupal\Core\Render\Element\RenderCallbackInterface') (Line: 781)
Drupal\Core\Render\Renderer->doCallback('#pre_render', Array, Array) (Line: 372)
Drupal\Core\Render\Renderer->doRender(Array, ) (Line: 200)
Drupal\Core\Render\Renderer->render(Array, ) (Line: 226)
Drupal\Core\Render\MainContent\HtmlRenderer->Drupal\Core\Render\MainContent\{closure}() (Line: 573)
Drupal\Core\Render\Renderer->executeInRenderContext(Object, Object) (Line: 227)
Drupal\Core\Render\MainContent\HtmlRenderer->prepare(Array, Object, Object) (Line: 117)
Drupal\Core\Render\MainContent\HtmlRenderer->renderResponse(Array, Object, Object) (Line: 90)
Drupal\Core\EventSubscriber\MainContentViewSubscriber->onViewRenderArray(Object, 'kernel.view', Object)
call_user_func(Array, Object, 'kernel.view', Object) (Line: 111)
Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher->dispatch('kernel.view', Object) (Line: 156)
Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object, 1) (Line: 68)
Symfony\Component\HttpKernel\HttpKernel->handle(Object, 1, 1) (Line: 57)
Drupal\Core\StackMiddleware\Session->handle(Object, 1, 1) (Line: 47)
Drupal\Core\StackMiddleware\KernelPreHandle->handle(Object, 1, 1) (Line: 191)
Drupal\page_cache\StackMiddleware\PageCache->fetch(Object, 1, 1) (Line: 128)
Drupal\page_cache\StackMiddleware\PageCache->lookup(Object, 1, 1) (Line: 82)
Drupal\page_cache\StackMiddleware\PageCache->handle(Object, 1, 1) (Line: 47)
Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle(Object, 1, 1) (Line: 52)
Drupal\Core\StackMiddleware\NegotiationMiddleware->handle(Object, 1, 1) (Line: 23)
Stack\StackedHttpKernel->handle(Object, 1, 1) (Line: 708)
Drupal\Core\DrupalKernel->handle(Object) (Line: 19)
- Deprecated function: implode(): Passing glue string after array is deprecated. Swap the parameters in element_gva_column->render_content() (line 462 of themes/gavias_kunco/gva_content_builder/gva_column.php).
element_gva_column->render_content(Array, '
Initiatives & Programs
Our Areas of Work
Ongoing Charity
Water wells, mosque construction
Student Sponsorship
Building the future through education
Humanitarian Cases
Patient treatment, surgeries
Development Projects
Empowering productive families
<a href="/en/initiatives-en" class="projects-section__card-button projects-section__card-button--development">Learn more about our programs and initiatives</a>
') (Line: 110)
gavias_content_builder_render_element('gva_column', Array, '
Initiatives & Programs
Our Areas of Work
Ongoing Charity
Water wells, mosque construction
Student Sponsorship
Building the future through education
Humanitarian Cases
Patient treatment, surgeries
Development Projects
Empowering productive families
<a href="/en/initiatives-en" class="projects-section__card-button projects-section__card-button--development">Learn more about our programs and initiatives</a>
') (Line: 58)
gavias_content_builder_render_el(Array) (Line: 22)
gavias_content_builder_frontend('[{"settings":{"bg_particles":"off","bg_position":"center top","bg_repeat":"no-repeat","bg_attachment":"scroll","bg_size":"cover","style_space":"remove_padding","layout":"container-fw"},"columns":[{"settings":{"element":"gva_column","bg_position":"center top","bg_repeat":"no-repeat","bg_attachment":"scroll","bg_size":"cover","el_class":"front"},"col_lg":12,"elements":[{"settings":{"content":"\r\n \r\n \r\n \r\n \r\n Urgent Appeal\r\n \r\n Be a helping hand for them in\r\n times of crisis\r\n \r\n \r\n At \"Wejdan Charity\", we work with full transparency to deliver your donations to those in need in conflict and poverty-stricken areas.\r\n \r\n \r\n <a>\r\n Charity Donations \r\n </a>\r\n <a>\r\n Our Projects \r\n </a>\r\n \r\n \r\n \r\n \r\n","animate_delay":"0"},"editing":false,"element_name":"gva_text_noeditor"}],"editing":false,"element_name":"gva_column"}],"editing":false,"element_name":"gva_row"},{"settings":{"element":"gva_row","bg_particles":"off","bg_position":"center top","bg_repeat":"no-repeat","bg_attachment":"scroll","bg_size":"cover","style_space":"remove_padding","layout":"container","class":"before-help-region"},"columns":[{"settings":{"element":"gva_column"},"col_lg":12,"elements":[{"settings":{"title":"Take action for animals now","link":"#","button_title":"Donation Now","button_align":"button-right-v2","style_text":"text-light","style_button":"btn-theme","donorbox":"off","target":"off","el_class":"margin","animate":"fade-up","animate_delay":"0"},"editing":false,"element_name":"gva_call_to_action"}],"editing":false,"element_name":"gva_column"}],"editing":false,"element_name":"gva_row"},{"settings":{"element":"gva_row","bg_particles":"off","bg_position":"center top","bg_repeat":"no-repeat","bg_attachment":"scroll","bg_size":"cover","style_space":"remove_padding","layout":"container-fw","bg_color":"#f9fafb"},"columns":[{"settings":{"element":"gva_column","bg_position":"center top","bg_repeat":"no-repeat","bg_attachment":"scroll","bg_size":"cover","el_class":"about"},"col_lg":12,"elements":[{"settings":{"content":"\r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n \r\n \r\n Who We Are\r\n \r\n \r\n We plant hope.. \r\n and build people and the future\r\n \r\n \r\n Wejdan Charity is a leading humanitarian organization, founded with an ambitious vision to be a bridge of الخير between donors and those in need.\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n Development Stages\r\n A continuous journey of growth\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n Areas of Work\r\n We reach where the need is\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \"We work with passion to bring smiles\"\r\n \r\n \r\n \r\n \r\n \r\n","animate_delay":"0"},"editing":false,"element_name":"gva_text_noeditor"}],"editing":false,"element_name":"gva_column"}],"editing":false,"element_name":"gva_row"},{"settings":{"element":"gva_row","bg_particles":"off","bg_position":"center top","bg_repeat":"no-repeat","bg_attachment":"scroll","bg_size":"cover","style_space":"remove_margin remove_padding remove_padding_col","layout":"container-fw","class":"partner","margin_top":"30","margin_bottom":"30"},"columns":[{"settings":{"element":"gva_column"},"col_lg":12,"elements":[{"settings":{"content":"\r\n\r\n \r\n \r\n Initiatives & Programs\r\n Our Areas of Work\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n Ongoing Charity\r\n Water wells, mosque construction\r\n \r\n \r\n \r\n \r\n \r\n \r\n Student Sponsorship\r\n Building the future through education\r\n \r\n \r\n \r\n \r\n \r\n \r\n Humanitarian Cases\r\n Patient treatment, surgeries\r\n \r\n \r\n \r\n \r\n \r\n \r\n Development Projects\r\n Empowering productive families\r\n \r\n \r\n<a>Learn more about our programs and initiatives</a>\r\n \r\n","animate_delay":"0"},"editing":false,"element_name":"gva_text_noeditor"}],"editing":false,"element_name":"gva_column"}],"editing":false,"element_name":"gva_row"},{"settings":{"element":"gva_row","bg_particles":"off","bg_position":"center top","bg_repeat":"no-repeat","bg_attachment":"scroll","bg_size":"cover","style_space":"remove_margin remove_padding remove_padding_col","layout":"container","class":"newsfront"},"columns":[{"settings":{"element":"gva_column"},"col_lg":12,"elements":[{"settings":{"content":"\r\n \r\n \r\n Our News\r\n \r\n \r\n \r\nNews that tells the story of giving \r\n \r\n","animate_delay":"0"},"editing":false,"element_name":"gva_text_noeditor"},{"settings":{"title_admin":"news: news Block -en","block_drupal":"views_block__news_block_3","hidden_title":"on","align_title":"title-align-left","remove_margin":"on","style_text":"text-dark","animate_delay":"0"},"editing":false,"element_name":"gva_drupal_block"}],"editing":false,"element_name":"gva_column"}],"editing":false,"element_name":"gva_row"},{"settings":{"bg_particles":"off","bg_position":"center top","bg_repeat":"no-repeat","bg_attachment":"scroll","bg_size":"cover","style_space":"remove_padding","layout":"container-fw","element":"gva_row","class":"sliderfrontpage"},"columns":[{"settings":{"element":"gva_column","bg_position":"center top","bg_repeat":"no-repeat","bg_attachment":"scroll","bg_size":"cover"},"col_lg":12,"elements":[{"settings":{"title_admin":"news: campigns-en","block_drupal":"views_block__news_block_5","hidden_title":"on","align_title":"title-align-right","remove_margin":"on","style_text":"text-dark","animate_delay":"0"},"editing":false,"element_name":"gva_drupal_block"}],"editing":false,"element_name":"gva_column"}],"editing":false,"element_name":"gva_row"},{"settings":{"element":"gva_row","bg_particles":"off","bg_position":"center top","bg_repeat":"no-repeat","bg_attachment":"scroll","bg_size":"cover","style_space":"remove_margin remove_padding remove_padding_col","layout":"container-fw","class":"partner"},"columns":[{"settings":{"element":"gva_column"},"col_lg":12,"elements":[{"settings":{"content":"\r\n \r\n \r\n \r\n Our Distinguished Projects\r\n \r\n \r\n \r\n At Wejdan Charity, we strive to provide support and assistance to communities in need who are affected by disasters, crises, and wars, with the aim of improving quality of life and promoting sustainable development. Our projects span across several areas:\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n Relief Projects\r\n Emergency response to disasters and wars, providing food and medicine.\r\n \r\n<a> Browse Projects </a>\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n Development Projects\r\n Empowering communities and building capacities.\r\n \r\n<a> Browse Projects </a>\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n Seasonal Projects\r\n Ramadan campaigns, Qurbani, and winter clothing.\r\n \r\n<a> Browse Projects </a>\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n Endowment Projects\r\n An investment for the hereafter—mosques, wells, and charitable endowments.\r\n<a> Browse Projects </a>\r\n \r\n \r\n \r\n \r\n","animate_delay":"0"},"editing":false,"element_name":"gva_text_noeditor"}],"editing":false,"element_name":"gva_column"}],"editing":false,"element_name":"gva_row"},{"settings":{"element":"gva_row","bg_particles":"off","bg_position":"center top","bg_repeat":"no-repeat","bg_attachment":"scroll","bg_size":"cover","style_space":"remove_margin remove_padding remove_padding_col","layout":"container-fw","class":"partner"},"columns":[{"settings":{"element":"gva_column"},"col_lg":12,"elements":[{"settings":{"content":"\r\n \r\n \r\n\r\n \r\n \r\n Our Achievements in Numbers\r\n Your trust makes the difference\r\n \r\n \r\n\r\n \r\n \r\n 0\r\n Beneficiaries worldwide\r\n \r\n \r\n \r\n 0\r\n Projects implemented\r\n \r\n \r\n \r\n 0\r\n Countries we operate in\r\n \r\n \r\n \r\n 0\r\n Volunteers\r\n \r\n \r\n \r\n \r\n\r\n\r\n// Enhanced counter animation for facts section\r\nfunction animateFactsCounters() {\r\n const statNumbers = document.querySelectorAll('.facts-section__stat-number');\r\n \r\n const observer = new IntersectionObserver((entries) => {\r\n entries.forEach(entry => {\r\n if (entry.isIntersecting) {\r\n const counter = entry.target;\r\n const target = parseInt(counter.getAttribute('data-target'));\r\n const duration = 2000;\r\n const increment = target / (duration / 16);\r\n \r\n let current = 0;\r\n const updateCounter = () => {\r\n current += increment;\r\n if (current < target) {\r\n // Format number with K for thousands\r\n let displayNum = Math.ceil(current);\r\n if (displayNum >= 1000) {\r\n counter.textContent = (displayNum / 1000).toFixed(1).replace('.0', '') + 'K';\r\n } else {\r\n counter.textContent = displayNum.toLocaleString();\r\n }\r\n requestAnimationFrame(updateCounter);\r\n } else {\r\n // Final formatting\r\n if (target >= 1000) {\r\n counter.textContent = (target / 1000).toFixed(1).replace('.0', '') + 'K';\r\n counter.classList.add('formatted');\r\n } else {\r\n counter.textContent = target.toLocaleString();\r\n }\r\n counter.classList.add('animated');\r\n setTimeout(() => counter.classList.remove('animated'), 600);\r\n }\r\n };\r\n updateCounter();\r\n observer.unobserve(counter);\r\n }\r\n });\r\n }, { threshold: 0.5, rootMargin: '0px 0px -50px 0px' });\r\n \r\n statNumbers.forEach(counter => observer.observe(counter));\r\n}\r\n\r\n// Call this function when DOM is loaded\r\ndocument.addEventListener('DOMContentLoaded', () => {\r\n animateFactsCounters();\r\n});","animate_delay":"0"},"editing":false,"element_name":"gva_text_noeditor"}],"editing":false,"element_name":"gva_column"}],"editing":false,"element_name":"gva_row"},{"settings":{"element":"gva_row","bg_particles":"off","bg_position":"center top","bg_repeat":"no-repeat","bg_attachment":"scroll","bg_size":"cover","style_space":"remove_margin remove_padding remove_padding_col","layout":"container-fw","class":"zakatcalc"},"columns":[{"settings":{"element":"gva_column"},"col_lg":12,"elements":[{"settings":{"content":"\r\n\r\n \r\n \r\n \r\n \r\nSmart Zakat Calculator\r\n A precise and comprehensive tool\r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n \r\n \r\n Money & Savings\r\n \r\n \r\n \r\n Cash (on hand or at home)\r\n \r\n \r\n $\r\n \r\n \r\n \r\n Bank balances\r\n \r\n \r\n $\r\n \r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n Gold & Silver\r\n \r\n \r\n Refresh Prices\r\n \r\n \r\n \r\n \r\n \r\n Gold weight (grams)\r\n \r\n \r\n \r\n \r\n Current gold price per gram\r\n \r\n Live\r\n \r\n \r\n \r\n \r\n $ / gram\r\n \r\n \r\n \r\n\r\n \r\n \r\n Silver weight (grams)\r\n \r\n \r\n \r\n \r\n Current silver price per gram\r\n \r\n Live\r\n \r\n \r\n \r\n \r\n $ / gram\r\n \r\n \r\n \r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n Zakat Summary\r\n \r\n \r\n Total assets:\r\n 0.00 $\r\n \r\n \r\n Net zakatable assets:\r\n 0.00 $\r\n \r\n \r\n Nisab value (85g gold):\r\n ...\r\n \r\n \r\n Enter data to check eligibility\r\n \r\n \r\n \r\n\r\n \r\n \r\n Zakat due (2.5%)\r\n 0.00 $\r\n \r\n \r\n <a>\r\n \r\n Contact via WhatsApp for consultation and donation\r\n </a>\r\n \r\n \r\n \r\n \r\n\r\n\r\n// Zakat Calculator Logic\r\nlet zakatcalculatorPricesLoaded = false;\r\n\r\n// Initialize calculator when DOM is loaded\r\ndocument.addEventListener('DOMContentLoaded', () => {\r\n zakatcalculatorFetchPrices();\r\n zakatcalculatorCalculate();\r\n \r\n // Add input event listeners for real-time calculation\r\n const inputs = document.querySelectorAll('.zakatcalculator-section__input');\r\n inputs.forEach(input => {\r\n input.addEventListener('input', zakatcalculatorCalculate);\r\n });\r\n \r\n // Format numbers as user types\r\n inputs.forEach(input => {\r\n input.addEventListener('blur', function() {\r\n if (this.value) {\r\n const value = parseFloat(this.value);\r\n if (!isNaN(value)) {\r\n this.value = value.toLocaleString('en-US', {\r\n minimumFractionDigits: 2,\r\n maximumFractionDigits: 2\r\n });\r\n }\r\n }\r\n });\r\n \r\n input.addEventListener('focus', function() {\r\n if (this.value) {\r\n this.value = this.value.replace(/[^\\d.]/g, '');\r\n }\r\n });\r\n });\r\n});\r\n\r\n// Fetch metal prices\r\nasync function zakatcalculatorFetchPrices() {\r\n const goldInput = document.getElementById('goldPrice');\r\n const silverInput = document.getElementById('silverPrice');\r\n const refreshButton = document.querySelector('.zakatcalculator-section__refresh-button');\r\n const refreshIcon = document.querySelector('.zakatcalculator-section__refresh-icon');\r\n \r\n if (!refreshButton || !refreshIcon) return;\r\n \r\n // Show loading state\r\n refreshButton.disabled = true;\r\n refreshIcon.classList.add('zakatcalculator-section__refresh-icon--spinning');\r\n goldInput.classList.add('zakatcalculator-section__input--loading');\r\n silverInput.classList.add('zakatcalculator-section__input--loading');\r\n \r\n try {\r\n // Simulate API call with delay\r\n await new Promise(resolve => setTimeout(resolve, 1500));\r\n \r\n // Mock data (in a real app, you would fetch from an API)\r\n const liveGoldPrice = 76.50;\r\n const liveSilverPrice = 0.95;\r\n \r\n // Update inputs\r\n goldInput.value = liveGoldPrice.toFixed(2);\r\n silverInput.value = liveSilverPrice.toFixed(2);\r\n \r\n // Remove loading state\r\n goldInput.classList.remove('zakatcalculator-section__input--loading');\r\n silverInput.classList.remove('zakatcalculator-section__input--loading');\r\n goldInput.classList.add('zakatcalculator-section__input--valid');\r\n silverInput.classList.add('zakatcalculator-section__input--valid');\r\n \r\n zakatcalculatorPricesLoaded = true;\r\n \r\n // Show success feedback\r\n refreshButton.innerHTML = ' Updated';\r\n refreshButton.style.backgroundColor = '#617f67';\r\n refreshButton.style.color = 'white';\r\n \r\n setTimeout(() => {\r\n refreshButton.innerHTML = ' Refresh Prices';\r\n refreshButton.style.backgroundColor = '';\r\n refreshButton.style.color = '';\r\n }, 2000);\r\n \r\n } catch (error) {\r\n console.error(\"Failed to fetch prices\", error);\r\n \r\n // Fallback values\r\n goldInput.value = 75.00;\r\n silverInput.value = 0.90;\r\n \r\n // Show error state\r\n goldInput.classList.remove('zakatcalculator-section__input--loading');\r\n silverInput.classList.remove('zakatcalculator-section__input--loading');\r\n goldInput.classList.add('zakatcalculator-section__input--invalid');\r\n silverInput.classList.add('zakatcalculator-section__input--invalid');\r\n \r\n refreshButton.innerHTML = ' Update Failed';\r\n refreshButton.style.backgroundColor = '#dc2626';\r\n refreshButton.style.color = 'white';\r\n \r\n setTimeout(() => {\r\n refreshButton.innerHTML = ' Refresh Prices';\r\n refreshButton.style.backgroundColor = '';\r\n refreshButton.style.color = '';\r\n }, 2000);\r\n \r\n } finally {\r\n refreshButton.disabled = false;\r\n refreshIcon.classList.remove('zakatcalculator-section__refresh-icon--spinning');\r\n \r\n // Recalculate zakat\r\n zakatcalculatorCalculate();\r\n }\r\n}\r\n\r\n// Calculate zakat\r\nfunction zakatcalculatorCalculate() {\r\n const cashHand = parseFloat(document.getElementById('cashHand').value) || 0;\r\n const cashBank = parseFloat(document.getElementById('cashBank').value) || 0;\r\n const goldWeight = parseFloat(document.getElementById('goldWeight').value) || 0;\r\n const goldPrice = parseFloat(document.getElementById('goldPrice').value) || 0;\r\n const silverWeight = parseFloat(document.getElementById('silverWeight').value) || 0;\r\n const silverPrice = parseFloat(document.getElementById('silverPrice').value) || 0;\r\n \r\n // Calculate totals\r\n const totalAssets = cashHand + cashBank + (goldWeight * goldPrice) + (silverWeight * silverPrice);\r\n const nisabThreshold = 85 * goldPrice;\r\n \r\n // Update display\r\n document.getElementById('totalAssetsDisplay').textContent = \r\n formatCurrency(totalAssets);\r\n \r\n document.getElementById('netAssetsDisplay').textContent = \r\n formatCurrency(totalAssets);\r\n \r\n if (goldPrice > 0) {\r\n document.getElementById('nisabValueDisplay').textContent = \r\n formatCurrency(nisabThreshold);\r\n } else {\r\n document.getElementById('nisabValueDisplay').textContent = '...';\r\n }\r\n \r\n // Update status and final zakat\r\n const statusBadge = document.getElementById('statusBadge');\r\n const finalDisplay = document.getElementById('finalZakatDisplay');\r\n const payButton = document.querySelector('.zakatcalculator-section__pay-button');\r\n \r\n if (totalAssets >= nisabThreshold && goldPrice > 0 && zakatcalculatorPricesLoaded) {\r\n const zakatAmount = totalAssets * 0.025;\r\n finalDisplay.textContent = formatCurrency(zakatAmount);\r\n \r\n // Update status badge\r\n statusBadge.textContent = '✓ Zakat is due (Nisab reached)';\r\n statusBadge.className = 'zakatcalculator-section__status zakatcalculator-section__status--eligible';\r\n \r\n // Enable pay button\r\n payButton.disabled = false;\r\n payButton.innerHTML = ' Pay Zakat Now';\r\n \r\n } else {\r\n finalDisplay.textContent = '0.00 $';\r\n \r\n // Update status badge\r\n if (!zakatcalculatorPricesLoaded) {\r\n statusBadge.textContent = 'Enter data to check eligibility';\r\n statusBadge.className = 'zakatcalculator-section__status zakatcalculator-section__status--not-eligible';\r\n } else if (totalAssets < nisabThreshold) {\r\n statusBadge.textContent = 'Zakat is not due (Nisab not reached)';\r\n statusBadge.className = 'zakatcalculator-section__status zakatcalculator-section__status--not-eligible';\r\n } else {\r\n statusBadge.textContent = 'Enter data to check eligibility';\r\n statusBadge.className = 'zakatcalculator-section__status zakatcalculator-section__status--not-eligible';\r\n }\r\n \r\n // Disable pay button\r\n payButton.disabled = true;\r\n payButton.innerHTML = ' Pay Zakat Now';\r\n }\r\n}\r\n\r\n// Format currency\r\nfunction formatCurrency(amount) {\r\n return new Intl.NumberFormat('en-US', {\r\n style: 'currency',\r\n currency: 'USD',\r\n minimumFractionDigits: 2,\r\n maximumFractionDigits: 2\r\n }).format(amount);\r\n}\r\n\r\n// Add zakat to cart\r\nfunction zakatcalculatorAddToCart() {\r\n const amountText = document.getElementById('finalZakatDisplay').textContent;\r\n const amount = parseFloat(amountText.replace(/[^0-9.-]+/g, \"\"));\r\n \r\n if (amount > 0 && !isNaN(amount)) {\r\n // Use your existing addToCart function\r\n if (typeof addToCart === 'function') {\r\n addToCart('Calculated Zakat', amount, 'Zakat');\r\n } else {\r\n // Fallback if addToCart is not defined\r\n alert(`Calculated Zakat amount: ${amountText}`);\r\n }\r\n } else {\r\n alert(\"Invalid zakat amount. Please check your inputs.\");\r\n }\r\n}\r\n\r\n// Input validation\r\nfunction validateZakatInput(input) {\r\n const value = parseFloat(input.value);\r\n const min = parseFloat(input.getAttribute('min')) || 0;\r\n \r\n if (isNaN(value) || value < min) {\r\n input.classList.add('zakatcalculator-section__input--invalid');\r\n return false;\r\n } else {\r\n input.classList.remove('zakatcalculator-section__input--invalid');\r\n input.classList.add('zakatcalculator-section__input--valid');\r\n return true;\r\n }\r\n}","animate_delay":"0"},"editing":false,"element_name":"gva_text_noeditor"}],"editing":false,"element_name":"gva_column"}],"editing":false,"element_name":"gva_row"},{"settings":{"element":"gva_row","bg_particles":"off","bg_position":"center top","bg_repeat":"no-repeat","bg_attachment":"scroll","bg_size":"cover","style_space":"remove_margin remove_padding remove_padding_col","layout":"container-fw","class":"partner","margin_top":"30","margin_bottom":"30"},"columns":[{"settings":{"element":"gva_column"},"col_lg":12,"elements":[{"settings":{"content":"\r\n \r\n Strategic Partnerships\r\n Our partners in creating hope\r\n \r\n \r\n ","animate_delay":"0"},"editing":false,"element_name":"gva_text_noeditor"},{"settings":{"title_admin":"Partners: Partners Block - en","block_drupal":"views_block__partners_block_2","hidden_title":"on","align_title":"title-align-right","remove_margin":"on","style_text":"text-dark","animate_delay":"0"},"editing":false,"element_name":"gva_drupal_block"}],"editing":false,"element_name":"gva_column"}],"editing":false,"element_name":"gva_row"}]') (Line: 47)
Drupal\gavias_content_builder\Plugin\Field\FieldFormatter\GaviasContentBuilderFormatter->viewElements(Object, 'en') (Line: 89)
Drupal\Core\Field\FormatterBase->view(Object, 'en') (Line: 263)
Drupal\Core\Entity\Entity\EntityViewDisplay->buildMultiple(Array) (Line: 351)
Drupal\Core\Entity\EntityViewBuilder->buildComponents(Array, Array, Array, 'full') (Line: 24)
Drupal\node\NodeViewBuilder->buildComponents(Array, Array, Array, 'full') (Line: 293)
Drupal\Core\Entity\EntityViewBuilder->buildMultiple(Array) (Line: 250)
Drupal\Core\Entity\EntityViewBuilder->build(Array)
call_user_func_array(Array, Array) (Line: 100)
Drupal\Core\Render\Renderer->doTrustedCallback(Array, Array, 'Render #pre_render callbacks must be methods of a class that implements \Drupal\Core\Security\TrustedCallbackInterface or be an anonymous function. The callback was %s. Support for this callback implementation is deprecated in 8.8.0 and will be removed in Drupal 9.0.0. See https://www.drupal.org/node/2966725', 'silenced_deprecation', 'Drupal\Core\Render\Element\RenderCallbackInterface') (Line: 781)
Drupal\Core\Render\Renderer->doCallback('#pre_render', Array, Array) (Line: 372)
Drupal\Core\Render\Renderer->doRender(Array, ) (Line: 200)
Drupal\Core\Render\Renderer->render(Array, ) (Line: 226)
Drupal\Core\Render\MainContent\HtmlRenderer->Drupal\Core\Render\MainContent\{closure}() (Line: 573)
Drupal\Core\Render\Renderer->executeInRenderContext(Object, Object) (Line: 227)
Drupal\Core\Render\MainContent\HtmlRenderer->prepare(Array, Object, Object) (Line: 117)
Drupal\Core\Render\MainContent\HtmlRenderer->renderResponse(Array, Object, Object) (Line: 90)
Drupal\Core\EventSubscriber\MainContentViewSubscriber->onViewRenderArray(Object, 'kernel.view', Object)
call_user_func(Array, Object, 'kernel.view', Object) (Line: 111)
Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher->dispatch('kernel.view', Object) (Line: 156)
Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object, 1) (Line: 68)
Symfony\Component\HttpKernel\HttpKernel->handle(Object, 1, 1) (Line: 57)
Drupal\Core\StackMiddleware\Session->handle(Object, 1, 1) (Line: 47)
Drupal\Core\StackMiddleware\KernelPreHandle->handle(Object, 1, 1) (Line: 191)
Drupal\page_cache\StackMiddleware\PageCache->fetch(Object, 1, 1) (Line: 128)
Drupal\page_cache\StackMiddleware\PageCache->lookup(Object, 1, 1) (Line: 82)
Drupal\page_cache\StackMiddleware\PageCache->handle(Object, 1, 1) (Line: 47)
Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle(Object, 1, 1) (Line: 52)
Drupal\Core\StackMiddleware\NegotiationMiddleware->handle(Object, 1, 1) (Line: 23)
Stack\StackedHttpKernel->handle(Object, 1, 1) (Line: 708)
Drupal\Core\DrupalKernel->handle(Object) (Line: 19)
- Deprecated function: implode(): Passing glue string after array is deprecated. Swap the parameters in element_gva_column->render_content() (line 463 of themes/gavias_kunco/gva_content_builder/gva_column.php).
element_gva_column->render_content(Array, '
Initiatives & Programs
Our Areas of Work
Ongoing Charity
Water wells, mosque construction
Student Sponsorship
Building the future through education
Humanitarian Cases
Patient treatment, surgeries
Development Projects
Empowering productive families
<a href="/en/initiatives-en" class="projects-section__card-button projects-section__card-button--development">Learn more about our programs and initiatives</a>
') (Line: 110)
gavias_content_builder_render_element('gva_column', Array, '
Initiatives & Programs
Our Areas of Work
Ongoing Charity
Water wells, mosque construction
Student Sponsorship
Building the future through education
Humanitarian Cases
Patient treatment, surgeries
Development Projects
Empowering productive families
<a href="/en/initiatives-en" class="projects-section__card-button projects-section__card-button--development">Learn more about our programs and initiatives</a>
') (Line: 58)
gavias_content_builder_render_el(Array) (Line: 22)
gavias_content_builder_frontend('[{"settings":{"bg_particles":"off","bg_position":"center top","bg_repeat":"no-repeat","bg_attachment":"scroll","bg_size":"cover","style_space":"remove_padding","layout":"container-fw"},"columns":[{"settings":{"element":"gva_column","bg_position":"center top","bg_repeat":"no-repeat","bg_attachment":"scroll","bg_size":"cover","el_class":"front"},"col_lg":12,"elements":[{"settings":{"content":"\r\n \r\n \r\n \r\n \r\n Urgent Appeal\r\n \r\n Be a helping hand for them in\r\n times of crisis\r\n \r\n \r\n At \"Wejdan Charity\", we work with full transparency to deliver your donations to those in need in conflict and poverty-stricken areas.\r\n \r\n \r\n <a>\r\n Charity Donations \r\n </a>\r\n <a>\r\n Our Projects \r\n </a>\r\n \r\n \r\n \r\n \r\n","animate_delay":"0"},"editing":false,"element_name":"gva_text_noeditor"}],"editing":false,"element_name":"gva_column"}],"editing":false,"element_name":"gva_row"},{"settings":{"element":"gva_row","bg_particles":"off","bg_position":"center top","bg_repeat":"no-repeat","bg_attachment":"scroll","bg_size":"cover","style_space":"remove_padding","layout":"container","class":"before-help-region"},"columns":[{"settings":{"element":"gva_column"},"col_lg":12,"elements":[{"settings":{"title":"Take action for animals now","link":"#","button_title":"Donation Now","button_align":"button-right-v2","style_text":"text-light","style_button":"btn-theme","donorbox":"off","target":"off","el_class":"margin","animate":"fade-up","animate_delay":"0"},"editing":false,"element_name":"gva_call_to_action"}],"editing":false,"element_name":"gva_column"}],"editing":false,"element_name":"gva_row"},{"settings":{"element":"gva_row","bg_particles":"off","bg_position":"center top","bg_repeat":"no-repeat","bg_attachment":"scroll","bg_size":"cover","style_space":"remove_padding","layout":"container-fw","bg_color":"#f9fafb"},"columns":[{"settings":{"element":"gva_column","bg_position":"center top","bg_repeat":"no-repeat","bg_attachment":"scroll","bg_size":"cover","el_class":"about"},"col_lg":12,"elements":[{"settings":{"content":"\r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n \r\n \r\n Who We Are\r\n \r\n \r\n We plant hope.. \r\n and build people and the future\r\n \r\n \r\n Wejdan Charity is a leading humanitarian organization, founded with an ambitious vision to be a bridge of الخير between donors and those in need.\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n Development Stages\r\n A continuous journey of growth\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n Areas of Work\r\n We reach where the need is\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \"We work with passion to bring smiles\"\r\n \r\n \r\n \r\n \r\n \r\n","animate_delay":"0"},"editing":false,"element_name":"gva_text_noeditor"}],"editing":false,"element_name":"gva_column"}],"editing":false,"element_name":"gva_row"},{"settings":{"element":"gva_row","bg_particles":"off","bg_position":"center top","bg_repeat":"no-repeat","bg_attachment":"scroll","bg_size":"cover","style_space":"remove_margin remove_padding remove_padding_col","layout":"container-fw","class":"partner","margin_top":"30","margin_bottom":"30"},"columns":[{"settings":{"element":"gva_column"},"col_lg":12,"elements":[{"settings":{"content":"\r\n\r\n \r\n \r\n Initiatives & Programs\r\n Our Areas of Work\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n Ongoing Charity\r\n Water wells, mosque construction\r\n \r\n \r\n \r\n \r\n \r\n \r\n Student Sponsorship\r\n Building the future through education\r\n \r\n \r\n \r\n \r\n \r\n \r\n Humanitarian Cases\r\n Patient treatment, surgeries\r\n \r\n \r\n \r\n \r\n \r\n \r\n Development Projects\r\n Empowering productive families\r\n \r\n \r\n<a>Learn more about our programs and initiatives</a>\r\n \r\n","animate_delay":"0"},"editing":false,"element_name":"gva_text_noeditor"}],"editing":false,"element_name":"gva_column"}],"editing":false,"element_name":"gva_row"},{"settings":{"element":"gva_row","bg_particles":"off","bg_position":"center top","bg_repeat":"no-repeat","bg_attachment":"scroll","bg_size":"cover","style_space":"remove_margin remove_padding remove_padding_col","layout":"container","class":"newsfront"},"columns":[{"settings":{"element":"gva_column"},"col_lg":12,"elements":[{"settings":{"content":"\r\n \r\n \r\n Our News\r\n \r\n \r\n \r\nNews that tells the story of giving \r\n \r\n","animate_delay":"0"},"editing":false,"element_name":"gva_text_noeditor"},{"settings":{"title_admin":"news: news Block -en","block_drupal":"views_block__news_block_3","hidden_title":"on","align_title":"title-align-left","remove_margin":"on","style_text":"text-dark","animate_delay":"0"},"editing":false,"element_name":"gva_drupal_block"}],"editing":false,"element_name":"gva_column"}],"editing":false,"element_name":"gva_row"},{"settings":{"bg_particles":"off","bg_position":"center top","bg_repeat":"no-repeat","bg_attachment":"scroll","bg_size":"cover","style_space":"remove_padding","layout":"container-fw","element":"gva_row","class":"sliderfrontpage"},"columns":[{"settings":{"element":"gva_column","bg_position":"center top","bg_repeat":"no-repeat","bg_attachment":"scroll","bg_size":"cover"},"col_lg":12,"elements":[{"settings":{"title_admin":"news: campigns-en","block_drupal":"views_block__news_block_5","hidden_title":"on","align_title":"title-align-right","remove_margin":"on","style_text":"text-dark","animate_delay":"0"},"editing":false,"element_name":"gva_drupal_block"}],"editing":false,"element_name":"gva_column"}],"editing":false,"element_name":"gva_row"},{"settings":{"element":"gva_row","bg_particles":"off","bg_position":"center top","bg_repeat":"no-repeat","bg_attachment":"scroll","bg_size":"cover","style_space":"remove_margin remove_padding remove_padding_col","layout":"container-fw","class":"partner"},"columns":[{"settings":{"element":"gva_column"},"col_lg":12,"elements":[{"settings":{"content":"\r\n \r\n \r\n \r\n Our Distinguished Projects\r\n \r\n \r\n \r\n At Wejdan Charity, we strive to provide support and assistance to communities in need who are affected by disasters, crises, and wars, with the aim of improving quality of life and promoting sustainable development. Our projects span across several areas:\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n Relief Projects\r\n Emergency response to disasters and wars, providing food and medicine.\r\n \r\n<a> Browse Projects </a>\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n Development Projects\r\n Empowering communities and building capacities.\r\n \r\n<a> Browse Projects </a>\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n Seasonal Projects\r\n Ramadan campaigns, Qurbani, and winter clothing.\r\n \r\n<a> Browse Projects </a>\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n Endowment Projects\r\n An investment for the hereafter—mosques, wells, and charitable endowments.\r\n<a> Browse Projects </a>\r\n \r\n \r\n \r\n \r\n","animate_delay":"0"},"editing":false,"element_name":"gva_text_noeditor"}],"editing":false,"element_name":"gva_column"}],"editing":false,"element_name":"gva_row"},{"settings":{"element":"gva_row","bg_particles":"off","bg_position":"center top","bg_repeat":"no-repeat","bg_attachment":"scroll","bg_size":"cover","style_space":"remove_margin remove_padding remove_padding_col","layout":"container-fw","class":"partner"},"columns":[{"settings":{"element":"gva_column"},"col_lg":12,"elements":[{"settings":{"content":"\r\n \r\n \r\n\r\n \r\n \r\n Our Achievements in Numbers\r\n Your trust makes the difference\r\n \r\n \r\n\r\n \r\n \r\n 0\r\n Beneficiaries worldwide\r\n \r\n \r\n \r\n 0\r\n Projects implemented\r\n \r\n \r\n \r\n 0\r\n Countries we operate in\r\n \r\n \r\n \r\n 0\r\n Volunteers\r\n \r\n \r\n \r\n \r\n\r\n\r\n// Enhanced counter animation for facts section\r\nfunction animateFactsCounters() {\r\n const statNumbers = document.querySelectorAll('.facts-section__stat-number');\r\n \r\n const observer = new IntersectionObserver((entries) => {\r\n entries.forEach(entry => {\r\n if (entry.isIntersecting) {\r\n const counter = entry.target;\r\n const target = parseInt(counter.getAttribute('data-target'));\r\n const duration = 2000;\r\n const increment = target / (duration / 16);\r\n \r\n let current = 0;\r\n const updateCounter = () => {\r\n current += increment;\r\n if (current < target) {\r\n // Format number with K for thousands\r\n let displayNum = Math.ceil(current);\r\n if (displayNum >= 1000) {\r\n counter.textContent = (displayNum / 1000).toFixed(1).replace('.0', '') + 'K';\r\n } else {\r\n counter.textContent = displayNum.toLocaleString();\r\n }\r\n requestAnimationFrame(updateCounter);\r\n } else {\r\n // Final formatting\r\n if (target >= 1000) {\r\n counter.textContent = (target / 1000).toFixed(1).replace('.0', '') + 'K';\r\n counter.classList.add('formatted');\r\n } else {\r\n counter.textContent = target.toLocaleString();\r\n }\r\n counter.classList.add('animated');\r\n setTimeout(() => counter.classList.remove('animated'), 600);\r\n }\r\n };\r\n updateCounter();\r\n observer.unobserve(counter);\r\n }\r\n });\r\n }, { threshold: 0.5, rootMargin: '0px 0px -50px 0px' });\r\n \r\n statNumbers.forEach(counter => observer.observe(counter));\r\n}\r\n\r\n// Call this function when DOM is loaded\r\ndocument.addEventListener('DOMContentLoaded', () => {\r\n animateFactsCounters();\r\n});","animate_delay":"0"},"editing":false,"element_name":"gva_text_noeditor"}],"editing":false,"element_name":"gva_column"}],"editing":false,"element_name":"gva_row"},{"settings":{"element":"gva_row","bg_particles":"off","bg_position":"center top","bg_repeat":"no-repeat","bg_attachment":"scroll","bg_size":"cover","style_space":"remove_margin remove_padding remove_padding_col","layout":"container-fw","class":"zakatcalc"},"columns":[{"settings":{"element":"gva_column"},"col_lg":12,"elements":[{"settings":{"content":"\r\n\r\n \r\n \r\n \r\n \r\nSmart Zakat Calculator\r\n A precise and comprehensive tool\r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n \r\n \r\n Money & Savings\r\n \r\n \r\n \r\n Cash (on hand or at home)\r\n \r\n \r\n $\r\n \r\n \r\n \r\n Bank balances\r\n \r\n \r\n $\r\n \r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n Gold & Silver\r\n \r\n \r\n Refresh Prices\r\n \r\n \r\n \r\n \r\n \r\n Gold weight (grams)\r\n \r\n \r\n \r\n \r\n Current gold price per gram\r\n \r\n Live\r\n \r\n \r\n \r\n \r\n $ / gram\r\n \r\n \r\n \r\n\r\n \r\n \r\n Silver weight (grams)\r\n \r\n \r\n \r\n \r\n Current silver price per gram\r\n \r\n Live\r\n \r\n \r\n \r\n \r\n $ / gram\r\n \r\n \r\n \r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n Zakat Summary\r\n \r\n \r\n Total assets:\r\n 0.00 $\r\n \r\n \r\n Net zakatable assets:\r\n 0.00 $\r\n \r\n \r\n Nisab value (85g gold):\r\n ...\r\n \r\n \r\n Enter data to check eligibility\r\n \r\n \r\n \r\n\r\n \r\n \r\n Zakat due (2.5%)\r\n 0.00 $\r\n \r\n \r\n <a>\r\n \r\n Contact via WhatsApp for consultation and donation\r\n </a>\r\n \r\n \r\n \r\n \r\n\r\n\r\n// Zakat Calculator Logic\r\nlet zakatcalculatorPricesLoaded = false;\r\n\r\n// Initialize calculator when DOM is loaded\r\ndocument.addEventListener('DOMContentLoaded', () => {\r\n zakatcalculatorFetchPrices();\r\n zakatcalculatorCalculate();\r\n \r\n // Add input event listeners for real-time calculation\r\n const inputs = document.querySelectorAll('.zakatcalculator-section__input');\r\n inputs.forEach(input => {\r\n input.addEventListener('input', zakatcalculatorCalculate);\r\n });\r\n \r\n // Format numbers as user types\r\n inputs.forEach(input => {\r\n input.addEventListener('blur', function() {\r\n if (this.value) {\r\n const value = parseFloat(this.value);\r\n if (!isNaN(value)) {\r\n this.value = value.toLocaleString('en-US', {\r\n minimumFractionDigits: 2,\r\n maximumFractionDigits: 2\r\n });\r\n }\r\n }\r\n });\r\n \r\n input.addEventListener('focus', function() {\r\n if (this.value) {\r\n this.value = this.value.replace(/[^\\d.]/g, '');\r\n }\r\n });\r\n });\r\n});\r\n\r\n// Fetch metal prices\r\nasync function zakatcalculatorFetchPrices() {\r\n const goldInput = document.getElementById('goldPrice');\r\n const silverInput = document.getElementById('silverPrice');\r\n const refreshButton = document.querySelector('.zakatcalculator-section__refresh-button');\r\n const refreshIcon = document.querySelector('.zakatcalculator-section__refresh-icon');\r\n \r\n if (!refreshButton || !refreshIcon) return;\r\n \r\n // Show loading state\r\n refreshButton.disabled = true;\r\n refreshIcon.classList.add('zakatcalculator-section__refresh-icon--spinning');\r\n goldInput.classList.add('zakatcalculator-section__input--loading');\r\n silverInput.classList.add('zakatcalculator-section__input--loading');\r\n \r\n try {\r\n // Simulate API call with delay\r\n await new Promise(resolve => setTimeout(resolve, 1500));\r\n \r\n // Mock data (in a real app, you would fetch from an API)\r\n const liveGoldPrice = 76.50;\r\n const liveSilverPrice = 0.95;\r\n \r\n // Update inputs\r\n goldInput.value = liveGoldPrice.toFixed(2);\r\n silverInput.value = liveSilverPrice.toFixed(2);\r\n \r\n // Remove loading state\r\n goldInput.classList.remove('zakatcalculator-section__input--loading');\r\n silverInput.classList.remove('zakatcalculator-section__input--loading');\r\n goldInput.classList.add('zakatcalculator-section__input--valid');\r\n silverInput.classList.add('zakatcalculator-section__input--valid');\r\n \r\n zakatcalculatorPricesLoaded = true;\r\n \r\n // Show success feedback\r\n refreshButton.innerHTML = ' Updated';\r\n refreshButton.style.backgroundColor = '#617f67';\r\n refreshButton.style.color = 'white';\r\n \r\n setTimeout(() => {\r\n refreshButton.innerHTML = ' Refresh Prices';\r\n refreshButton.style.backgroundColor = '';\r\n refreshButton.style.color = '';\r\n }, 2000);\r\n \r\n } catch (error) {\r\n console.error(\"Failed to fetch prices\", error);\r\n \r\n // Fallback values\r\n goldInput.value = 75.00;\r\n silverInput.value = 0.90;\r\n \r\n // Show error state\r\n goldInput.classList.remove('zakatcalculator-section__input--loading');\r\n silverInput.classList.remove('zakatcalculator-section__input--loading');\r\n goldInput.classList.add('zakatcalculator-section__input--invalid');\r\n silverInput.classList.add('zakatcalculator-section__input--invalid');\r\n \r\n refreshButton.innerHTML = ' Update Failed';\r\n refreshButton.style.backgroundColor = '#dc2626';\r\n refreshButton.style.color = 'white';\r\n \r\n setTimeout(() => {\r\n refreshButton.innerHTML = ' Refresh Prices';\r\n refreshButton.style.backgroundColor = '';\r\n refreshButton.style.color = '';\r\n }, 2000);\r\n \r\n } finally {\r\n refreshButton.disabled = false;\r\n refreshIcon.classList.remove('zakatcalculator-section__refresh-icon--spinning');\r\n \r\n // Recalculate zakat\r\n zakatcalculatorCalculate();\r\n }\r\n}\r\n\r\n// Calculate zakat\r\nfunction zakatcalculatorCalculate() {\r\n const cashHand = parseFloat(document.getElementById('cashHand').value) || 0;\r\n const cashBank = parseFloat(document.getElementById('cashBank').value) || 0;\r\n const goldWeight = parseFloat(document.getElementById('goldWeight').value) || 0;\r\n const goldPrice = parseFloat(document.getElementById('goldPrice').value) || 0;\r\n const silverWeight = parseFloat(document.getElementById('silverWeight').value) || 0;\r\n const silverPrice = parseFloat(document.getElementById('silverPrice').value) || 0;\r\n \r\n // Calculate totals\r\n const totalAssets = cashHand + cashBank + (goldWeight * goldPrice) + (silverWeight * silverPrice);\r\n const nisabThreshold = 85 * goldPrice;\r\n \r\n // Update display\r\n document.getElementById('totalAssetsDisplay').textContent = \r\n formatCurrency(totalAssets);\r\n \r\n document.getElementById('netAssetsDisplay').textContent = \r\n formatCurrency(totalAssets);\r\n \r\n if (goldPrice > 0) {\r\n document.getElementById('nisabValueDisplay').textContent = \r\n formatCurrency(nisabThreshold);\r\n } else {\r\n document.getElementById('nisabValueDisplay').textContent = '...';\r\n }\r\n \r\n // Update status and final zakat\r\n const statusBadge = document.getElementById('statusBadge');\r\n const finalDisplay = document.getElementById('finalZakatDisplay');\r\n const payButton = document.querySelector('.zakatcalculator-section__pay-button');\r\n \r\n if (totalAssets >= nisabThreshold && goldPrice > 0 && zakatcalculatorPricesLoaded) {\r\n const zakatAmount = totalAssets * 0.025;\r\n finalDisplay.textContent = formatCurrency(zakatAmount);\r\n \r\n // Update status badge\r\n statusBadge.textContent = '✓ Zakat is due (Nisab reached)';\r\n statusBadge.className = 'zakatcalculator-section__status zakatcalculator-section__status--eligible';\r\n \r\n // Enable pay button\r\n payButton.disabled = false;\r\n payButton.innerHTML = ' Pay Zakat Now';\r\n \r\n } else {\r\n finalDisplay.textContent = '0.00 $';\r\n \r\n // Update status badge\r\n if (!zakatcalculatorPricesLoaded) {\r\n statusBadge.textContent = 'Enter data to check eligibility';\r\n statusBadge.className = 'zakatcalculator-section__status zakatcalculator-section__status--not-eligible';\r\n } else if (totalAssets < nisabThreshold) {\r\n statusBadge.textContent = 'Zakat is not due (Nisab not reached)';\r\n statusBadge.className = 'zakatcalculator-section__status zakatcalculator-section__status--not-eligible';\r\n } else {\r\n statusBadge.textContent = 'Enter data to check eligibility';\r\n statusBadge.className = 'zakatcalculator-section__status zakatcalculator-section__status--not-eligible';\r\n }\r\n \r\n // Disable pay button\r\n payButton.disabled = true;\r\n payButton.innerHTML = ' Pay Zakat Now';\r\n }\r\n}\r\n\r\n// Format currency\r\nfunction formatCurrency(amount) {\r\n return new Intl.NumberFormat('en-US', {\r\n style: 'currency',\r\n currency: 'USD',\r\n minimumFractionDigits: 2,\r\n maximumFractionDigits: 2\r\n }).format(amount);\r\n}\r\n\r\n// Add zakat to cart\r\nfunction zakatcalculatorAddToCart() {\r\n const amountText = document.getElementById('finalZakatDisplay').textContent;\r\n const amount = parseFloat(amountText.replace(/[^0-9.-]+/g, \"\"));\r\n \r\n if (amount > 0 && !isNaN(amount)) {\r\n // Use your existing addToCart function\r\n if (typeof addToCart === 'function') {\r\n addToCart('Calculated Zakat', amount, 'Zakat');\r\n } else {\r\n // Fallback if addToCart is not defined\r\n alert(`Calculated Zakat amount: ${amountText}`);\r\n }\r\n } else {\r\n alert(\"Invalid zakat amount. Please check your inputs.\");\r\n }\r\n}\r\n\r\n// Input validation\r\nfunction validateZakatInput(input) {\r\n const value = parseFloat(input.value);\r\n const min = parseFloat(input.getAttribute('min')) || 0;\r\n \r\n if (isNaN(value) || value < min) {\r\n input.classList.add('zakatcalculator-section__input--invalid');\r\n return false;\r\n } else {\r\n input.classList.remove('zakatcalculator-section__input--invalid');\r\n input.classList.add('zakatcalculator-section__input--valid');\r\n return true;\r\n }\r\n}","animate_delay":"0"},"editing":false,"element_name":"gva_text_noeditor"}],"editing":false,"element_name":"gva_column"}],"editing":false,"element_name":"gva_row"},{"settings":{"element":"gva_row","bg_particles":"off","bg_position":"center top","bg_repeat":"no-repeat","bg_attachment":"scroll","bg_size":"cover","style_space":"remove_margin remove_padding remove_padding_col","layout":"container-fw","class":"partner","margin_top":"30","margin_bottom":"30"},"columns":[{"settings":{"element":"gva_column"},"col_lg":12,"elements":[{"settings":{"content":"\r\n \r\n Strategic Partnerships\r\n Our partners in creating hope\r\n \r\n \r\n ","animate_delay":"0"},"editing":false,"element_name":"gva_text_noeditor"},{"settings":{"title_admin":"Partners: Partners Block - en","block_drupal":"views_block__partners_block_2","hidden_title":"on","align_title":"title-align-right","remove_margin":"on","style_text":"text-dark","animate_delay":"0"},"editing":false,"element_name":"gva_drupal_block"}],"editing":false,"element_name":"gva_column"}],"editing":false,"element_name":"gva_row"}]') (Line: 47)
Drupal\gavias_content_builder\Plugin\Field\FieldFormatter\GaviasContentBuilderFormatter->viewElements(Object, 'en') (Line: 89)
Drupal\Core\Field\FormatterBase->view(Object, 'en') (Line: 263)
Drupal\Core\Entity\Entity\EntityViewDisplay->buildMultiple(Array) (Line: 351)
Drupal\Core\Entity\EntityViewBuilder->buildComponents(Array, Array, Array, 'full') (Line: 24)
Drupal\node\NodeViewBuilder->buildComponents(Array, Array, Array, 'full') (Line: 293)
Drupal\Core\Entity\EntityViewBuilder->buildMultiple(Array) (Line: 250)
Drupal\Core\Entity\EntityViewBuilder->build(Array)
call_user_func_array(Array, Array) (Line: 100)
Drupal\Core\Render\Renderer->doTrustedCallback(Array, Array, 'Render #pre_render callbacks must be methods of a class that implements \Drupal\Core\Security\TrustedCallbackInterface or be an anonymous function. The callback was %s. Support for this callback implementation is deprecated in 8.8.0 and will be removed in Drupal 9.0.0. See https://www.drupal.org/node/2966725', 'silenced_deprecation', 'Drupal\Core\Render\Element\RenderCallbackInterface') (Line: 781)
Drupal\Core\Render\Renderer->doCallback('#pre_render', Array, Array) (Line: 372)
Drupal\Core\Render\Renderer->doRender(Array, ) (Line: 200)
Drupal\Core\Render\Renderer->render(Array, ) (Line: 226)
Drupal\Core\Render\MainContent\HtmlRenderer->Drupal\Core\Render\MainContent\{closure}() (Line: 573)
Drupal\Core\Render\Renderer->executeInRenderContext(Object, Object) (Line: 227)
Drupal\Core\Render\MainContent\HtmlRenderer->prepare(Array, Object, Object) (Line: 117)
Drupal\Core\Render\MainContent\HtmlRenderer->renderResponse(Array, Object, Object) (Line: 90)
Drupal\Core\EventSubscriber\MainContentViewSubscriber->onViewRenderArray(Object, 'kernel.view', Object)
call_user_func(Array, Object, 'kernel.view', Object) (Line: 111)
Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher->dispatch('kernel.view', Object) (Line: 156)
Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object, 1) (Line: 68)
Symfony\Component\HttpKernel\HttpKernel->handle(Object, 1, 1) (Line: 57)
Drupal\Core\StackMiddleware\Session->handle(Object, 1, 1) (Line: 47)
Drupal\Core\StackMiddleware\KernelPreHandle->handle(Object, 1, 1) (Line: 191)
Drupal\page_cache\StackMiddleware\PageCache->fetch(Object, 1, 1) (Line: 128)
Drupal\page_cache\StackMiddleware\PageCache->lookup(Object, 1, 1) (Line: 82)
Drupal\page_cache\StackMiddleware\PageCache->handle(Object, 1, 1) (Line: 47)
Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle(Object, 1, 1) (Line: 52)
Drupal\Core\StackMiddleware\NegotiationMiddleware->handle(Object, 1, 1) (Line: 23)
Stack\StackedHttpKernel->handle(Object, 1, 1) (Line: 708)
Drupal\Core\DrupalKernel->handle(Object) (Line: 19)
- Deprecated function: implode(): Passing glue string after array is deprecated. Swap the parameters in element_gva_row->render_content() (line 317 of themes/gavias_kunco/gva_content_builder/gva_row.php).
element_gva_row->render_content(Array, '
Initiatives & Programs
Our Areas of Work
Ongoing Charity
Water wells, mosque construction
Student Sponsorship
Building the future through education
Humanitarian Cases
Patient treatment, surgeries
Development Projects
Empowering productive families
<a href="/en/initiatives-en" class="projects-section__card-button projects-section__card-button--development">Learn more about our programs and initiatives</a>
') (Line: 110)
gavias_content_builder_render_element('gva_row', Array, '
Initiatives & Programs
Our Areas of Work
Ongoing Charity
Water wells, mosque construction
Student Sponsorship
Building the future through education
Humanitarian Cases
Patient treatment, surgeries
Development Projects
Empowering productive families
<a href="/en/initiatives-en" class="projects-section__card-button projects-section__card-button--development">Learn more about our programs and initiatives</a>
') (Line: 62)
gavias_content_builder_render_el(Array) (Line: 22)
gavias_content_builder_frontend('[{"settings":{"bg_particles":"off","bg_position":"center top","bg_repeat":"no-repeat","bg_attachment":"scroll","bg_size":"cover","style_space":"remove_padding","layout":"container-fw"},"columns":[{"settings":{"element":"gva_column","bg_position":"center top","bg_repeat":"no-repeat","bg_attachment":"scroll","bg_size":"cover","el_class":"front"},"col_lg":12,"elements":[{"settings":{"content":"\r\n \r\n \r\n \r\n \r\n Urgent Appeal\r\n \r\n Be a helping hand for them in\r\n times of crisis\r\n \r\n \r\n At \"Wejdan Charity\", we work with full transparency to deliver your donations to those in need in conflict and poverty-stricken areas.\r\n \r\n \r\n <a>\r\n Charity Donations \r\n </a>\r\n <a>\r\n Our Projects \r\n </a>\r\n \r\n \r\n \r\n \r\n","animate_delay":"0"},"editing":false,"element_name":"gva_text_noeditor"}],"editing":false,"element_name":"gva_column"}],"editing":false,"element_name":"gva_row"},{"settings":{"element":"gva_row","bg_particles":"off","bg_position":"center top","bg_repeat":"no-repeat","bg_attachment":"scroll","bg_size":"cover","style_space":"remove_padding","layout":"container","class":"before-help-region"},"columns":[{"settings":{"element":"gva_column"},"col_lg":12,"elements":[{"settings":{"title":"Take action for animals now","link":"#","button_title":"Donation Now","button_align":"button-right-v2","style_text":"text-light","style_button":"btn-theme","donorbox":"off","target":"off","el_class":"margin","animate":"fade-up","animate_delay":"0"},"editing":false,"element_name":"gva_call_to_action"}],"editing":false,"element_name":"gva_column"}],"editing":false,"element_name":"gva_row"},{"settings":{"element":"gva_row","bg_particles":"off","bg_position":"center top","bg_repeat":"no-repeat","bg_attachment":"scroll","bg_size":"cover","style_space":"remove_padding","layout":"container-fw","bg_color":"#f9fafb"},"columns":[{"settings":{"element":"gva_column","bg_position":"center top","bg_repeat":"no-repeat","bg_attachment":"scroll","bg_size":"cover","el_class":"about"},"col_lg":12,"elements":[{"settings":{"content":"\r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n \r\n \r\n Who We Are\r\n \r\n \r\n We plant hope.. \r\n and build people and the future\r\n \r\n \r\n Wejdan Charity is a leading humanitarian organization, founded with an ambitious vision to be a bridge of الخير between donors and those in need.\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n Development Stages\r\n A continuous journey of growth\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n Areas of Work\r\n We reach where the need is\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \"We work with passion to bring smiles\"\r\n \r\n \r\n \r\n \r\n \r\n","animate_delay":"0"},"editing":false,"element_name":"gva_text_noeditor"}],"editing":false,"element_name":"gva_column"}],"editing":false,"element_name":"gva_row"},{"settings":{"element":"gva_row","bg_particles":"off","bg_position":"center top","bg_repeat":"no-repeat","bg_attachment":"scroll","bg_size":"cover","style_space":"remove_margin remove_padding remove_padding_col","layout":"container-fw","class":"partner","margin_top":"30","margin_bottom":"30"},"columns":[{"settings":{"element":"gva_column"},"col_lg":12,"elements":[{"settings":{"content":"\r\n\r\n \r\n \r\n Initiatives & Programs\r\n Our Areas of Work\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n Ongoing Charity\r\n Water wells, mosque construction\r\n \r\n \r\n \r\n \r\n \r\n \r\n Student Sponsorship\r\n Building the future through education\r\n \r\n \r\n \r\n \r\n \r\n \r\n Humanitarian Cases\r\n Patient treatment, surgeries\r\n \r\n \r\n \r\n \r\n \r\n \r\n Development Projects\r\n Empowering productive families\r\n \r\n \r\n<a>Learn more about our programs and initiatives</a>\r\n \r\n","animate_delay":"0"},"editing":false,"element_name":"gva_text_noeditor"}],"editing":false,"element_name":"gva_column"}],"editing":false,"element_name":"gva_row"},{"settings":{"element":"gva_row","bg_particles":"off","bg_position":"center top","bg_repeat":"no-repeat","bg_attachment":"scroll","bg_size":"cover","style_space":"remove_margin remove_padding remove_padding_col","layout":"container","class":"newsfront"},"columns":[{"settings":{"element":"gva_column"},"col_lg":12,"elements":[{"settings":{"content":"\r\n \r\n \r\n Our News\r\n \r\n \r\n \r\nNews that tells the story of giving \r\n \r\n","animate_delay":"0"},"editing":false,"element_name":"gva_text_noeditor"},{"settings":{"title_admin":"news: news Block -en","block_drupal":"views_block__news_block_3","hidden_title":"on","align_title":"title-align-left","remove_margin":"on","style_text":"text-dark","animate_delay":"0"},"editing":false,"element_name":"gva_drupal_block"}],"editing":false,"element_name":"gva_column"}],"editing":false,"element_name":"gva_row"},{"settings":{"bg_particles":"off","bg_position":"center top","bg_repeat":"no-repeat","bg_attachment":"scroll","bg_size":"cover","style_space":"remove_padding","layout":"container-fw","element":"gva_row","class":"sliderfrontpage"},"columns":[{"settings":{"element":"gva_column","bg_position":"center top","bg_repeat":"no-repeat","bg_attachment":"scroll","bg_size":"cover"},"col_lg":12,"elements":[{"settings":{"title_admin":"news: campigns-en","block_drupal":"views_block__news_block_5","hidden_title":"on","align_title":"title-align-right","remove_margin":"on","style_text":"text-dark","animate_delay":"0"},"editing":false,"element_name":"gva_drupal_block"}],"editing":false,"element_name":"gva_column"}],"editing":false,"element_name":"gva_row"},{"settings":{"element":"gva_row","bg_particles":"off","bg_position":"center top","bg_repeat":"no-repeat","bg_attachment":"scroll","bg_size":"cover","style_space":"remove_margin remove_padding remove_padding_col","layout":"container-fw","class":"partner"},"columns":[{"settings":{"element":"gva_column"},"col_lg":12,"elements":[{"settings":{"content":"\r\n \r\n \r\n \r\n Our Distinguished Projects\r\n \r\n \r\n \r\n At Wejdan Charity, we strive to provide support and assistance to communities in need who are affected by disasters, crises, and wars, with the aim of improving quality of life and promoting sustainable development. Our projects span across several areas:\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n Relief Projects\r\n Emergency response to disasters and wars, providing food and medicine.\r\n \r\n<a> Browse Projects </a>\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n Development Projects\r\n Empowering communities and building capacities.\r\n \r\n<a> Browse Projects </a>\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n Seasonal Projects\r\n Ramadan campaigns, Qurbani, and winter clothing.\r\n \r\n<a> Browse Projects </a>\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n Endowment Projects\r\n An investment for the hereafter—mosques, wells, and charitable endowments.\r\n<a> Browse Projects </a>\r\n \r\n \r\n \r\n \r\n","animate_delay":"0"},"editing":false,"element_name":"gva_text_noeditor"}],"editing":false,"element_name":"gva_column"}],"editing":false,"element_name":"gva_row"},{"settings":{"element":"gva_row","bg_particles":"off","bg_position":"center top","bg_repeat":"no-repeat","bg_attachment":"scroll","bg_size":"cover","style_space":"remove_margin remove_padding remove_padding_col","layout":"container-fw","class":"partner"},"columns":[{"settings":{"element":"gva_column"},"col_lg":12,"elements":[{"settings":{"content":"\r\n \r\n \r\n\r\n \r\n \r\n Our Achievements in Numbers\r\n Your trust makes the difference\r\n \r\n \r\n\r\n \r\n \r\n 0\r\n Beneficiaries worldwide\r\n \r\n \r\n \r\n 0\r\n Projects implemented\r\n \r\n \r\n \r\n 0\r\n Countries we operate in\r\n \r\n \r\n \r\n 0\r\n Volunteers\r\n \r\n \r\n \r\n \r\n\r\n\r\n// Enhanced counter animation for facts section\r\nfunction animateFactsCounters() {\r\n const statNumbers = document.querySelectorAll('.facts-section__stat-number');\r\n \r\n const observer = new IntersectionObserver((entries) => {\r\n entries.forEach(entry => {\r\n if (entry.isIntersecting) {\r\n const counter = entry.target;\r\n const target = parseInt(counter.getAttribute('data-target'));\r\n const duration = 2000;\r\n const increment = target / (duration / 16);\r\n \r\n let current = 0;\r\n const updateCounter = () => {\r\n current += increment;\r\n if (current < target) {\r\n // Format number with K for thousands\r\n let displayNum = Math.ceil(current);\r\n if (displayNum >= 1000) {\r\n counter.textContent = (displayNum / 1000).toFixed(1).replace('.0', '') + 'K';\r\n } else {\r\n counter.textContent = displayNum.toLocaleString();\r\n }\r\n requestAnimationFrame(updateCounter);\r\n } else {\r\n // Final formatting\r\n if (target >= 1000) {\r\n counter.textContent = (target / 1000).toFixed(1).replace('.0', '') + 'K';\r\n counter.classList.add('formatted');\r\n } else {\r\n counter.textContent = target.toLocaleString();\r\n }\r\n counter.classList.add('animated');\r\n setTimeout(() => counter.classList.remove('animated'), 600);\r\n }\r\n };\r\n updateCounter();\r\n observer.unobserve(counter);\r\n }\r\n });\r\n }, { threshold: 0.5, rootMargin: '0px 0px -50px 0px' });\r\n \r\n statNumbers.forEach(counter => observer.observe(counter));\r\n}\r\n\r\n// Call this function when DOM is loaded\r\ndocument.addEventListener('DOMContentLoaded', () => {\r\n animateFactsCounters();\r\n});","animate_delay":"0"},"editing":false,"element_name":"gva_text_noeditor"}],"editing":false,"element_name":"gva_column"}],"editing":false,"element_name":"gva_row"},{"settings":{"element":"gva_row","bg_particles":"off","bg_position":"center top","bg_repeat":"no-repeat","bg_attachment":"scroll","bg_size":"cover","style_space":"remove_margin remove_padding remove_padding_col","layout":"container-fw","class":"zakatcalc"},"columns":[{"settings":{"element":"gva_column"},"col_lg":12,"elements":[{"settings":{"content":"\r\n\r\n \r\n \r\n \r\n \r\nSmart Zakat Calculator\r\n A precise and comprehensive tool\r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n \r\n \r\n Money & Savings\r\n \r\n \r\n \r\n Cash (on hand or at home)\r\n \r\n \r\n $\r\n \r\n \r\n \r\n Bank balances\r\n \r\n \r\n $\r\n \r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n Gold & Silver\r\n \r\n \r\n Refresh Prices\r\n \r\n \r\n \r\n \r\n \r\n Gold weight (grams)\r\n \r\n \r\n \r\n \r\n Current gold price per gram\r\n \r\n Live\r\n \r\n \r\n \r\n \r\n $ / gram\r\n \r\n \r\n \r\n\r\n \r\n \r\n Silver weight (grams)\r\n \r\n \r\n \r\n \r\n Current silver price per gram\r\n \r\n Live\r\n \r\n \r\n \r\n \r\n $ / gram\r\n \r\n \r\n \r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n Zakat Summary\r\n \r\n \r\n Total assets:\r\n 0.00 $\r\n \r\n \r\n Net zakatable assets:\r\n 0.00 $\r\n \r\n \r\n Nisab value (85g gold):\r\n ...\r\n \r\n \r\n Enter data to check eligibility\r\n \r\n \r\n \r\n\r\n \r\n \r\n Zakat due (2.5%)\r\n 0.00 $\r\n \r\n \r\n <a>\r\n \r\n Contact via WhatsApp for consultation and donation\r\n </a>\r\n \r\n \r\n \r\n \r\n\r\n\r\n// Zakat Calculator Logic\r\nlet zakatcalculatorPricesLoaded = false;\r\n\r\n// Initialize calculator when DOM is loaded\r\ndocument.addEventListener('DOMContentLoaded', () => {\r\n zakatcalculatorFetchPrices();\r\n zakatcalculatorCalculate();\r\n \r\n // Add input event listeners for real-time calculation\r\n const inputs = document.querySelectorAll('.zakatcalculator-section__input');\r\n inputs.forEach(input => {\r\n input.addEventListener('input', zakatcalculatorCalculate);\r\n });\r\n \r\n // Format numbers as user types\r\n inputs.forEach(input => {\r\n input.addEventListener('blur', function() {\r\n if (this.value) {\r\n const value = parseFloat(this.value);\r\n if (!isNaN(value)) {\r\n this.value = value.toLocaleString('en-US', {\r\n minimumFractionDigits: 2,\r\n maximumFractionDigits: 2\r\n });\r\n }\r\n }\r\n });\r\n \r\n input.addEventListener('focus', function() {\r\n if (this.value) {\r\n this.value = this.value.replace(/[^\\d.]/g, '');\r\n }\r\n });\r\n });\r\n});\r\n\r\n// Fetch metal prices\r\nasync function zakatcalculatorFetchPrices() {\r\n const goldInput = document.getElementById('goldPrice');\r\n const silverInput = document.getElementById('silverPrice');\r\n const refreshButton = document.querySelector('.zakatcalculator-section__refresh-button');\r\n const refreshIcon = document.querySelector('.zakatcalculator-section__refresh-icon');\r\n \r\n if (!refreshButton || !refreshIcon) return;\r\n \r\n // Show loading state\r\n refreshButton.disabled = true;\r\n refreshIcon.classList.add('zakatcalculator-section__refresh-icon--spinning');\r\n goldInput.classList.add('zakatcalculator-section__input--loading');\r\n silverInput.classList.add('zakatcalculator-section__input--loading');\r\n \r\n try {\r\n // Simulate API call with delay\r\n await new Promise(resolve => setTimeout(resolve, 1500));\r\n \r\n // Mock data (in a real app, you would fetch from an API)\r\n const liveGoldPrice = 76.50;\r\n const liveSilverPrice = 0.95;\r\n \r\n // Update inputs\r\n goldInput.value = liveGoldPrice.toFixed(2);\r\n silverInput.value = liveSilverPrice.toFixed(2);\r\n \r\n // Remove loading state\r\n goldInput.classList.remove('zakatcalculator-section__input--loading');\r\n silverInput.classList.remove('zakatcalculator-section__input--loading');\r\n goldInput.classList.add('zakatcalculator-section__input--valid');\r\n silverInput.classList.add('zakatcalculator-section__input--valid');\r\n \r\n zakatcalculatorPricesLoaded = true;\r\n \r\n // Show success feedback\r\n refreshButton.innerHTML = ' Updated';\r\n refreshButton.style.backgroundColor = '#617f67';\r\n refreshButton.style.color = 'white';\r\n \r\n setTimeout(() => {\r\n refreshButton.innerHTML = ' Refresh Prices';\r\n refreshButton.style.backgroundColor = '';\r\n refreshButton.style.color = '';\r\n }, 2000);\r\n \r\n } catch (error) {\r\n console.error(\"Failed to fetch prices\", error);\r\n \r\n // Fallback values\r\n goldInput.value = 75.00;\r\n silverInput.value = 0.90;\r\n \r\n // Show error state\r\n goldInput.classList.remove('zakatcalculator-section__input--loading');\r\n silverInput.classList.remove('zakatcalculator-section__input--loading');\r\n goldInput.classList.add('zakatcalculator-section__input--invalid');\r\n silverInput.classList.add('zakatcalculator-section__input--invalid');\r\n \r\n refreshButton.innerHTML = ' Update Failed';\r\n refreshButton.style.backgroundColor = '#dc2626';\r\n refreshButton.style.color = 'white';\r\n \r\n setTimeout(() => {\r\n refreshButton.innerHTML = ' Refresh Prices';\r\n refreshButton.style.backgroundColor = '';\r\n refreshButton.style.color = '';\r\n }, 2000);\r\n \r\n } finally {\r\n refreshButton.disabled = false;\r\n refreshIcon.classList.remove('zakatcalculator-section__refresh-icon--spinning');\r\n \r\n // Recalculate zakat\r\n zakatcalculatorCalculate();\r\n }\r\n}\r\n\r\n// Calculate zakat\r\nfunction zakatcalculatorCalculate() {\r\n const cashHand = parseFloat(document.getElementById('cashHand').value) || 0;\r\n const cashBank = parseFloat(document.getElementById('cashBank').value) || 0;\r\n const goldWeight = parseFloat(document.getElementById('goldWeight').value) || 0;\r\n const goldPrice = parseFloat(document.getElementById('goldPrice').value) || 0;\r\n const silverWeight = parseFloat(document.getElementById('silverWeight').value) || 0;\r\n const silverPrice = parseFloat(document.getElementById('silverPrice').value) || 0;\r\n \r\n // Calculate totals\r\n const totalAssets = cashHand + cashBank + (goldWeight * goldPrice) + (silverWeight * silverPrice);\r\n const nisabThreshold = 85 * goldPrice;\r\n \r\n // Update display\r\n document.getElementById('totalAssetsDisplay').textContent = \r\n formatCurrency(totalAssets);\r\n \r\n document.getElementById('netAssetsDisplay').textContent = \r\n formatCurrency(totalAssets);\r\n \r\n if (goldPrice > 0) {\r\n document.getElementById('nisabValueDisplay').textContent = \r\n formatCurrency(nisabThreshold);\r\n } else {\r\n document.getElementById('nisabValueDisplay').textContent = '...';\r\n }\r\n \r\n // Update status and final zakat\r\n const statusBadge = document.getElementById('statusBadge');\r\n const finalDisplay = document.getElementById('finalZakatDisplay');\r\n const payButton = document.querySelector('.zakatcalculator-section__pay-button');\r\n \r\n if (totalAssets >= nisabThreshold && goldPrice > 0 && zakatcalculatorPricesLoaded) {\r\n const zakatAmount = totalAssets * 0.025;\r\n finalDisplay.textContent = formatCurrency(zakatAmount);\r\n \r\n // Update status badge\r\n statusBadge.textContent = '✓ Zakat is due (Nisab reached)';\r\n statusBadge.className = 'zakatcalculator-section__status zakatcalculator-section__status--eligible';\r\n \r\n // Enable pay button\r\n payButton.disabled = false;\r\n payButton.innerHTML = ' Pay Zakat Now';\r\n \r\n } else {\r\n finalDisplay.textContent = '0.00 $';\r\n \r\n // Update status badge\r\n if (!zakatcalculatorPricesLoaded) {\r\n statusBadge.textContent = 'Enter data to check eligibility';\r\n statusBadge.className = 'zakatcalculator-section__status zakatcalculator-section__status--not-eligible';\r\n } else if (totalAssets < nisabThreshold) {\r\n statusBadge.textContent = 'Zakat is not due (Nisab not reached)';\r\n statusBadge.className = 'zakatcalculator-section__status zakatcalculator-section__status--not-eligible';\r\n } else {\r\n statusBadge.textContent = 'Enter data to check eligibility';\r\n statusBadge.className = 'zakatcalculator-section__status zakatcalculator-section__status--not-eligible';\r\n }\r\n \r\n // Disable pay button\r\n payButton.disabled = true;\r\n payButton.innerHTML = ' Pay Zakat Now';\r\n }\r\n}\r\n\r\n// Format currency\r\nfunction formatCurrency(amount) {\r\n return new Intl.NumberFormat('en-US', {\r\n style: 'currency',\r\n currency: 'USD',\r\n minimumFractionDigits: 2,\r\n maximumFractionDigits: 2\r\n }).format(amount);\r\n}\r\n\r\n// Add zakat to cart\r\nfunction zakatcalculatorAddToCart() {\r\n const amountText = document.getElementById('finalZakatDisplay').textContent;\r\n const amount = parseFloat(amountText.replace(/[^0-9.-]+/g, \"\"));\r\n \r\n if (amount > 0 && !isNaN(amount)) {\r\n // Use your existing addToCart function\r\n if (typeof addToCart === 'function') {\r\n addToCart('Calculated Zakat', amount, 'Zakat');\r\n } else {\r\n // Fallback if addToCart is not defined\r\n alert(`Calculated Zakat amount: ${amountText}`);\r\n }\r\n } else {\r\n alert(\"Invalid zakat amount. Please check your inputs.\");\r\n }\r\n}\r\n\r\n// Input validation\r\nfunction validateZakatInput(input) {\r\n const value = parseFloat(input.value);\r\n const min = parseFloat(input.getAttribute('min')) || 0;\r\n \r\n if (isNaN(value) || value < min) {\r\n input.classList.add('zakatcalculator-section__input--invalid');\r\n return false;\r\n } else {\r\n input.classList.remove('zakatcalculator-section__input--invalid');\r\n input.classList.add('zakatcalculator-section__input--valid');\r\n return true;\r\n }\r\n}","animate_delay":"0"},"editing":false,"element_name":"gva_text_noeditor"}],"editing":false,"element_name":"gva_column"}],"editing":false,"element_name":"gva_row"},{"settings":{"element":"gva_row","bg_particles":"off","bg_position":"center top","bg_repeat":"no-repeat","bg_attachment":"scroll","bg_size":"cover","style_space":"remove_margin remove_padding remove_padding_col","layout":"container-fw","class":"partner","margin_top":"30","margin_bottom":"30"},"columns":[{"settings":{"element":"gva_column"},"col_lg":12,"elements":[{"settings":{"content":"\r\n \r\n Strategic Partnerships\r\n Our partners in creating hope\r\n \r\n \r\n ","animate_delay":"0"},"editing":false,"element_name":"gva_text_noeditor"},{"settings":{"title_admin":"Partners: Partners Block - en","block_drupal":"views_block__partners_block_2","hidden_title":"on","align_title":"title-align-right","remove_margin":"on","style_text":"text-dark","animate_delay":"0"},"editing":false,"element_name":"gva_drupal_block"}],"editing":false,"element_name":"gva_column"}],"editing":false,"element_name":"gva_row"}]') (Line: 47)
Drupal\gavias_content_builder\Plugin\Field\FieldFormatter\GaviasContentBuilderFormatter->viewElements(Object, 'en') (Line: 89)
Drupal\Core\Field\FormatterBase->view(Object, 'en') (Line: 263)
Drupal\Core\Entity\Entity\EntityViewDisplay->buildMultiple(Array) (Line: 351)
Drupal\Core\Entity\EntityViewBuilder->buildComponents(Array, Array, Array, 'full') (Line: 24)
Drupal\node\NodeViewBuilder->buildComponents(Array, Array, Array, 'full') (Line: 293)
Drupal\Core\Entity\EntityViewBuilder->buildMultiple(Array) (Line: 250)
Drupal\Core\Entity\EntityViewBuilder->build(Array)
call_user_func_array(Array, Array) (Line: 100)
Drupal\Core\Render\Renderer->doTrustedCallback(Array, Array, 'Render #pre_render callbacks must be methods of a class that implements \Drupal\Core\Security\TrustedCallbackInterface or be an anonymous function. The callback was %s. Support for this callback implementation is deprecated in 8.8.0 and will be removed in Drupal 9.0.0. See https://www.drupal.org/node/2966725', 'silenced_deprecation', 'Drupal\Core\Render\Element\RenderCallbackInterface') (Line: 781)
Drupal\Core\Render\Renderer->doCallback('#pre_render', Array, Array) (Line: 372)
Drupal\Core\Render\Renderer->doRender(Array, ) (Line: 200)
Drupal\Core\Render\Renderer->render(Array, ) (Line: 226)
Drupal\Core\Render\MainContent\HtmlRenderer->Drupal\Core\Render\MainContent\{closure}() (Line: 573)
Drupal\Core\Render\Renderer->executeInRenderContext(Object, Object) (Line: 227)
Drupal\Core\Render\MainContent\HtmlRenderer->prepare(Array, Object, Object) (Line: 117)
Drupal\Core\Render\MainContent\HtmlRenderer->renderResponse(Array, Object, Object) (Line: 90)
Drupal\Core\EventSubscriber\MainContentViewSubscriber->onViewRenderArray(Object, 'kernel.view', Object)
call_user_func(Array, Object, 'kernel.view', Object) (Line: 111)
Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher->dispatch('kernel.view', Object) (Line: 156)
Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object, 1) (Line: 68)
Symfony\Component\HttpKernel\HttpKernel->handle(Object, 1, 1) (Line: 57)
Drupal\Core\StackMiddleware\Session->handle(Object, 1, 1) (Line: 47)
Drupal\Core\StackMiddleware\KernelPreHandle->handle(Object, 1, 1) (Line: 191)
Drupal\page_cache\StackMiddleware\PageCache->fetch(Object, 1, 1) (Line: 128)
Drupal\page_cache\StackMiddleware\PageCache->lookup(Object, 1, 1) (Line: 82)
Drupal\page_cache\StackMiddleware\PageCache->handle(Object, 1, 1) (Line: 47)
Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle(Object, 1, 1) (Line: 52)
Drupal\Core\StackMiddleware\NegotiationMiddleware->handle(Object, 1, 1) (Line: 23)
Stack\StackedHttpKernel->handle(Object, 1, 1) (Line: 708)
Drupal\Core\DrupalKernel->handle(Object) (Line: 19)
- Deprecated function: implode(): Passing glue string after array is deprecated. Swap the parameters in element_gva_drupal_block->render_content() (line 106 of themes/gavias_kunco/gva_content_builder/gva_drupal_block.php).
element_gva_drupal_block->render_content(Array, '') (Line: 110)
gavias_content_builder_render_element('gva_drupal_block', Array) (Line: 54)
gavias_content_builder_render_el(Array) (Line: 22)
gavias_content_builder_frontend('[{"settings":{"bg_particles":"off","bg_position":"center top","bg_repeat":"no-repeat","bg_attachment":"scroll","bg_size":"cover","style_space":"remove_padding","layout":"container-fw"},"columns":[{"settings":{"element":"gva_column","bg_position":"center top","bg_repeat":"no-repeat","bg_attachment":"scroll","bg_size":"cover","el_class":"front"},"col_lg":12,"elements":[{"settings":{"content":"\r\n \r\n \r\n \r\n \r\n Urgent Appeal\r\n \r\n Be a helping hand for them in\r\n times of crisis\r\n \r\n \r\n At \"Wejdan Charity\", we work with full transparency to deliver your donations to those in need in conflict and poverty-stricken areas.\r\n \r\n \r\n <a>\r\n Charity Donations \r\n </a>\r\n <a>\r\n Our Projects \r\n </a>\r\n \r\n \r\n \r\n \r\n","animate_delay":"0"},"editing":false,"element_name":"gva_text_noeditor"}],"editing":false,"element_name":"gva_column"}],"editing":false,"element_name":"gva_row"},{"settings":{"element":"gva_row","bg_particles":"off","bg_position":"center top","bg_repeat":"no-repeat","bg_attachment":"scroll","bg_size":"cover","style_space":"remove_padding","layout":"container","class":"before-help-region"},"columns":[{"settings":{"element":"gva_column"},"col_lg":12,"elements":[{"settings":{"title":"Take action for animals now","link":"#","button_title":"Donation Now","button_align":"button-right-v2","style_text":"text-light","style_button":"btn-theme","donorbox":"off","target":"off","el_class":"margin","animate":"fade-up","animate_delay":"0"},"editing":false,"element_name":"gva_call_to_action"}],"editing":false,"element_name":"gva_column"}],"editing":false,"element_name":"gva_row"},{"settings":{"element":"gva_row","bg_particles":"off","bg_position":"center top","bg_repeat":"no-repeat","bg_attachment":"scroll","bg_size":"cover","style_space":"remove_padding","layout":"container-fw","bg_color":"#f9fafb"},"columns":[{"settings":{"element":"gva_column","bg_position":"center top","bg_repeat":"no-repeat","bg_attachment":"scroll","bg_size":"cover","el_class":"about"},"col_lg":12,"elements":[{"settings":{"content":"\r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n \r\n \r\n Who We Are\r\n \r\n \r\n We plant hope.. \r\n and build people and the future\r\n \r\n \r\n Wejdan Charity is a leading humanitarian organization, founded with an ambitious vision to be a bridge of الخير between donors and those in need.\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n Development Stages\r\n A continuous journey of growth\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n Areas of Work\r\n We reach where the need is\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \"We work with passion to bring smiles\"\r\n \r\n \r\n \r\n \r\n \r\n","animate_delay":"0"},"editing":false,"element_name":"gva_text_noeditor"}],"editing":false,"element_name":"gva_column"}],"editing":false,"element_name":"gva_row"},{"settings":{"element":"gva_row","bg_particles":"off","bg_position":"center top","bg_repeat":"no-repeat","bg_attachment":"scroll","bg_size":"cover","style_space":"remove_margin remove_padding remove_padding_col","layout":"container-fw","class":"partner","margin_top":"30","margin_bottom":"30"},"columns":[{"settings":{"element":"gva_column"},"col_lg":12,"elements":[{"settings":{"content":"\r\n\r\n \r\n \r\n Initiatives & Programs\r\n Our Areas of Work\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n Ongoing Charity\r\n Water wells, mosque construction\r\n \r\n \r\n \r\n \r\n \r\n \r\n Student Sponsorship\r\n Building the future through education\r\n \r\n \r\n \r\n \r\n \r\n \r\n Humanitarian Cases\r\n Patient treatment, surgeries\r\n \r\n \r\n \r\n \r\n \r\n \r\n Development Projects\r\n Empowering productive families\r\n \r\n \r\n<a>Learn more about our programs and initiatives</a>\r\n \r\n","animate_delay":"0"},"editing":false,"element_name":"gva_text_noeditor"}],"editing":false,"element_name":"gva_column"}],"editing":false,"element_name":"gva_row"},{"settings":{"element":"gva_row","bg_particles":"off","bg_position":"center top","bg_repeat":"no-repeat","bg_attachment":"scroll","bg_size":"cover","style_space":"remove_margin remove_padding remove_padding_col","layout":"container","class":"newsfront"},"columns":[{"settings":{"element":"gva_column"},"col_lg":12,"elements":[{"settings":{"content":"\r\n \r\n \r\n Our News\r\n \r\n \r\n \r\nNews that tells the story of giving \r\n \r\n","animate_delay":"0"},"editing":false,"element_name":"gva_text_noeditor"},{"settings":{"title_admin":"news: news Block -en","block_drupal":"views_block__news_block_3","hidden_title":"on","align_title":"title-align-left","remove_margin":"on","style_text":"text-dark","animate_delay":"0"},"editing":false,"element_name":"gva_drupal_block"}],"editing":false,"element_name":"gva_column"}],"editing":false,"element_name":"gva_row"},{"settings":{"bg_particles":"off","bg_position":"center top","bg_repeat":"no-repeat","bg_attachment":"scroll","bg_size":"cover","style_space":"remove_padding","layout":"container-fw","element":"gva_row","class":"sliderfrontpage"},"columns":[{"settings":{"element":"gva_column","bg_position":"center top","bg_repeat":"no-repeat","bg_attachment":"scroll","bg_size":"cover"},"col_lg":12,"elements":[{"settings":{"title_admin":"news: campigns-en","block_drupal":"views_block__news_block_5","hidden_title":"on","align_title":"title-align-right","remove_margin":"on","style_text":"text-dark","animate_delay":"0"},"editing":false,"element_name":"gva_drupal_block"}],"editing":false,"element_name":"gva_column"}],"editing":false,"element_name":"gva_row"},{"settings":{"element":"gva_row","bg_particles":"off","bg_position":"center top","bg_repeat":"no-repeat","bg_attachment":"scroll","bg_size":"cover","style_space":"remove_margin remove_padding remove_padding_col","layout":"container-fw","class":"partner"},"columns":[{"settings":{"element":"gva_column"},"col_lg":12,"elements":[{"settings":{"content":"\r\n \r\n \r\n \r\n Our Distinguished Projects\r\n \r\n \r\n \r\n At Wejdan Charity, we strive to provide support and assistance to communities in need who are affected by disasters, crises, and wars, with the aim of improving quality of life and promoting sustainable development. Our projects span across several areas:\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n Relief Projects\r\n Emergency response to disasters and wars, providing food and medicine.\r\n \r\n<a> Browse Projects </a>\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n Development Projects\r\n Empowering communities and building capacities.\r\n \r\n<a> Browse Projects </a>\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n Seasonal Projects\r\n Ramadan campaigns, Qurbani, and winter clothing.\r\n \r\n<a> Browse Projects </a>\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n Endowment Projects\r\n An investment for the hereafter—mosques, wells, and charitable endowments.\r\n<a> Browse Projects </a>\r\n \r\n \r\n \r\n \r\n","animate_delay":"0"},"editing":false,"element_name":"gva_text_noeditor"}],"editing":false,"element_name":"gva_column"}],"editing":false,"element_name":"gva_row"},{"settings":{"element":"gva_row","bg_particles":"off","bg_position":"center top","bg_repeat":"no-repeat","bg_attachment":"scroll","bg_size":"cover","style_space":"remove_margin remove_padding remove_padding_col","layout":"container-fw","class":"partner"},"columns":[{"settings":{"element":"gva_column"},"col_lg":12,"elements":[{"settings":{"content":"\r\n \r\n \r\n\r\n \r\n \r\n Our Achievements in Numbers\r\n Your trust makes the difference\r\n \r\n \r\n\r\n \r\n \r\n 0\r\n Beneficiaries worldwide\r\n \r\n \r\n \r\n 0\r\n Projects implemented\r\n \r\n \r\n \r\n 0\r\n Countries we operate in\r\n \r\n \r\n \r\n 0\r\n Volunteers\r\n \r\n \r\n \r\n \r\n\r\n\r\n// Enhanced counter animation for facts section\r\nfunction animateFactsCounters() {\r\n const statNumbers = document.querySelectorAll('.facts-section__stat-number');\r\n \r\n const observer = new IntersectionObserver((entries) => {\r\n entries.forEach(entry => {\r\n if (entry.isIntersecting) {\r\n const counter = entry.target;\r\n const target = parseInt(counter.getAttribute('data-target'));\r\n const duration = 2000;\r\n const increment = target / (duration / 16);\r\n \r\n let current = 0;\r\n const updateCounter = () => {\r\n current += increment;\r\n if (current < target) {\r\n // Format number with K for thousands\r\n let displayNum = Math.ceil(current);\r\n if (displayNum >= 1000) {\r\n counter.textContent = (displayNum / 1000).toFixed(1).replace('.0', '') + 'K';\r\n } else {\r\n counter.textContent = displayNum.toLocaleString();\r\n }\r\n requestAnimationFrame(updateCounter);\r\n } else {\r\n // Final formatting\r\n if (target >= 1000) {\r\n counter.textContent = (target / 1000).toFixed(1).replace('.0', '') + 'K';\r\n counter.classList.add('formatted');\r\n } else {\r\n counter.textContent = target.toLocaleString();\r\n }\r\n counter.classList.add('animated');\r\n setTimeout(() => counter.classList.remove('animated'), 600);\r\n }\r\n };\r\n updateCounter();\r\n observer.unobserve(counter);\r\n }\r\n });\r\n }, { threshold: 0.5, rootMargin: '0px 0px -50px 0px' });\r\n \r\n statNumbers.forEach(counter => observer.observe(counter));\r\n}\r\n\r\n// Call this function when DOM is loaded\r\ndocument.addEventListener('DOMContentLoaded', () => {\r\n animateFactsCounters();\r\n});","animate_delay":"0"},"editing":false,"element_name":"gva_text_noeditor"}],"editing":false,"element_name":"gva_column"}],"editing":false,"element_name":"gva_row"},{"settings":{"element":"gva_row","bg_particles":"off","bg_position":"center top","bg_repeat":"no-repeat","bg_attachment":"scroll","bg_size":"cover","style_space":"remove_margin remove_padding remove_padding_col","layout":"container-fw","class":"zakatcalc"},"columns":[{"settings":{"element":"gva_column"},"col_lg":12,"elements":[{"settings":{"content":"\r\n\r\n \r\n \r\n \r\n \r\nSmart Zakat Calculator\r\n A precise and comprehensive tool\r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n \r\n \r\n Money & Savings\r\n \r\n \r\n \r\n Cash (on hand or at home)\r\n \r\n \r\n $\r\n \r\n \r\n \r\n Bank balances\r\n \r\n \r\n $\r\n \r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n Gold & Silver\r\n \r\n \r\n Refresh Prices\r\n \r\n \r\n \r\n \r\n \r\n Gold weight (grams)\r\n \r\n \r\n \r\n \r\n Current gold price per gram\r\n \r\n Live\r\n \r\n \r\n \r\n \r\n $ / gram\r\n \r\n \r\n \r\n\r\n \r\n \r\n Silver weight (grams)\r\n \r\n \r\n \r\n \r\n Current silver price per gram\r\n \r\n Live\r\n \r\n \r\n \r\n \r\n $ / gram\r\n \r\n \r\n \r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n Zakat Summary\r\n \r\n \r\n Total assets:\r\n 0.00 $\r\n \r\n \r\n Net zakatable assets:\r\n 0.00 $\r\n \r\n \r\n Nisab value (85g gold):\r\n ...\r\n \r\n \r\n Enter data to check eligibility\r\n \r\n \r\n \r\n\r\n \r\n \r\n Zakat due (2.5%)\r\n 0.00 $\r\n \r\n \r\n <a>\r\n \r\n Contact via WhatsApp for consultation and donation\r\n </a>\r\n \r\n \r\n \r\n \r\n\r\n\r\n// Zakat Calculator Logic\r\nlet zakatcalculatorPricesLoaded = false;\r\n\r\n// Initialize calculator when DOM is loaded\r\ndocument.addEventListener('DOMContentLoaded', () => {\r\n zakatcalculatorFetchPrices();\r\n zakatcalculatorCalculate();\r\n \r\n // Add input event listeners for real-time calculation\r\n const inputs = document.querySelectorAll('.zakatcalculator-section__input');\r\n inputs.forEach(input => {\r\n input.addEventListener('input', zakatcalculatorCalculate);\r\n });\r\n \r\n // Format numbers as user types\r\n inputs.forEach(input => {\r\n input.addEventListener('blur', function() {\r\n if (this.value) {\r\n const value = parseFloat(this.value);\r\n if (!isNaN(value)) {\r\n this.value = value.toLocaleString('en-US', {\r\n minimumFractionDigits: 2,\r\n maximumFractionDigits: 2\r\n });\r\n }\r\n }\r\n });\r\n \r\n input.addEventListener('focus', function() {\r\n if (this.value) {\r\n this.value = this.value.replace(/[^\\d.]/g, '');\r\n }\r\n });\r\n });\r\n});\r\n\r\n// Fetch metal prices\r\nasync function zakatcalculatorFetchPrices() {\r\n const goldInput = document.getElementById('goldPrice');\r\n const silverInput = document.getElementById('silverPrice');\r\n const refreshButton = document.querySelector('.zakatcalculator-section__refresh-button');\r\n const refreshIcon = document.querySelector('.zakatcalculator-section__refresh-icon');\r\n \r\n if (!refreshButton || !refreshIcon) return;\r\n \r\n // Show loading state\r\n refreshButton.disabled = true;\r\n refreshIcon.classList.add('zakatcalculator-section__refresh-icon--spinning');\r\n goldInput.classList.add('zakatcalculator-section__input--loading');\r\n silverInput.classList.add('zakatcalculator-section__input--loading');\r\n \r\n try {\r\n // Simulate API call with delay\r\n await new Promise(resolve => setTimeout(resolve, 1500));\r\n \r\n // Mock data (in a real app, you would fetch from an API)\r\n const liveGoldPrice = 76.50;\r\n const liveSilverPrice = 0.95;\r\n \r\n // Update inputs\r\n goldInput.value = liveGoldPrice.toFixed(2);\r\n silverInput.value = liveSilverPrice.toFixed(2);\r\n \r\n // Remove loading state\r\n goldInput.classList.remove('zakatcalculator-section__input--loading');\r\n silverInput.classList.remove('zakatcalculator-section__input--loading');\r\n goldInput.classList.add('zakatcalculator-section__input--valid');\r\n silverInput.classList.add('zakatcalculator-section__input--valid');\r\n \r\n zakatcalculatorPricesLoaded = true;\r\n \r\n // Show success feedback\r\n refreshButton.innerHTML = ' Updated';\r\n refreshButton.style.backgroundColor = '#617f67';\r\n refreshButton.style.color = 'white';\r\n \r\n setTimeout(() => {\r\n refreshButton.innerHTML = ' Refresh Prices';\r\n refreshButton.style.backgroundColor = '';\r\n refreshButton.style.color = '';\r\n }, 2000);\r\n \r\n } catch (error) {\r\n console.error(\"Failed to fetch prices\", error);\r\n \r\n // Fallback values\r\n goldInput.value = 75.00;\r\n silverInput.value = 0.90;\r\n \r\n // Show error state\r\n goldInput.classList.remove('zakatcalculator-section__input--loading');\r\n silverInput.classList.remove('zakatcalculator-section__input--loading');\r\n goldInput.classList.add('zakatcalculator-section__input--invalid');\r\n silverInput.classList.add('zakatcalculator-section__input--invalid');\r\n \r\n refreshButton.innerHTML = ' Update Failed';\r\n refreshButton.style.backgroundColor = '#dc2626';\r\n refreshButton.style.color = 'white';\r\n \r\n setTimeout(() => {\r\n refreshButton.innerHTML = ' Refresh Prices';\r\n refreshButton.style.backgroundColor = '';\r\n refreshButton.style.color = '';\r\n }, 2000);\r\n \r\n } finally {\r\n refreshButton.disabled = false;\r\n refreshIcon.classList.remove('zakatcalculator-section__refresh-icon--spinning');\r\n \r\n // Recalculate zakat\r\n zakatcalculatorCalculate();\r\n }\r\n}\r\n\r\n// Calculate zakat\r\nfunction zakatcalculatorCalculate() {\r\n const cashHand = parseFloat(document.getElementById('cashHand').value) || 0;\r\n const cashBank = parseFloat(document.getElementById('cashBank').value) || 0;\r\n const goldWeight = parseFloat(document.getElementById('goldWeight').value) || 0;\r\n const goldPrice = parseFloat(document.getElementById('goldPrice').value) || 0;\r\n const silverWeight = parseFloat(document.getElementById('silverWeight').value) || 0;\r\n const silverPrice = parseFloat(document.getElementById('silverPrice').value) || 0;\r\n \r\n // Calculate totals\r\n const totalAssets = cashHand + cashBank + (goldWeight * goldPrice) + (silverWeight * silverPrice);\r\n const nisabThreshold = 85 * goldPrice;\r\n \r\n // Update display\r\n document.getElementById('totalAssetsDisplay').textContent = \r\n formatCurrency(totalAssets);\r\n \r\n document.getElementById('netAssetsDisplay').textContent = \r\n formatCurrency(totalAssets);\r\n \r\n if (goldPrice > 0) {\r\n document.getElementById('nisabValueDisplay').textContent = \r\n formatCurrency(nisabThreshold);\r\n } else {\r\n document.getElementById('nisabValueDisplay').textContent = '...';\r\n }\r\n \r\n // Update status and final zakat\r\n const statusBadge = document.getElementById('statusBadge');\r\n const finalDisplay = document.getElementById('finalZakatDisplay');\r\n const payButton = document.querySelector('.zakatcalculator-section__pay-button');\r\n \r\n if (totalAssets >= nisabThreshold && goldPrice > 0 && zakatcalculatorPricesLoaded) {\r\n const zakatAmount = totalAssets * 0.025;\r\n finalDisplay.textContent = formatCurrency(zakatAmount);\r\n \r\n // Update status badge\r\n statusBadge.textContent = '✓ Zakat is due (Nisab reached)';\r\n statusBadge.className = 'zakatcalculator-section__status zakatcalculator-section__status--eligible';\r\n \r\n // Enable pay button\r\n payButton.disabled = false;\r\n payButton.innerHTML = ' Pay Zakat Now';\r\n \r\n } else {\r\n finalDisplay.textContent = '0.00 $';\r\n \r\n // Update status badge\r\n if (!zakatcalculatorPricesLoaded) {\r\n statusBadge.textContent = 'Enter data to check eligibility';\r\n statusBadge.className = 'zakatcalculator-section__status zakatcalculator-section__status--not-eligible';\r\n } else if (totalAssets < nisabThreshold) {\r\n statusBadge.textContent = 'Zakat is not due (Nisab not reached)';\r\n statusBadge.className = 'zakatcalculator-section__status zakatcalculator-section__status--not-eligible';\r\n } else {\r\n statusBadge.textContent = 'Enter data to check eligibility';\r\n statusBadge.className = 'zakatcalculator-section__status zakatcalculator-section__status--not-eligible';\r\n }\r\n \r\n // Disable pay button\r\n payButton.disabled = true;\r\n payButton.innerHTML = ' Pay Zakat Now';\r\n }\r\n}\r\n\r\n// Format currency\r\nfunction formatCurrency(amount) {\r\n return new Intl.NumberFormat('en-US', {\r\n style: 'currency',\r\n currency: 'USD',\r\n minimumFractionDigits: 2,\r\n maximumFractionDigits: 2\r\n }).format(amount);\r\n}\r\n\r\n// Add zakat to cart\r\nfunction zakatcalculatorAddToCart() {\r\n const amountText = document.getElementById('finalZakatDisplay').textContent;\r\n const amount = parseFloat(amountText.replace(/[^0-9.-]+/g, \"\"));\r\n \r\n if (amount > 0 && !isNaN(amount)) {\r\n // Use your existing addToCart function\r\n if (typeof addToCart === 'function') {\r\n addToCart('Calculated Zakat', amount, 'Zakat');\r\n } else {\r\n // Fallback if addToCart is not defined\r\n alert(`Calculated Zakat amount: ${amountText}`);\r\n }\r\n } else {\r\n alert(\"Invalid zakat amount. Please check your inputs.\");\r\n }\r\n}\r\n\r\n// Input validation\r\nfunction validateZakatInput(input) {\r\n const value = parseFloat(input.value);\r\n const min = parseFloat(input.getAttribute('min')) || 0;\r\n \r\n if (isNaN(value) || value < min) {\r\n input.classList.add('zakatcalculator-section__input--invalid');\r\n return false;\r\n } else {\r\n input.classList.remove('zakatcalculator-section__input--invalid');\r\n input.classList.add('zakatcalculator-section__input--valid');\r\n return true;\r\n }\r\n}","animate_delay":"0"},"editing":false,"element_name":"gva_text_noeditor"}],"editing":false,"element_name":"gva_column"}],"editing":false,"element_name":"gva_row"},{"settings":{"element":"gva_row","bg_particles":"off","bg_position":"center top","bg_repeat":"no-repeat","bg_attachment":"scroll","bg_size":"cover","style_space":"remove_margin remove_padding remove_padding_col","layout":"container-fw","class":"partner","margin_top":"30","margin_bottom":"30"},"columns":[{"settings":{"element":"gva_column"},"col_lg":12,"elements":[{"settings":{"content":"\r\n \r\n Strategic Partnerships\r\n Our partners in creating hope\r\n \r\n \r\n ","animate_delay":"0"},"editing":false,"element_name":"gva_text_noeditor"},{"settings":{"title_admin":"Partners: Partners Block - en","block_drupal":"views_block__partners_block_2","hidden_title":"on","align_title":"title-align-right","remove_margin":"on","style_text":"text-dark","animate_delay":"0"},"editing":false,"element_name":"gva_drupal_block"}],"editing":false,"element_name":"gva_column"}],"editing":false,"element_name":"gva_row"}]') (Line: 47)
Drupal\gavias_content_builder\Plugin\Field\FieldFormatter\GaviasContentBuilderFormatter->viewElements(Object, 'en') (Line: 89)
Drupal\Core\Field\FormatterBase->view(Object, 'en') (Line: 263)
Drupal\Core\Entity\Entity\EntityViewDisplay->buildMultiple(Array) (Line: 351)
Drupal\Core\Entity\EntityViewBuilder->buildComponents(Array, Array, Array, 'full') (Line: 24)
Drupal\node\NodeViewBuilder->buildComponents(Array, Array, Array, 'full') (Line: 293)
Drupal\Core\Entity\EntityViewBuilder->buildMultiple(Array) (Line: 250)
Drupal\Core\Entity\EntityViewBuilder->build(Array)
call_user_func_array(Array, Array) (Line: 100)
Drupal\Core\Render\Renderer->doTrustedCallback(Array, Array, 'Render #pre_render callbacks must be methods of a class that implements \Drupal\Core\Security\TrustedCallbackInterface or be an anonymous function. The callback was %s. Support for this callback implementation is deprecated in 8.8.0 and will be removed in Drupal 9.0.0. See https://www.drupal.org/node/2966725', 'silenced_deprecation', 'Drupal\Core\Render\Element\RenderCallbackInterface') (Line: 781)
Drupal\Core\Render\Renderer->doCallback('#pre_render', Array, Array) (Line: 372)
Drupal\Core\Render\Renderer->doRender(Array, ) (Line: 200)
Drupal\Core\Render\Renderer->render(Array, ) (Line: 226)
Drupal\Core\Render\MainContent\HtmlRenderer->Drupal\Core\Render\MainContent\{closure}() (Line: 573)
Drupal\Core\Render\Renderer->executeInRenderContext(Object, Object) (Line: 227)
Drupal\Core\Render\MainContent\HtmlRenderer->prepare(Array, Object, Object) (Line: 117)
Drupal\Core\Render\MainContent\HtmlRenderer->renderResponse(Array, Object, Object) (Line: 90)
Drupal\Core\EventSubscriber\MainContentViewSubscriber->onViewRenderArray(Object, 'kernel.view', Object)
call_user_func(Array, Object, 'kernel.view', Object) (Line: 111)
Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher->dispatch('kernel.view', Object) (Line: 156)
Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object, 1) (Line: 68)
Symfony\Component\HttpKernel\HttpKernel->handle(Object, 1, 1) (Line: 57)
Drupal\Core\StackMiddleware\Session->handle(Object, 1, 1) (Line: 47)
Drupal\Core\StackMiddleware\KernelPreHandle->handle(Object, 1, 1) (Line: 191)
Drupal\page_cache\StackMiddleware\PageCache->fetch(Object, 1, 1) (Line: 128)
Drupal\page_cache\StackMiddleware\PageCache->lookup(Object, 1, 1) (Line: 82)
Drupal\page_cache\StackMiddleware\PageCache->handle(Object, 1, 1) (Line: 47)
Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle(Object, 1, 1) (Line: 52)
Drupal\Core\StackMiddleware\NegotiationMiddleware->handle(Object, 1, 1) (Line: 23)
Stack\StackedHttpKernel->handle(Object, 1, 1) (Line: 708)
Drupal\Core\DrupalKernel->handle(Object) (Line: 19)
- Deprecated function: implode(): Passing glue string after array is deprecated. Swap the parameters in element_gva_column->render_content() (line 462 of themes/gavias_kunco/gva_content_builder/gva_column.php).
element_gva_column->render_content(Array, '
Our News
News that tells the story of giving
') (Line: 110)
gavias_content_builder_render_element('gva_column', Array, '
Our News
News that tells the story of giving
') (Line: 58)
gavias_content_builder_render_el(Array) (Line: 22)
gavias_content_builder_frontend('[{"settings":{"bg_particles":"off","bg_position":"center top","bg_repeat":"no-repeat","bg_attachment":"scroll","bg_size":"cover","style_space":"remove_padding","layout":"container-fw"},"columns":[{"settings":{"element":"gva_column","bg_position":"center top","bg_repeat":"no-repeat","bg_attachment":"scroll","bg_size":"cover","el_class":"front"},"col_lg":12,"elements":[{"settings":{"content":"\r\n \r\n \r\n \r\n \r\n Urgent Appeal\r\n \r\n Be a helping hand for them in\r\n times of crisis\r\n \r\n \r\n At \"Wejdan Charity\", we work with full transparency to deliver your donations to those in need in conflict and poverty-stricken areas.\r\n \r\n \r\n <a>\r\n Charity Donations \r\n </a>\r\n <a>\r\n Our Projects \r\n </a>\r\n \r\n \r\n \r\n \r\n","animate_delay":"0"},"editing":false,"element_name":"gva_text_noeditor"}],"editing":false,"element_name":"gva_column"}],"editing":false,"element_name":"gva_row"},{"settings":{"element":"gva_row","bg_particles":"off","bg_position":"center top","bg_repeat":"no-repeat","bg_attachment":"scroll","bg_size":"cover","style_space":"remove_padding","layout":"container","class":"before-help-region"},"columns":[{"settings":{"element":"gva_column"},"col_lg":12,"elements":[{"settings":{"title":"Take action for animals now","link":"#","button_title":"Donation Now","button_align":"button-right-v2","style_text":"text-light","style_button":"btn-theme","donorbox":"off","target":"off","el_class":"margin","animate":"fade-up","animate_delay":"0"},"editing":false,"element_name":"gva_call_to_action"}],"editing":false,"element_name":"gva_column"}],"editing":false,"element_name":"gva_row"},{"settings":{"element":"gva_row","bg_particles":"off","bg_position":"center top","bg_repeat":"no-repeat","bg_attachment":"scroll","bg_size":"cover","style_space":"remove_padding","layout":"container-fw","bg_color":"#f9fafb"},"columns":[{"settings":{"element":"gva_column","bg_position":"center top","bg_repeat":"no-repeat","bg_attachment":"scroll","bg_size":"cover","el_class":"about"},"col_lg":12,"elements":[{"settings":{"content":"\r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n \r\n \r\n Who We Are\r\n \r\n \r\n We plant hope.. \r\n and build people and the future\r\n \r\n \r\n Wejdan Charity is a leading humanitarian organization, founded with an ambitious vision to be a bridge of الخير between donors and those in need.\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n Development Stages\r\n A continuous journey of growth\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n Areas of Work\r\n We reach where the need is\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \"We work with passion to bring smiles\"\r\n \r\n \r\n \r\n \r\n \r\n","animate_delay":"0"},"editing":false,"element_name":"gva_text_noeditor"}],"editing":false,"element_name":"gva_column"}],"editing":false,"element_name":"gva_row"},{"settings":{"element":"gva_row","bg_particles":"off","bg_position":"center top","bg_repeat":"no-repeat","bg_attachment":"scroll","bg_size":"cover","style_space":"remove_margin remove_padding remove_padding_col","layout":"container-fw","class":"partner","margin_top":"30","margin_bottom":"30"},"columns":[{"settings":{"element":"gva_column"},"col_lg":12,"elements":[{"settings":{"content":"\r\n\r\n \r\n \r\n Initiatives & Programs\r\n Our Areas of Work\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n Ongoing Charity\r\n Water wells, mosque construction\r\n \r\n \r\n \r\n \r\n \r\n \r\n Student Sponsorship\r\n Building the future through education\r\n \r\n \r\n \r\n \r\n \r\n \r\n Humanitarian Cases\r\n Patient treatment, surgeries\r\n \r\n \r\n \r\n \r\n \r\n \r\n Development Projects\r\n Empowering productive families\r\n \r\n \r\n<a>Learn more about our programs and initiatives</a>\r\n \r\n","animate_delay":"0"},"editing":false,"element_name":"gva_text_noeditor"}],"editing":false,"element_name":"gva_column"}],"editing":false,"element_name":"gva_row"},{"settings":{"element":"gva_row","bg_particles":"off","bg_position":"center top","bg_repeat":"no-repeat","bg_attachment":"scroll","bg_size":"cover","style_space":"remove_margin remove_padding remove_padding_col","layout":"container","class":"newsfront"},"columns":[{"settings":{"element":"gva_column"},"col_lg":12,"elements":[{"settings":{"content":"\r\n \r\n \r\n Our News\r\n \r\n \r\n \r\nNews that tells the story of giving \r\n \r\n","animate_delay":"0"},"editing":false,"element_name":"gva_text_noeditor"},{"settings":{"title_admin":"news: news Block -en","block_drupal":"views_block__news_block_3","hidden_title":"on","align_title":"title-align-left","remove_margin":"on","style_text":"text-dark","animate_delay":"0"},"editing":false,"element_name":"gva_drupal_block"}],"editing":false,"element_name":"gva_column"}],"editing":false,"element_name":"gva_row"},{"settings":{"bg_particles":"off","bg_position":"center top","bg_repeat":"no-repeat","bg_attachment":"scroll","bg_size":"cover","style_space":"remove_padding","layout":"container-fw","element":"gva_row","class":"sliderfrontpage"},"columns":[{"settings":{"element":"gva_column","bg_position":"center top","bg_repeat":"no-repeat","bg_attachment":"scroll","bg_size":"cover"},"col_lg":12,"elements":[{"settings":{"title_admin":"news: campigns-en","block_drupal":"views_block__news_block_5","hidden_title":"on","align_title":"title-align-right","remove_margin":"on","style_text":"text-dark","animate_delay":"0"},"editing":false,"element_name":"gva_drupal_block"}],"editing":false,"element_name":"gva_column"}],"editing":false,"element_name":"gva_row"},{"settings":{"element":"gva_row","bg_particles":"off","bg_position":"center top","bg_repeat":"no-repeat","bg_attachment":"scroll","bg_size":"cover","style_space":"remove_margin remove_padding remove_padding_col","layout":"container-fw","class":"partner"},"columns":[{"settings":{"element":"gva_column"},"col_lg":12,"elements":[{"settings":{"content":"\r\n \r\n \r\n \r\n Our Distinguished Projects\r\n \r\n \r\n \r\n At Wejdan Charity, we strive to provide support and assistance to communities in need who are affected by disasters, crises, and wars, with the aim of improving quality of life and promoting sustainable development. Our projects span across several areas:\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n Relief Projects\r\n Emergency response to disasters and wars, providing food and medicine.\r\n \r\n<a> Browse Projects </a>\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n Development Projects\r\n Empowering communities and building capacities.\r\n \r\n<a> Browse Projects </a>\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n Seasonal Projects\r\n Ramadan campaigns, Qurbani, and winter clothing.\r\n \r\n<a> Browse Projects </a>\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n Endowment Projects\r\n An investment for the hereafter—mosques, wells, and charitable endowments.\r\n<a> Browse Projects </a>\r\n \r\n \r\n \r\n \r\n","animate_delay":"0"},"editing":false,"element_name":"gva_text_noeditor"}],"editing":false,"element_name":"gva_column"}],"editing":false,"element_name":"gva_row"},{"settings":{"element":"gva_row","bg_particles":"off","bg_position":"center top","bg_repeat":"no-repeat","bg_attachment":"scroll","bg_size":"cover","style_space":"remove_margin remove_padding remove_padding_col","layout":"container-fw","class":"partner"},"columns":[{"settings":{"element":"gva_column"},"col_lg":12,"elements":[{"settings":{"content":"\r\n \r\n \r\n\r\n \r\n \r\n Our Achievements in Numbers\r\n Your trust makes the difference\r\n \r\n \r\n\r\n \r\n \r\n 0\r\n Beneficiaries worldwide\r\n \r\n \r\n \r\n 0\r\n Projects implemented\r\n \r\n \r\n \r\n 0\r\n Countries we operate in\r\n \r\n \r\n \r\n 0\r\n Volunteers\r\n \r\n \r\n \r\n \r\n\r\n\r\n// Enhanced counter animation for facts section\r\nfunction animateFactsCounters() {\r\n const statNumbers = document.querySelectorAll('.facts-section__stat-number');\r\n \r\n const observer = new IntersectionObserver((entries) => {\r\n entries.forEach(entry => {\r\n if (entry.isIntersecting) {\r\n const counter = entry.target;\r\n const target = parseInt(counter.getAttribute('data-target'));\r\n const duration = 2000;\r\n const increment = target / (duration / 16);\r\n \r\n let current = 0;\r\n const updateCounter = () => {\r\n current += increment;\r\n if (current < target) {\r\n // Format number with K for thousands\r\n let displayNum = Math.ceil(current);\r\n if (displayNum >= 1000) {\r\n counter.textContent = (displayNum / 1000).toFixed(1).replace('.0', '') + 'K';\r\n } else {\r\n counter.textContent = displayNum.toLocaleString();\r\n }\r\n requestAnimationFrame(updateCounter);\r\n } else {\r\n // Final formatting\r\n if (target >= 1000) {\r\n counter.textContent = (target / 1000).toFixed(1).replace('.0', '') + 'K';\r\n counter.classList.add('formatted');\r\n } else {\r\n counter.textContent = target.toLocaleString();\r\n }\r\n counter.classList.add('animated');\r\n setTimeout(() => counter.classList.remove('animated'), 600);\r\n }\r\n };\r\n updateCounter();\r\n observer.unobserve(counter);\r\n }\r\n });\r\n }, { threshold: 0.5, rootMargin: '0px 0px -50px 0px' });\r\n \r\n statNumbers.forEach(counter => observer.observe(counter));\r\n}\r\n\r\n// Call this function when DOM is loaded\r\ndocument.addEventListener('DOMContentLoaded', () => {\r\n animateFactsCounters();\r\n});","animate_delay":"0"},"editing":false,"element_name":"gva_text_noeditor"}],"editing":false,"element_name":"gva_column"}],"editing":false,"element_name":"gva_row"},{"settings":{"element":"gva_row","bg_particles":"off","bg_position":"center top","bg_repeat":"no-repeat","bg_attachment":"scroll","bg_size":"cover","style_space":"remove_margin remove_padding remove_padding_col","layout":"container-fw","class":"zakatcalc"},"columns":[{"settings":{"element":"gva_column"},"col_lg":12,"elements":[{"settings":{"content":"\r\n\r\n \r\n \r\n \r\n \r\nSmart Zakat Calculator\r\n A precise and comprehensive tool\r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n \r\n \r\n Money & Savings\r\n \r\n \r\n \r\n Cash (on hand or at home)\r\n \r\n \r\n $\r\n \r\n \r\n \r\n Bank balances\r\n \r\n \r\n $\r\n \r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n Gold & Silver\r\n \r\n \r\n Refresh Prices\r\n \r\n \r\n \r\n \r\n \r\n Gold weight (grams)\r\n \r\n \r\n \r\n \r\n Current gold price per gram\r\n \r\n Live\r\n \r\n \r\n \r\n \r\n $ / gram\r\n \r\n \r\n \r\n\r\n \r\n \r\n Silver weight (grams)\r\n \r\n \r\n \r\n \r\n Current silver price per gram\r\n \r\n Live\r\n \r\n \r\n \r\n \r\n $ / gram\r\n \r\n \r\n \r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n Zakat Summary\r\n \r\n \r\n Total assets:\r\n 0.00 $\r\n \r\n \r\n Net zakatable assets:\r\n 0.00 $\r\n \r\n \r\n Nisab value (85g gold):\r\n ...\r\n \r\n \r\n Enter data to check eligibility\r\n \r\n \r\n \r\n\r\n \r\n \r\n Zakat due (2.5%)\r\n 0.00 $\r\n \r\n \r\n <a>\r\n \r\n Contact via WhatsApp for consultation and donation\r\n </a>\r\n \r\n \r\n \r\n \r\n\r\n\r\n// Zakat Calculator Logic\r\nlet zakatcalculatorPricesLoaded = false;\r\n\r\n// Initialize calculator when DOM is loaded\r\ndocument.addEventListener('DOMContentLoaded', () => {\r\n zakatcalculatorFetchPrices();\r\n zakatcalculatorCalculate();\r\n \r\n // Add input event listeners for real-time calculation\r\n const inputs = document.querySelectorAll('.zakatcalculator-section__input');\r\n inputs.forEach(input => {\r\n input.addEventListener('input', zakatcalculatorCalculate);\r\n });\r\n \r\n // Format numbers as user types\r\n inputs.forEach(input => {\r\n input.addEventListener('blur', function() {\r\n if (this.value) {\r\n const value = parseFloat(this.value);\r\n if (!isNaN(value)) {\r\n this.value = value.toLocaleString('en-US', {\r\n minimumFractionDigits: 2,\r\n maximumFractionDigits: 2\r\n });\r\n }\r\n }\r\n });\r\n \r\n input.addEventListener('focus', function() {\r\n if (this.value) {\r\n this.value = this.value.replace(/[^\\d.]/g, '');\r\n }\r\n });\r\n });\r\n});\r\n\r\n// Fetch metal prices\r\nasync function zakatcalculatorFetchPrices() {\r\n const goldInput = document.getElementById('goldPrice');\r\n const silverInput = document.getElementById('silverPrice');\r\n const refreshButton = document.querySelector('.zakatcalculator-section__refresh-button');\r\n const refreshIcon = document.querySelector('.zakatcalculator-section__refresh-icon');\r\n \r\n if (!refreshButton || !refreshIcon) return;\r\n \r\n // Show loading state\r\n refreshButton.disabled = true;\r\n refreshIcon.classList.add('zakatcalculator-section__refresh-icon--spinning');\r\n goldInput.classList.add('zakatcalculator-section__input--loading');\r\n silverInput.classList.add('zakatcalculator-section__input--loading');\r\n \r\n try {\r\n // Simulate API call with delay\r\n await new Promise(resolve => setTimeout(resolve, 1500));\r\n \r\n // Mock data (in a real app, you would fetch from an API)\r\n const liveGoldPrice = 76.50;\r\n const liveSilverPrice = 0.95;\r\n \r\n // Update inputs\r\n goldInput.value = liveGoldPrice.toFixed(2);\r\n silverInput.value = liveSilverPrice.toFixed(2);\r\n \r\n // Remove loading state\r\n goldInput.classList.remove('zakatcalculator-section__input--loading');\r\n silverInput.classList.remove('zakatcalculator-section__input--loading');\r\n goldInput.classList.add('zakatcalculator-section__input--valid');\r\n silverInput.classList.add('zakatcalculator-section__input--valid');\r\n \r\n zakatcalculatorPricesLoaded = true;\r\n \r\n // Show success feedback\r\n refreshButton.innerHTML = ' Updated';\r\n refreshButton.style.backgroundColor = '#617f67';\r\n refreshButton.style.color = 'white';\r\n \r\n setTimeout(() => {\r\n refreshButton.innerHTML = ' Refresh Prices';\r\n refreshButton.style.backgroundColor = '';\r\n refreshButton.style.color = '';\r\n }, 2000);\r\n \r\n } catch (error) {\r\n console.error(\"Failed to fetch prices\", error);\r\n \r\n // Fallback values\r\n goldInput.value = 75.00;\r\n silverInput.value = 0.90;\r\n \r\n // Show error state\r\n goldInput.classList.remove('zakatcalculator-section__input--loading');\r\n silverInput.classList.remove('zakatcalculator-section__input--loading');\r\n goldInput.classList.add('zakatcalculator-section__input--invalid');\r\n silverInput.classList.add('zakatcalculator-section__input--invalid');\r\n \r\n refreshButton.innerHTML = ' Update Failed';\r\n refreshButton.style.backgroundColor = '#dc2626';\r\n refreshButton.style.color = 'white';\r\n \r\n setTimeout(() => {\r\n refreshButton.innerHTML = ' Refresh Prices';\r\n refreshButton.style.backgroundColor = '';\r\n refreshButton.style.color = '';\r\n }, 2000);\r\n \r\n } finally {\r\n refreshButton.disabled = false;\r\n refreshIcon.classList.remove('zakatcalculator-section__refresh-icon--spinning');\r\n \r\n // Recalculate zakat\r\n zakatcalculatorCalculate();\r\n }\r\n}\r\n\r\n// Calculate zakat\r\nfunction zakatcalculatorCalculate() {\r\n const cashHand = parseFloat(document.getElementById('cashHand').value) || 0;\r\n const cashBank = parseFloat(document.getElementById('cashBank').value) || 0;\r\n const goldWeight = parseFloat(document.getElementById('goldWeight').value) || 0;\r\n const goldPrice = parseFloat(document.getElementById('goldPrice').value) || 0;\r\n const silverWeight = parseFloat(document.getElementById('silverWeight').value) || 0;\r\n const silverPrice = parseFloat(document.getElementById('silverPrice').value) || 0;\r\n \r\n // Calculate totals\r\n const totalAssets = cashHand + cashBank + (goldWeight * goldPrice) + (silverWeight * silverPrice);\r\n const nisabThreshold = 85 * goldPrice;\r\n \r\n // Update display\r\n document.getElementById('totalAssetsDisplay').textContent = \r\n formatCurrency(totalAssets);\r\n \r\n document.getElementById('netAssetsDisplay').textContent = \r\n formatCurrency(totalAssets);\r\n \r\n if (goldPrice > 0) {\r\n document.getElementById('nisabValueDisplay').textContent = \r\n formatCurrency(nisabThreshold);\r\n } else {\r\n document.getElementById('nisabValueDisplay').textContent = '...';\r\n }\r\n \r\n // Update status and final zakat\r\n const statusBadge = document.getElementById('statusBadge');\r\n const finalDisplay = document.getElementById('finalZakatDisplay');\r\n const payButton = document.querySelector('.zakatcalculator-section__pay-button');\r\n \r\n if (totalAssets >= nisabThreshold && goldPrice > 0 && zakatcalculatorPricesLoaded) {\r\n const zakatAmount = totalAssets * 0.025;\r\n finalDisplay.textContent = formatCurrency(zakatAmount);\r\n \r\n // Update status badge\r\n statusBadge.textContent = '✓ Zakat is due (Nisab reached)';\r\n statusBadge.className = 'zakatcalculator-section__status zakatcalculator-section__status--eligible';\r\n \r\n // Enable pay button\r\n payButton.disabled = false;\r\n payButton.innerHTML = ' Pay Zakat Now';\r\n \r\n } else {\r\n finalDisplay.textContent = '0.00 $';\r\n \r\n // Update status badge\r\n if (!zakatcalculatorPricesLoaded) {\r\n statusBadge.textContent = 'Enter data to check eligibility';\r\n statusBadge.className = 'zakatcalculator-section__status zakatcalculator-section__status--not-eligible';\r\n } else if (totalAssets < nisabThreshold) {\r\n statusBadge.textContent = 'Zakat is not due (Nisab not reached)';\r\n statusBadge.className = 'zakatcalculator-section__status zakatcalculator-section__status--not-eligible';\r\n } else {\r\n statusBadge.textContent = 'Enter data to check eligibility';\r\n statusBadge.className = 'zakatcalculator-section__status zakatcalculator-section__status--not-eligible';\r\n }\r\n \r\n // Disable pay button\r\n payButton.disabled = true;\r\n payButton.innerHTML = ' Pay Zakat Now';\r\n }\r\n}\r\n\r\n// Format currency\r\nfunction formatCurrency(amount) {\r\n return new Intl.NumberFormat('en-US', {\r\n style: 'currency',\r\n currency: 'USD',\r\n minimumFractionDigits: 2,\r\n maximumFractionDigits: 2\r\n }).format(amount);\r\n}\r\n\r\n// Add zakat to cart\r\nfunction zakatcalculatorAddToCart() {\r\n const amountText = document.getElementById('finalZakatDisplay').textContent;\r\n const amount = parseFloat(amountText.replace(/[^0-9.-]+/g, \"\"));\r\n \r\n if (amount > 0 && !isNaN(amount)) {\r\n // Use your existing addToCart function\r\n if (typeof addToCart === 'function') {\r\n addToCart('Calculated Zakat', amount, 'Zakat');\r\n } else {\r\n // Fallback if addToCart is not defined\r\n alert(`Calculated Zakat amount: ${amountText}`);\r\n }\r\n } else {\r\n alert(\"Invalid zakat amount. Please check your inputs.\");\r\n }\r\n}\r\n\r\n// Input validation\r\nfunction validateZakatInput(input) {\r\n const value = parseFloat(input.value);\r\n const min = parseFloat(input.getAttribute('min')) || 0;\r\n \r\n if (isNaN(value) || value < min) {\r\n input.classList.add('zakatcalculator-section__input--invalid');\r\n return false;\r\n } else {\r\n input.classList.remove('zakatcalculator-section__input--invalid');\r\n input.classList.add('zakatcalculator-section__input--valid');\r\n return true;\r\n }\r\n}","animate_delay":"0"},"editing":false,"element_name":"gva_text_noeditor"}],"editing":false,"element_name":"gva_column"}],"editing":false,"element_name":"gva_row"},{"settings":{"element":"gva_row","bg_particles":"off","bg_position":"center top","bg_repeat":"no-repeat","bg_attachment":"scroll","bg_size":"cover","style_space":"remove_margin remove_padding remove_padding_col","layout":"container-fw","class":"partner","margin_top":"30","margin_bottom":"30"},"columns":[{"settings":{"element":"gva_column"},"col_lg":12,"elements":[{"settings":{"content":"\r\n \r\n Strategic Partnerships\r\n Our partners in creating hope\r\n \r\n \r\n ","animate_delay":"0"},"editing":false,"element_name":"gva_text_noeditor"},{"settings":{"title_admin":"Partners: Partners Block - en","block_drupal":"views_block__partners_block_2","hidden_title":"on","align_title":"title-align-right","remove_margin":"on","style_text":"text-dark","animate_delay":"0"},"editing":false,"element_name":"gva_drupal_block"}],"editing":false,"element_name":"gva_column"}],"editing":false,"element_name":"gva_row"}]') (Line: 47)
Drupal\gavias_content_builder\Plugin\Field\FieldFormatter\GaviasContentBuilderFormatter->viewElements(Object, 'en') (Line: 89)
Drupal\Core\Field\FormatterBase->view(Object, 'en') (Line: 263)
Drupal\Core\Entity\Entity\EntityViewDisplay->buildMultiple(Array) (Line: 351)
Drupal\Core\Entity\EntityViewBuilder->buildComponents(Array, Array, Array, 'full') (Line: 24)
Drupal\node\NodeViewBuilder->buildComponents(Array, Array, Array, 'full') (Line: 293)
Drupal\Core\Entity\EntityViewBuilder->buildMultiple(Array) (Line: 250)
Drupal\Core\Entity\EntityViewBuilder->build(Array)
call_user_func_array(Array, Array) (Line: 100)
Drupal\Core\Render\Renderer->doTrustedCallback(Array, Array, 'Render #pre_render callbacks must be methods of a class that implements \Drupal\Core\Security\TrustedCallbackInterface or be an anonymous function. The callback was %s. Support for this callback implementation is deprecated in 8.8.0 and will be removed in Drupal 9.0.0. See https://www.drupal.org/node/2966725', 'silenced_deprecation', 'Drupal\Core\Render\Element\RenderCallbackInterface') (Line: 781)
Drupal\Core\Render\Renderer->doCallback('#pre_render', Array, Array) (Line: 372)
Drupal\Core\Render\Renderer->doRender(Array, ) (Line: 200)
Drupal\Core\Render\Renderer->render(Array, ) (Line: 226)
Drupal\Core\Render\MainContent\HtmlRenderer->Drupal\Core\Render\MainContent\{closure}() (Line: 573)
Drupal\Core\Render\Renderer->executeInRenderContext(Object, Object) (Line: 227)
Drupal\Core\Render\MainContent\HtmlRenderer->prepare(Array, Object, Object) (Line: 117)
Drupal\Core\Render\MainContent\HtmlRenderer->renderResponse(Array, Object, Object) (Line: 90)
Drupal\Core\EventSubscriber\MainContentViewSubscriber->onViewRenderArray(Object, 'kernel.view', Object)
call_user_func(Array, Object, 'kernel.view', Object) (Line: 111)
Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher->dispatch('kernel.view', Object) (Line: 156)
Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object, 1) (Line: 68)
Symfony\Component\HttpKernel\HttpKernel->handle(Object, 1, 1) (Line: 57)
Drupal\Core\StackMiddleware\Session->handle(Object, 1, 1) (Line: 47)
Drupal\Core\StackMiddleware\KernelPreHandle->handle(Object, 1, 1) (Line: 191)
Drupal\page_cache\StackMiddleware\PageCache->fetch(Object, 1, 1) (Line: 128)
Drupal\page_cache\StackMiddleware\PageCache->lookup(Object, 1, 1) (Line: 82)
Drupal\page_cache\StackMiddleware\PageCache->handle(Object, 1, 1) (Line: 47)
Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle(Object, 1, 1) (Line: 52)
Drupal\Core\StackMiddleware\NegotiationMiddleware->handle(Object, 1, 1) (Line: 23)
Stack\StackedHttpKernel->handle(Object, 1, 1) (Line: 708)
Drupal\Core\DrupalKernel->handle(Object) (Line: 19)
- Deprecated function: implode(): Passing glue string after array is deprecated. Swap the parameters in element_gva_column->render_content() (line 463 of themes/gavias_kunco/gva_content_builder/gva_column.php).
element_gva_column->render_content(Array, '
Our News
News that tells the story of giving
') (Line: 110)
gavias_content_builder_render_element('gva_column', Array, '
Our News
News that tells the story of giving
') (Line: 58)
gavias_content_builder_render_el(Array) (Line: 22)
gavias_content_builder_frontend('[{"settings":{"bg_particles":"off","bg_position":"center top","bg_repeat":"no-repeat","bg_attachment":"scroll","bg_size":"cover","style_space":"remove_padding","layout":"container-fw"},"columns":[{"settings":{"element":"gva_column","bg_position":"center top","bg_repeat":"no-repeat","bg_attachment":"scroll","bg_size":"cover","el_class":"front"},"col_lg":12,"elements":[{"settings":{"content":"\r\n \r\n \r\n \r\n \r\n Urgent Appeal\r\n \r\n Be a helping hand for them in\r\n times of crisis\r\n \r\n \r\n At \"Wejdan Charity\", we work with full transparency to deliver your donations to those in need in conflict and poverty-stricken areas.\r\n \r\n \r\n <a>\r\n Charity Donations \r\n </a>\r\n <a>\r\n Our Projects \r\n </a>\r\n \r\n \r\n \r\n \r\n","animate_delay":"0"},"editing":false,"element_name":"gva_text_noeditor"}],"editing":false,"element_name":"gva_column"}],"editing":false,"element_name":"gva_row"},{"settings":{"element":"gva_row","bg_particles":"off","bg_position":"center top","bg_repeat":"no-repeat","bg_attachment":"scroll","bg_size":"cover","style_space":"remove_padding","layout":"container","class":"before-help-region"},"columns":[{"settings":{"element":"gva_column"},"col_lg":12,"elements":[{"settings":{"title":"Take action for animals now","link":"#","button_title":"Donation Now","button_align":"button-right-v2","style_text":"text-light","style_button":"btn-theme","donorbox":"off","target":"off","el_class":"margin","animate":"fade-up","animate_delay":"0"},"editing":false,"element_name":"gva_call_to_action"}],"editing":false,"element_name":"gva_column"}],"editing":false,"element_name":"gva_row"},{"settings":{"element":"gva_row","bg_particles":"off","bg_position":"center top","bg_repeat":"no-repeat","bg_attachment":"scroll","bg_size":"cover","style_space":"remove_padding","layout":"container-fw","bg_color":"#f9fafb"},"columns":[{"settings":{"element":"gva_column","bg_position":"center top","bg_repeat":"no-repeat","bg_attachment":"scroll","bg_size":"cover","el_class":"about"},"col_lg":12,"elements":[{"settings":{"content":"\r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n \r\n \r\n Who We Are\r\n \r\n \r\n We plant hope.. \r\n and build people and the future\r\n \r\n \r\n Wejdan Charity is a leading humanitarian organization, founded with an ambitious vision to be a bridge of الخير between donors and those in need.\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n Development Stages\r\n A continuous journey of growth\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n Areas of Work\r\n We reach where the need is\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \"We work with passion to bring smiles\"\r\n \r\n \r\n \r\n \r\n \r\n","animate_delay":"0"},"editing":false,"element_name":"gva_text_noeditor"}],"editing":false,"element_name":"gva_column"}],"editing":false,"element_name":"gva_row"},{"settings":{"element":"gva_row","bg_particles":"off","bg_position":"center top","bg_repeat":"no-repeat","bg_attachment":"scroll","bg_size":"cover","style_space":"remove_margin remove_padding remove_padding_col","layout":"container-fw","class":"partner","margin_top":"30","margin_bottom":"30"},"columns":[{"settings":{"element":"gva_column"},"col_lg":12,"elements":[{"settings":{"content":"\r\n\r\n \r\n \r\n Initiatives & Programs\r\n Our Areas of Work\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n Ongoing Charity\r\n Water wells, mosque construction\r\n \r\n \r\n \r\n \r\n \r\n \r\n Student Sponsorship\r\n Building the future through education\r\n \r\n \r\n \r\n \r\n \r\n \r\n Humanitarian Cases\r\n Patient treatment, surgeries\r\n \r\n \r\n \r\n \r\n \r\n \r\n Development Projects\r\n Empowering productive families\r\n \r\n \r\n<a>Learn more about our programs and initiatives</a>\r\n \r\n","animate_delay":"0"},"editing":false,"element_name":"gva_text_noeditor"}],"editing":false,"element_name":"gva_column"}],"editing":false,"element_name":"gva_row"},{"settings":{"element":"gva_row","bg_particles":"off","bg_position":"center top","bg_repeat":"no-repeat","bg_attachment":"scroll","bg_size":"cover","style_space":"remove_margin remove_padding remove_padding_col","layout":"container","class":"newsfront"},"columns":[{"settings":{"element":"gva_column"},"col_lg":12,"elements":[{"settings":{"content":"\r\n \r\n \r\n Our News\r\n \r\n \r\n \r\nNews that tells the story of giving \r\n \r\n","animate_delay":"0"},"editing":false,"element_name":"gva_text_noeditor"},{"settings":{"title_admin":"news: news Block -en","block_drupal":"views_block__news_block_3","hidden_title":"on","align_title":"title-align-left","remove_margin":"on","style_text":"text-dark","animate_delay":"0"},"editing":false,"element_name":"gva_drupal_block"}],"editing":false,"element_name":"gva_column"}],"editing":false,"element_name":"gva_row"},{"settings":{"bg_particles":"off","bg_position":"center top","bg_repeat":"no-repeat","bg_attachment":"scroll","bg_size":"cover","style_space":"remove_padding","layout":"container-fw","element":"gva_row","class":"sliderfrontpage"},"columns":[{"settings":{"element":"gva_column","bg_position":"center top","bg_repeat":"no-repeat","bg_attachment":"scroll","bg_size":"cover"},"col_lg":12,"elements":[{"settings":{"title_admin":"news: campigns-en","block_drupal":"views_block__news_block_5","hidden_title":"on","align_title":"title-align-right","remove_margin":"on","style_text":"text-dark","animate_delay":"0"},"editing":false,"element_name":"gva_drupal_block"}],"editing":false,"element_name":"gva_column"}],"editing":false,"element_name":"gva_row"},{"settings":{"element":"gva_row","bg_particles":"off","bg_position":"center top","bg_repeat":"no-repeat","bg_attachment":"scroll","bg_size":"cover","style_space":"remove_margin remove_padding remove_padding_col","layout":"container-fw","class":"partner"},"columns":[{"settings":{"element":"gva_column"},"col_lg":12,"elements":[{"settings":{"content":"\r\n \r\n \r\n \r\n Our Distinguished Projects\r\n \r\n \r\n \r\n At Wejdan Charity, we strive to provide support and assistance to communities in need who are affected by disasters, crises, and wars, with the aim of improving quality of life and promoting sustainable development. Our projects span across several areas:\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n Relief Projects\r\n Emergency response to disasters and wars, providing food and medicine.\r\n \r\n<a> Browse Projects </a>\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n Development Projects\r\n Empowering communities and building capacities.\r\n \r\n<a> Browse Projects </a>\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n Seasonal Projects\r\n Ramadan campaigns, Qurbani, and winter clothing.\r\n \r\n<a> Browse Projects </a>\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n Endowment Projects\r\n An investment for the hereafter—mosques, wells, and charitable endowments.\r\n<a> Browse Projects </a>\r\n \r\n \r\n \r\n \r\n","animate_delay":"0"},"editing":false,"element_name":"gva_text_noeditor"}],"editing":false,"element_name":"gva_column"}],"editing":false,"element_name":"gva_row"},{"settings":{"element":"gva_row","bg_particles":"off","bg_position":"center top","bg_repeat":"no-repeat","bg_attachment":"scroll","bg_size":"cover","style_space":"remove_margin remove_padding remove_padding_col","layout":"container-fw","class":"partner"},"columns":[{"settings":{"element":"gva_column"},"col_lg":12,"elements":[{"settings":{"content":"\r\n \r\n \r\n\r\n \r\n \r\n Our Achievements in Numbers\r\n Your trust makes the difference\r\n \r\n \r\n\r\n \r\n \r\n 0\r\n Beneficiaries worldwide\r\n \r\n \r\n \r\n 0\r\n Projects implemented\r\n \r\n \r\n \r\n 0\r\n Countries we operate in\r\n \r\n \r\n \r\n 0\r\n Volunteers\r\n \r\n \r\n \r\n \r\n\r\n\r\n// Enhanced counter animation for facts section\r\nfunction animateFactsCounters() {\r\n const statNumbers = document.querySelectorAll('.facts-section__stat-number');\r\n \r\n const observer = new IntersectionObserver((entries) => {\r\n entries.forEach(entry => {\r\n if (entry.isIntersecting) {\r\n const counter = entry.target;\r\n const target = parseInt(counter.getAttribute('data-target'));\r\n const duration = 2000;\r\n const increment = target / (duration / 16);\r\n \r\n let current = 0;\r\n const updateCounter = () => {\r\n current += increment;\r\n if (current < target) {\r\n // Format number with K for thousands\r\n let displayNum = Math.ceil(current);\r\n if (displayNum >= 1000) {\r\n counter.textContent = (displayNum / 1000).toFixed(1).replace('.0', '') + 'K';\r\n } else {\r\n counter.textContent = displayNum.toLocaleString();\r\n }\r\n requestAnimationFrame(updateCounter);\r\n } else {\r\n // Final formatting\r\n if (target >= 1000) {\r\n counter.textContent = (target / 1000).toFixed(1).replace('.0', '') + 'K';\r\n counter.classList.add('formatted');\r\n } else {\r\n counter.textContent = target.toLocaleString();\r\n }\r\n counter.classList.add('animated');\r\n setTimeout(() => counter.classList.remove('animated'), 600);\r\n }\r\n };\r\n updateCounter();\r\n observer.unobserve(counter);\r\n }\r\n });\r\n }, { threshold: 0.5, rootMargin: '0px 0px -50px 0px' });\r\n \r\n statNumbers.forEach(counter => observer.observe(counter));\r\n}\r\n\r\n// Call this function when DOM is loaded\r\ndocument.addEventListener('DOMContentLoaded', () => {\r\n animateFactsCounters();\r\n});","animate_delay":"0"},"editing":false,"element_name":"gva_text_noeditor"}],"editing":false,"element_name":"gva_column"}],"editing":false,"element_name":"gva_row"},{"settings":{"element":"gva_row","bg_particles":"off","bg_position":"center top","bg_repeat":"no-repeat","bg_attachment":"scroll","bg_size":"cover","style_space":"remove_margin remove_padding remove_padding_col","layout":"container-fw","class":"zakatcalc"},"columns":[{"settings":{"element":"gva_column"},"col_lg":12,"elements":[{"settings":{"content":"\r\n\r\n \r\n \r\n \r\n \r\nSmart Zakat Calculator\r\n A precise and comprehensive tool\r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n \r\n \r\n Money & Savings\r\n \r\n \r\n \r\n Cash (on hand or at home)\r\n \r\n \r\n $\r\n \r\n \r\n \r\n Bank balances\r\n \r\n \r\n $\r\n \r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n Gold & Silver\r\n \r\n \r\n Refresh Prices\r\n \r\n \r\n \r\n \r\n \r\n Gold weight (grams)\r\n \r\n \r\n \r\n \r\n Current gold price per gram\r\n \r\n Live\r\n \r\n \r\n \r\n \r\n $ / gram\r\n \r\n \r\n \r\n\r\n \r\n \r\n Silver weight (grams)\r\n \r\n \r\n \r\n \r\n Current silver price per gram\r\n \r\n Live\r\n \r\n \r\n \r\n \r\n $ / gram\r\n \r\n \r\n \r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n Zakat Summary\r\n \r\n \r\n Total assets:\r\n 0.00 $\r\n \r\n \r\n Net zakatable assets:\r\n 0.00 $\r\n \r\n \r\n Nisab value (85g gold):\r\n ...\r\n \r\n \r\n Enter data to check eligibility\r\n \r\n \r\n \r\n\r\n \r\n \r\n Zakat due (2.5%)\r\n 0.00 $\r\n \r\n \r\n <a>\r\n \r\n Contact via WhatsApp for consultation and donation\r\n </a>\r\n \r\n \r\n \r\n \r\n\r\n\r\n// Zakat Calculator Logic\r\nlet zakatcalculatorPricesLoaded = false;\r\n\r\n// Initialize calculator when DOM is loaded\r\ndocument.addEventListener('DOMContentLoaded', () => {\r\n zakatcalculatorFetchPrices();\r\n zakatcalculatorCalculate();\r\n \r\n // Add input event listeners for real-time calculation\r\n const inputs = document.querySelectorAll('.zakatcalculator-section__input');\r\n inputs.forEach(input => {\r\n input.addEventListener('input', zakatcalculatorCalculate);\r\n });\r\n \r\n // Format numbers as user types\r\n inputs.forEach(input => {\r\n input.addEventListener('blur', function() {\r\n if (this.value) {\r\n const value = parseFloat(this.value);\r\n if (!isNaN(value)) {\r\n this.value = value.toLocaleString('en-US', {\r\n minimumFractionDigits: 2,\r\n maximumFractionDigits: 2\r\n });\r\n }\r\n }\r\n });\r\n \r\n input.addEventListener('focus', function() {\r\n if (this.value) {\r\n this.value = this.value.replace(/[^\\d.]/g, '');\r\n }\r\n });\r\n });\r\n});\r\n\r\n// Fetch metal prices\r\nasync function zakatcalculatorFetchPrices() {\r\n const goldInput = document.getElementById('goldPrice');\r\n const silverInput = document.getElementById('silverPrice');\r\n const refreshButton = document.querySelector('.zakatcalculator-section__refresh-button');\r\n const refreshIcon = document.querySelector('.zakatcalculator-section__refresh-icon');\r\n \r\n if (!refreshButton || !refreshIcon) return;\r\n \r\n // Show loading state\r\n refreshButton.disabled = true;\r\n refreshIcon.classList.add('zakatcalculator-section__refresh-icon--spinning');\r\n goldInput.classList.add('zakatcalculator-section__input--loading');\r\n silverInput.classList.add('zakatcalculator-section__input--loading');\r\n \r\n try {\r\n // Simulate API call with delay\r\n await new Promise(resolve => setTimeout(resolve, 1500));\r\n \r\n // Mock data (in a real app, you would fetch from an API)\r\n const liveGoldPrice = 76.50;\r\n const liveSilverPrice = 0.95;\r\n \r\n // Update inputs\r\n goldInput.value = liveGoldPrice.toFixed(2);\r\n silverInput.value = liveSilverPrice.toFixed(2);\r\n \r\n // Remove loading state\r\n goldInput.classList.remove('zakatcalculator-section__input--loading');\r\n silverInput.classList.remove('zakatcalculator-section__input--loading');\r\n goldInput.classList.add('zakatcalculator-section__input--valid');\r\n silverInput.classList.add('zakatcalculator-section__input--valid');\r\n \r\n zakatcalculatorPricesLoaded = true;\r\n \r\n // Show success feedback\r\n refreshButton.innerHTML = ' Updated';\r\n refreshButton.style.backgroundColor = '#617f67';\r\n refreshButton.style.color = 'white';\r\n \r\n setTimeout(() => {\r\n refreshButton.innerHTML = ' Refresh Prices';\r\n refreshButton.style.backgroundColor = '';\r\n refreshButton.style.color = '';\r\n }, 2000);\r\n \r\n } catch (error) {\r\n console.error(\"Failed to fetch prices\", error);\r\n \r\n // Fallback values\r\n goldInput.value = 75.00;\r\n silverInput.value = 0.90;\r\n \r\n // Show error state\r\n goldInput.classList.remove('zakatcalculator-section__input--loading');\r\n silverInput.classList.remove('zakatcalculator-section__input--loading');\r\n goldInput.classList.add('zakatcalculator-section__input--invalid');\r\n silverInput.classList.add('zakatcalculator-section__input--invalid');\r\n \r\n refreshButton.innerHTML = ' Update Failed';\r\n refreshButton.style.backgroundColor = '#dc2626';\r\n refreshButton.style.color = 'white';\r\n \r\n setTimeout(() => {\r\n refreshButton.innerHTML = ' Refresh Prices';\r\n refreshButton.style.backgroundColor = '';\r\n refreshButton.style.color = '';\r\n }, 2000);\r\n \r\n } finally {\r\n refreshButton.disabled = false;\r\n refreshIcon.classList.remove('zakatcalculator-section__refresh-icon--spinning');\r\n \r\n // Recalculate zakat\r\n zakatcalculatorCalculate();\r\n }\r\n}\r\n\r\n// Calculate zakat\r\nfunction zakatcalculatorCalculate() {\r\n const cashHand = parseFloat(document.getElementById('cashHand').value) || 0;\r\n const cashBank = parseFloat(document.getElementById('cashBank').value) || 0;\r\n const goldWeight = parseFloat(document.getElementById('goldWeight').value) || 0;\r\n const goldPrice = parseFloat(document.getElementById('goldPrice').value) || 0;\r\n const silverWeight = parseFloat(document.getElementById('silverWeight').value) || 0;\r\n const silverPrice = parseFloat(document.getElementById('silverPrice').value) || 0;\r\n \r\n // Calculate totals\r\n const totalAssets = cashHand + cashBank + (goldWeight * goldPrice) + (silverWeight * silverPrice);\r\n const nisabThreshold = 85 * goldPrice;\r\n \r\n // Update display\r\n document.getElementById('totalAssetsDisplay').textContent = \r\n formatCurrency(totalAssets);\r\n \r\n document.getElementById('netAssetsDisplay').textContent = \r\n formatCurrency(totalAssets);\r\n \r\n if (goldPrice > 0) {\r\n document.getElementById('nisabValueDisplay').textContent = \r\n formatCurrency(nisabThreshold);\r\n } else {\r\n document.getElementById('nisabValueDisplay').textContent = '...';\r\n }\r\n \r\n // Update status and final zakat\r\n const statusBadge = document.getElementById('statusBadge');\r\n const finalDisplay = document.getElementById('finalZakatDisplay');\r\n const payButton = document.querySelector('.zakatcalculator-section__pay-button');\r\n \r\n if (totalAssets >= nisabThreshold && goldPrice > 0 && zakatcalculatorPricesLoaded) {\r\n const zakatAmount = totalAssets * 0.025;\r\n finalDisplay.textContent = formatCurrency(zakatAmount);\r\n \r\n // Update status badge\r\n statusBadge.textContent = '✓ Zakat is due (Nisab reached)';\r\n statusBadge.className = 'zakatcalculator-section__status zakatcalculator-section__status--eligible';\r\n \r\n // Enable pay button\r\n payButton.disabled = false;\r\n payButton.innerHTML = ' Pay Zakat Now';\r\n \r\n } else {\r\n finalDisplay.textContent = '0.00 $';\r\n \r\n // Update status badge\r\n if (!zakatcalculatorPricesLoaded) {\r\n statusBadge.textContent = 'Enter data to check eligibility';\r\n statusBadge.className = 'zakatcalculator-section__status zakatcalculator-section__status--not-eligible';\r\n } else if (totalAssets < nisabThreshold) {\r\n statusBadge.textContent = 'Zakat is not due (Nisab not reached)';\r\n statusBadge.className = 'zakatcalculator-section__status zakatcalculator-section__status--not-eligible';\r\n } else {\r\n statusBadge.textContent = 'Enter data to check eligibility';\r\n statusBadge.className = 'zakatcalculator-section__status zakatcalculator-section__status--not-eligible';\r\n }\r\n \r\n // Disable pay button\r\n payButton.disabled = true;\r\n payButton.innerHTML = ' Pay Zakat Now';\r\n }\r\n}\r\n\r\n// Format currency\r\nfunction formatCurrency(amount) {\r\n return new Intl.NumberFormat('en-US', {\r\n style: 'currency',\r\n currency: 'USD',\r\n minimumFractionDigits: 2,\r\n maximumFractionDigits: 2\r\n }).format(amount);\r\n}\r\n\r\n// Add zakat to cart\r\nfunction zakatcalculatorAddToCart() {\r\n const amountText = document.getElementById('finalZakatDisplay').textContent;\r\n const amount = parseFloat(amountText.replace(/[^0-9.-]+/g, \"\"));\r\n \r\n if (amount > 0 && !isNaN(amount)) {\r\n // Use your existing addToCart function\r\n if (typeof addToCart === 'function') {\r\n addToCart('Calculated Zakat', amount, 'Zakat');\r\n } else {\r\n // Fallback if addToCart is not defined\r\n alert(`Calculated Zakat amount: ${amountText}`);\r\n }\r\n } else {\r\n alert(\"Invalid zakat amount. Please check your inputs.\");\r\n }\r\n}\r\n\r\n// Input validation\r\nfunction validateZakatInput(input) {\r\n const value = parseFloat(input.value);\r\n const min = parseFloat(input.getAttribute('min')) || 0;\r\n \r\n if (isNaN(value) || value < min) {\r\n input.classList.add('zakatcalculator-section__input--invalid');\r\n return false;\r\n } else {\r\n input.classList.remove('zakatcalculator-section__input--invalid');\r\n input.classList.add('zakatcalculator-section__input--valid');\r\n return true;\r\n }\r\n}","animate_delay":"0"},"editing":false,"element_name":"gva_text_noeditor"}],"editing":false,"element_name":"gva_column"}],"editing":false,"element_name":"gva_row"},{"settings":{"element":"gva_row","bg_particles":"off","bg_position":"center top","bg_repeat":"no-repeat","bg_attachment":"scroll","bg_size":"cover","style_space":"remove_margin remove_padding remove_padding_col","layout":"container-fw","class":"partner","margin_top":"30","margin_bottom":"30"},"columns":[{"settings":{"element":"gva_column"},"col_lg":12,"elements":[{"settings":{"content":"\r\n \r\n Strategic Partnerships\r\n Our partners in creating hope\r\n \r\n \r\n ","animate_delay":"0"},"editing":false,"element_name":"gva_text_noeditor"},{"settings":{"title_admin":"Partners: Partners Block - en","block_drupal":"views_block__partners_block_2","hidden_title":"on","align_title":"title-align-right","remove_margin":"on","style_text":"text-dark","animate_delay":"0"},"editing":false,"element_name":"gva_drupal_block"}],"editing":false,"element_name":"gva_column"}],"editing":false,"element_name":"gva_row"}]') (Line: 47)
Drupal\gavias_content_builder\Plugin\Field\FieldFormatter\GaviasContentBuilderFormatter->viewElements(Object, 'en') (Line: 89)
Drupal\Core\Field\FormatterBase->view(Object, 'en') (Line: 263)
Drupal\Core\Entity\Entity\EntityViewDisplay->buildMultiple(Array) (Line: 351)
Drupal\Core\Entity\EntityViewBuilder->buildComponents(Array, Array, Array, 'full') (Line: 24)
Drupal\node\NodeViewBuilder->buildComponents(Array, Array, Array, 'full') (Line: 293)
Drupal\Core\Entity\EntityViewBuilder->buildMultiple(Array) (Line: 250)
Drupal\Core\Entity\EntityViewBuilder->build(Array)
call_user_func_array(Array, Array) (Line: 100)
Drupal\Core\Render\Renderer->doTrustedCallback(Array, Array, 'Render #pre_render callbacks must be methods of a class that implements \Drupal\Core\Security\TrustedCallbackInterface or be an anonymous function. The callback was %s. Support for this callback implementation is deprecated in 8.8.0 and will be removed in Drupal 9.0.0. See https://www.drupal.org/node/2966725', 'silenced_deprecation', 'Drupal\Core\Render\Element\RenderCallbackInterface') (Line: 781)
Drupal\Core\Render\Renderer->doCallback('#pre_render', Array, Array) (Line: 372)
Drupal\Core\Render\Renderer->doRender(Array, ) (Line: 200)
Drupal\Core\Render\Renderer->render(Array, ) (Line: 226)
Drupal\Core\Render\MainContent\HtmlRenderer->Drupal\Core\Render\MainContent\{closure}() (Line: 573)
Drupal\Core\Render\Renderer->executeInRenderContext(Object, Object) (Line: 227)
Drupal\Core\Render\MainContent\HtmlRenderer->prepare(Array, Object, Object) (Line: 117)
Drupal\Core\Render\MainContent\HtmlRenderer->renderResponse(Array, Object, Object) (Line: 90)
Drupal\Core\EventSubscriber\MainContentViewSubscriber->onViewRenderArray(Object, 'kernel.view', Object)
call_user_func(Array, Object, 'kernel.view', Object) (Line: 111)
Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher->dispatch('kernel.view', Object) (Line: 156)
Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object, 1) (Line: 68)
Symfony\Component\HttpKernel\HttpKernel->handle(Object, 1, 1) (Line: 57)
Drupal\Core\StackMiddleware\Session->handle(Object, 1, 1) (Line: 47)
Drupal\Core\StackMiddleware\KernelPreHandle->handle(Object, 1, 1) (Line: 191)
Drupal\page_cache\StackMiddleware\PageCache->fetch(Object, 1, 1) (Line: 128)
Drupal\page_cache\StackMiddleware\PageCache->lookup(Object, 1, 1) (Line: 82)
Drupal\page_cache\StackMiddleware\PageCache->handle(Object, 1, 1) (Line: 47)
Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle(Object, 1, 1) (Line: 52)
Drupal\Core\StackMiddleware\NegotiationMiddleware->handle(Object, 1, 1) (Line: 23)
Stack\StackedHttpKernel->handle(Object, 1, 1) (Line: 708)
Drupal\Core\DrupalKernel->handle(Object) (Line: 19)
- Deprecated function: implode(): Passing glue string after array is deprecated. Swap the parameters in element_gva_row->render_content() (line 317 of themes/gavias_kunco/gva_content_builder/gva_row.php).
element_gva_row->render_content(Array, '
Our News
News that tells the story of giving
') (Line: 110)
gavias_content_builder_render_element('gva_row', Array, '
Our News
News that tells the story of giving
') (Line: 62)
gavias_content_builder_render_el(Array) (Line: 22)
gavias_content_builder_frontend('[{"settings":{"bg_particles":"off","bg_position":"center top","bg_repeat":"no-repeat","bg_attachment":"scroll","bg_size":"cover","style_space":"remove_padding","layout":"container-fw"},"columns":[{"settings":{"element":"gva_column","bg_position":"center top","bg_repeat":"no-repeat","bg_attachment":"scroll","bg_size":"cover","el_class":"front"},"col_lg":12,"elements":[{"settings":{"content":"\r\n \r\n \r\n \r\n \r\n Urgent Appeal\r\n \r\n Be a helping hand for them in\r\n times of crisis\r\n \r\n \r\n At \"Wejdan Charity\", we work with full transparency to deliver your donations to those in need in conflict and poverty-stricken areas.\r\n \r\n \r\n <a>\r\n Charity Donations \r\n </a>\r\n <a>\r\n Our Projects \r\n </a>\r\n \r\n \r\n \r\n \r\n","animate_delay":"0"},"editing":false,"element_name":"gva_text_noeditor"}],"editing":false,"element_name":"gva_column"}],"editing":false,"element_name":"gva_row"},{"settings":{"element":"gva_row","bg_particles":"off","bg_position":"center top","bg_repeat":"no-repeat","bg_attachment":"scroll","bg_size":"cover","style_space":"remove_padding","layout":"container","class":"before-help-region"},"columns":[{"settings":{"element":"gva_column"},"col_lg":12,"elements":[{"settings":{"title":"Take action for animals now","link":"#","button_title":"Donation Now","button_align":"button-right-v2","style_text":"text-light","style_button":"btn-theme","donorbox":"off","target":"off","el_class":"margin","animate":"fade-up","animate_delay":"0"},"editing":false,"element_name":"gva_call_to_action"}],"editing":false,"element_name":"gva_column"}],"editing":false,"element_name":"gva_row"},{"settings":{"element":"gva_row","bg_particles":"off","bg_position":"center top","bg_repeat":"no-repeat","bg_attachment":"scroll","bg_size":"cover","style_space":"remove_padding","layout":"container-fw","bg_color":"#f9fafb"},"columns":[{"settings":{"element":"gva_column","bg_position":"center top","bg_repeat":"no-repeat","bg_attachment":"scroll","bg_size":"cover","el_class":"about"},"col_lg":12,"elements":[{"settings":{"content":"\r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n \r\n \r\n Who We Are\r\n \r\n \r\n We plant hope.. \r\n and build people and the future\r\n \r\n \r\n Wejdan Charity is a leading humanitarian organization, founded with an ambitious vision to be a bridge of الخير between donors and those in need.\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n Development Stages\r\n A continuous journey of growth\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n Areas of Work\r\n We reach where the need is\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \"We work with passion to bring smiles\"\r\n \r\n \r\n \r\n \r\n \r\n","animate_delay":"0"},"editing":false,"element_name":"gva_text_noeditor"}],"editing":false,"element_name":"gva_column"}],"editing":false,"element_name":"gva_row"},{"settings":{"element":"gva_row","bg_particles":"off","bg_position":"center top","bg_repeat":"no-repeat","bg_attachment":"scroll","bg_size":"cover","style_space":"remove_margin remove_padding remove_padding_col","layout":"container-fw","class":"partner","margin_top":"30","margin_bottom":"30"},"columns":[{"settings":{"element":"gva_column"},"col_lg":12,"elements":[{"settings":{"content":"\r\n\r\n \r\n \r\n Initiatives & Programs\r\n Our Areas of Work\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n Ongoing Charity\r\n Water wells, mosque construction\r\n \r\n \r\n \r\n \r\n \r\n \r\n Student Sponsorship\r\n Building the future through education\r\n \r\n \r\n \r\n \r\n \r\n \r\n Humanitarian Cases\r\n Patient treatment, surgeries\r\n \r\n \r\n \r\n \r\n \r\n \r\n Development Projects\r\n Empowering productive families\r\n \r\n \r\n<a>Learn more about our programs and initiatives</a>\r\n \r\n","animate_delay":"0"},"editing":false,"element_name":"gva_text_noeditor"}],"editing":false,"element_name":"gva_column"}],"editing":false,"element_name":"gva_row"},{"settings":{"element":"gva_row","bg_particles":"off","bg_position":"center top","bg_repeat":"no-repeat","bg_attachment":"scroll","bg_size":"cover","style_space":"remove_margin remove_padding remove_padding_col","layout":"container","class":"newsfront"},"columns":[{"settings":{"element":"gva_column"},"col_lg":12,"elements":[{"settings":{"content":"\r\n \r\n \r\n Our News\r\n \r\n \r\n \r\nNews that tells the story of giving \r\n \r\n","animate_delay":"0"},"editing":false,"element_name":"gva_text_noeditor"},{"settings":{"title_admin":"news: news Block -en","block_drupal":"views_block__news_block_3","hidden_title":"on","align_title":"title-align-left","remove_margin":"on","style_text":"text-dark","animate_delay":"0"},"editing":false,"element_name":"gva_drupal_block"}],"editing":false,"element_name":"gva_column"}],"editing":false,"element_name":"gva_row"},{"settings":{"bg_particles":"off","bg_position":"center top","bg_repeat":"no-repeat","bg_attachment":"scroll","bg_size":"cover","style_space":"remove_padding","layout":"container-fw","element":"gva_row","class":"sliderfrontpage"},"columns":[{"settings":{"element":"gva_column","bg_position":"center top","bg_repeat":"no-repeat","bg_attachment":"scroll","bg_size":"cover"},"col_lg":12,"elements":[{"settings":{"title_admin":"news: campigns-en","block_drupal":"views_block__news_block_5","hidden_title":"on","align_title":"title-align-right","remove_margin":"on","style_text":"text-dark","animate_delay":"0"},"editing":false,"element_name":"gva_drupal_block"}],"editing":false,"element_name":"gva_column"}],"editing":false,"element_name":"gva_row"},{"settings":{"element":"gva_row","bg_particles":"off","bg_position":"center top","bg_repeat":"no-repeat","bg_attachment":"scroll","bg_size":"cover","style_space":"remove_margin remove_padding remove_padding_col","layout":"container-fw","class":"partner"},"columns":[{"settings":{"element":"gva_column"},"col_lg":12,"elements":[{"settings":{"content":"\r\n \r\n \r\n \r\n Our Distinguished Projects\r\n \r\n \r\n \r\n At Wejdan Charity, we strive to provide support and assistance to communities in need who are affected by disasters, crises, and wars, with the aim of improving quality of life and promoting sustainable development. Our projects span across several areas:\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n Relief Projects\r\n Emergency response to disasters and wars, providing food and medicine.\r\n \r\n<a> Browse Projects </a>\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n Development Projects\r\n Empowering communities and building capacities.\r\n \r\n<a> Browse Projects </a>\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n Seasonal Projects\r\n Ramadan campaigns, Qurbani, and winter clothing.\r\n \r\n<a> Browse Projects </a>\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n Endowment Projects\r\n An investment for the hereafter—mosques, wells, and charitable endowments.\r\n<a> Browse Projects </a>\r\n \r\n \r\n \r\n \r\n","animate_delay":"0"},"editing":false,"element_name":"gva_text_noeditor"}],"editing":false,"element_name":"gva_column"}],"editing":false,"element_name":"gva_row"},{"settings":{"element":"gva_row","bg_particles":"off","bg_position":"center top","bg_repeat":"no-repeat","bg_attachment":"scroll","bg_size":"cover","style_space":"remove_margin remove_padding remove_padding_col","layout":"container-fw","class":"partner"},"columns":[{"settings":{"element":"gva_column"},"col_lg":12,"elements":[{"settings":{"content":"\r\n \r\n \r\n\r\n \r\n \r\n Our Achievements in Numbers\r\n Your trust makes the difference\r\n \r\n \r\n\r\n \r\n \r\n 0\r\n Beneficiaries worldwide\r\n \r\n \r\n \r\n 0\r\n Projects implemented\r\n \r\n \r\n \r\n 0\r\n Countries we operate in\r\n \r\n \r\n \r\n 0\r\n Volunteers\r\n \r\n \r\n \r\n \r\n\r\n\r\n// Enhanced counter animation for facts section\r\nfunction animateFactsCounters() {\r\n const statNumbers = document.querySelectorAll('.facts-section__stat-number');\r\n \r\n const observer = new IntersectionObserver((entries) => {\r\n entries.forEach(entry => {\r\n if (entry.isIntersecting) {\r\n const counter = entry.target;\r\n const target = parseInt(counter.getAttribute('data-target'));\r\n const duration = 2000;\r\n const increment = target / (duration / 16);\r\n \r\n let current = 0;\r\n const updateCounter = () => {\r\n current += increment;\r\n if (current < target) {\r\n // Format number with K for thousands\r\n let displayNum = Math.ceil(current);\r\n if (displayNum >= 1000) {\r\n counter.textContent = (displayNum / 1000).toFixed(1).replace('.0', '') + 'K';\r\n } else {\r\n counter.textContent = displayNum.toLocaleString();\r\n }\r\n requestAnimationFrame(updateCounter);\r\n } else {\r\n // Final formatting\r\n if (target >= 1000) {\r\n counter.textContent = (target / 1000).toFixed(1).replace('.0', '') + 'K';\r\n counter.classList.add('formatted');\r\n } else {\r\n counter.textContent = target.toLocaleString();\r\n }\r\n counter.classList.add('animated');\r\n setTimeout(() => counter.classList.remove('animated'), 600);\r\n }\r\n };\r\n updateCounter();\r\n observer.unobserve(counter);\r\n }\r\n });\r\n }, { threshold: 0.5, rootMargin: '0px 0px -50px 0px' });\r\n \r\n statNumbers.forEach(counter => observer.observe(counter));\r\n}\r\n\r\n// Call this function when DOM is loaded\r\ndocument.addEventListener('DOMContentLoaded', () => {\r\n animateFactsCounters();\r\n});","animate_delay":"0"},"editing":false,"element_name":"gva_text_noeditor"}],"editing":false,"element_name":"gva_column"}],"editing":false,"element_name":"gva_row"},{"settings":{"element":"gva_row","bg_particles":"off","bg_position":"center top","bg_repeat":"no-repeat","bg_attachment":"scroll","bg_size":"cover","style_space":"remove_margin remove_padding remove_padding_col","layout":"container-fw","class":"zakatcalc"},"columns":[{"settings":{"element":"gva_column"},"col_lg":12,"elements":[{"settings":{"content":"\r\n\r\n \r\n \r\n \r\n \r\nSmart Zakat Calculator\r\n A precise and comprehensive tool\r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n \r\n \r\n Money & Savings\r\n \r\n \r\n \r\n Cash (on hand or at home)\r\n \r\n \r\n $\r\n \r\n \r\n \r\n Bank balances\r\n \r\n \r\n $\r\n \r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n Gold & Silver\r\n \r\n \r\n Refresh Prices\r\n \r\n \r\n \r\n \r\n \r\n Gold weight (grams)\r\n \r\n \r\n \r\n \r\n Current gold price per gram\r\n \r\n Live\r\n \r\n \r\n \r\n \r\n $ / gram\r\n \r\n \r\n \r\n\r\n \r\n \r\n Silver weight (grams)\r\n \r\n \r\n \r\n \r\n Current silver price per gram\r\n \r\n Live\r\n \r\n \r\n \r\n \r\n $ / gram\r\n \r\n \r\n \r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n Zakat Summary\r\n \r\n \r\n Total assets:\r\n 0.00 $\r\n \r\n \r\n Net zakatable assets:\r\n 0.00 $\r\n \r\n \r\n Nisab value (85g gold):\r\n ...\r\n \r\n \r\n Enter data to check eligibility\r\n \r\n \r\n \r\n\r\n \r\n \r\n Zakat due (2.5%)\r\n 0.00 $\r\n \r\n \r\n <a>\r\n \r\n Contact via WhatsApp for consultation and donation\r\n </a>\r\n \r\n \r\n \r\n \r\n\r\n\r\n// Zakat Calculator Logic\r\nlet zakatcalculatorPricesLoaded = false;\r\n\r\n// Initialize calculator when DOM is loaded\r\ndocument.addEventListener('DOMContentLoaded', () => {\r\n zakatcalculatorFetchPrices();\r\n zakatcalculatorCalculate();\r\n \r\n // Add input event listeners for real-time calculation\r\n const inputs = document.querySelectorAll('.zakatcalculator-section__input');\r\n inputs.forEach(input => {\r\n input.addEventListener('input', zakatcalculatorCalculate);\r\n });\r\n \r\n // Format numbers as user types\r\n inputs.forEach(input => {\r\n input.addEventListener('blur', function() {\r\n if (this.value) {\r\n const value = parseFloat(this.value);\r\n if (!isNaN(value)) {\r\n this.value = value.toLocaleString('en-US', {\r\n minimumFractionDigits: 2,\r\n maximumFractionDigits: 2\r\n });\r\n }\r\n }\r\n });\r\n \r\n input.addEventListener('focus', function() {\r\n if (this.value) {\r\n this.value = this.value.replace(/[^\\d.]/g, '');\r\n }\r\n });\r\n });\r\n});\r\n\r\n// Fetch metal prices\r\nasync function zakatcalculatorFetchPrices() {\r\n const goldInput = document.getElementById('goldPrice');\r\n const silverInput = document.getElementById('silverPrice');\r\n const refreshButton = document.querySelector('.zakatcalculator-section__refresh-button');\r\n const refreshIcon = document.querySelector('.zakatcalculator-section__refresh-icon');\r\n \r\n if (!refreshButton || !refreshIcon) return;\r\n \r\n // Show loading state\r\n refreshButton.disabled = true;\r\n refreshIcon.classList.add('zakatcalculator-section__refresh-icon--spinning');\r\n goldInput.classList.add('zakatcalculator-section__input--loading');\r\n silverInput.classList.add('zakatcalculator-section__input--loading');\r\n \r\n try {\r\n // Simulate API call with delay\r\n await new Promise(resolve => setTimeout(resolve, 1500));\r\n \r\n // Mock data (in a real app, you would fetch from an API)\r\n const liveGoldPrice = 76.50;\r\n const liveSilverPrice = 0.95;\r\n \r\n // Update inputs\r\n goldInput.value = liveGoldPrice.toFixed(2);\r\n silverInput.value = liveSilverPrice.toFixed(2);\r\n \r\n // Remove loading state\r\n goldInput.classList.remove('zakatcalculator-section__input--loading');\r\n silverInput.classList.remove('zakatcalculator-section__input--loading');\r\n goldInput.classList.add('zakatcalculator-section__input--valid');\r\n silverInput.classList.add('zakatcalculator-section__input--valid');\r\n \r\n zakatcalculatorPricesLoaded = true;\r\n \r\n // Show success feedback\r\n refreshButton.innerHTML = ' Updated';\r\n refreshButton.style.backgroundColor = '#617f67';\r\n refreshButton.style.color = 'white';\r\n \r\n setTimeout(() => {\r\n refreshButton.innerHTML = ' Refresh Prices';\r\n refreshButton.style.backgroundColor = '';\r\n refreshButton.style.color = '';\r\n }, 2000);\r\n \r\n } catch (error) {\r\n console.error(\"Failed to fetch prices\", error);\r\n \r\n // Fallback values\r\n goldInput.value = 75.00;\r\n silverInput.value = 0.90;\r\n \r\n // Show error state\r\n goldInput.classList.remove('zakatcalculator-section__input--loading');\r\n silverInput.classList.remove('zakatcalculator-section__input--loading');\r\n goldInput.classList.add('zakatcalculator-section__input--invalid');\r\n silverInput.classList.add('zakatcalculator-section__input--invalid');\r\n \r\n refreshButton.innerHTML = ' Update Failed';\r\n refreshButton.style.backgroundColor = '#dc2626';\r\n refreshButton.style.color = 'white';\r\n \r\n setTimeout(() => {\r\n refreshButton.innerHTML = ' Refresh Prices';\r\n refreshButton.style.backgroundColor = '';\r\n refreshButton.style.color = '';\r\n }, 2000);\r\n \r\n } finally {\r\n refreshButton.disabled = false;\r\n refreshIcon.classList.remove('zakatcalculator-section__refresh-icon--spinning');\r\n \r\n // Recalculate zakat\r\n zakatcalculatorCalculate();\r\n }\r\n}\r\n\r\n// Calculate zakat\r\nfunction zakatcalculatorCalculate() {\r\n const cashHand = parseFloat(document.getElementById('cashHand').value) || 0;\r\n const cashBank = parseFloat(document.getElementById('cashBank').value) || 0;\r\n const goldWeight = parseFloat(document.getElementById('goldWeight').value) || 0;\r\n const goldPrice = parseFloat(document.getElementById('goldPrice').value) || 0;\r\n const silverWeight = parseFloat(document.getElementById('silverWeight').value) || 0;\r\n const silverPrice = parseFloat(document.getElementById('silverPrice').value) || 0;\r\n \r\n // Calculate totals\r\n const totalAssets = cashHand + cashBank + (goldWeight * goldPrice) + (silverWeight * silverPrice);\r\n const nisabThreshold = 85 * goldPrice;\r\n \r\n // Update display\r\n document.getElementById('totalAssetsDisplay').textContent = \r\n formatCurrency(totalAssets);\r\n \r\n document.getElementById('netAssetsDisplay').textContent = \r\n formatCurrency(totalAssets);\r\n \r\n if (goldPrice > 0) {\r\n document.getElementById('nisabValueDisplay').textContent = \r\n formatCurrency(nisabThreshold);\r\n } else {\r\n document.getElementById('nisabValueDisplay').textContent = '...';\r\n }\r\n \r\n // Update status and final zakat\r\n const statusBadge = document.getElementById('statusBadge');\r\n const finalDisplay = document.getElementById('finalZakatDisplay');\r\n const payButton = document.querySelector('.zakatcalculator-section__pay-button');\r\n \r\n if (totalAssets >= nisabThreshold && goldPrice > 0 && zakatcalculatorPricesLoaded) {\r\n const zakatAmount = totalAssets * 0.025;\r\n finalDisplay.textContent = formatCurrency(zakatAmount);\r\n \r\n // Update status badge\r\n statusBadge.textContent = '✓ Zakat is due (Nisab reached)';\r\n statusBadge.className = 'zakatcalculator-section__status zakatcalculator-section__status--eligible';\r\n \r\n // Enable pay button\r\n payButton.disabled = false;\r\n payButton.innerHTML = ' Pay Zakat Now';\r\n \r\n } else {\r\n finalDisplay.textContent = '0.00 $';\r\n \r\n // Update status badge\r\n if (!zakatcalculatorPricesLoaded) {\r\n statusBadge.textContent = 'Enter data to check eligibility';\r\n statusBadge.className = 'zakatcalculator-section__status zakatcalculator-section__status--not-eligible';\r\n } else if (totalAssets < nisabThreshold) {\r\n statusBadge.textContent = 'Zakat is not due (Nisab not reached)';\r\n statusBadge.className = 'zakatcalculator-section__status zakatcalculator-section__status--not-eligible';\r\n } else {\r\n statusBadge.textContent = 'Enter data to check eligibility';\r\n statusBadge.className = 'zakatcalculator-section__status zakatcalculator-section__status--not-eligible';\r\n }\r\n \r\n // Disable pay button\r\n payButton.disabled = true;\r\n payButton.innerHTML = ' Pay Zakat Now';\r\n }\r\n}\r\n\r\n// Format currency\r\nfunction formatCurrency(amount) {\r\n return new Intl.NumberFormat('en-US', {\r\n style: 'currency',\r\n currency: 'USD',\r\n minimumFractionDigits: 2,\r\n maximumFractionDigits: 2\r\n }).format(amount);\r\n}\r\n\r\n// Add zakat to cart\r\nfunction zakatcalculatorAddToCart() {\r\n const amountText = document.getElementById('finalZakatDisplay').textContent;\r\n const amount = parseFloat(amountText.replace(/[^0-9.-]+/g, \"\"));\r\n \r\n if (amount > 0 && !isNaN(amount)) {\r\n // Use your existing addToCart function\r\n if (typeof addToCart === 'function') {\r\n addToCart('Calculated Zakat', amount, 'Zakat');\r\n } else {\r\n // Fallback if addToCart is not defined\r\n alert(`Calculated Zakat amount: ${amountText}`);\r\n }\r\n } else {\r\n alert(\"Invalid zakat amount. Please check your inputs.\");\r\n }\r\n}\r\n\r\n// Input validation\r\nfunction validateZakatInput(input) {\r\n const value = parseFloat(input.value);\r\n const min = parseFloat(input.getAttribute('min')) || 0;\r\n \r\n if (isNaN(value) || value < min) {\r\n input.classList.add('zakatcalculator-section__input--invalid');\r\n return false;\r\n } else {\r\n input.classList.remove('zakatcalculator-section__input--invalid');\r\n input.classList.add('zakatcalculator-section__input--valid');\r\n return true;\r\n }\r\n}","animate_delay":"0"},"editing":false,"element_name":"gva_text_noeditor"}],"editing":false,"element_name":"gva_column"}],"editing":false,"element_name":"gva_row"},{"settings":{"element":"gva_row","bg_particles":"off","bg_position":"center top","bg_repeat":"no-repeat","bg_attachment":"scroll","bg_size":"cover","style_space":"remove_margin remove_padding remove_padding_col","layout":"container-fw","class":"partner","margin_top":"30","margin_bottom":"30"},"columns":[{"settings":{"element":"gva_column"},"col_lg":12,"elements":[{"settings":{"content":"\r\n \r\n Strategic Partnerships\r\n Our partners in creating hope\r\n \r\n \r\n ","animate_delay":"0"},"editing":false,"element_name":"gva_text_noeditor"},{"settings":{"title_admin":"Partners: Partners Block - en","block_drupal":"views_block__partners_block_2","hidden_title":"on","align_title":"title-align-right","remove_margin":"on","style_text":"text-dark","animate_delay":"0"},"editing":false,"element_name":"gva_drupal_block"}],"editing":false,"element_name":"gva_column"}],"editing":false,"element_name":"gva_row"}]') (Line: 47)
Drupal\gavias_content_builder\Plugin\Field\FieldFormatter\GaviasContentBuilderFormatter->viewElements(Object, 'en') (Line: 89)
Drupal\Core\Field\FormatterBase->view(Object, 'en') (Line: 263)
Drupal\Core\Entity\Entity\EntityViewDisplay->buildMultiple(Array) (Line: 351)
Drupal\Core\Entity\EntityViewBuilder->buildComponents(Array, Array, Array, 'full') (Line: 24)
Drupal\node\NodeViewBuilder->buildComponents(Array, Array, Array, 'full') (Line: 293)
Drupal\Core\Entity\EntityViewBuilder->buildMultiple(Array) (Line: 250)
Drupal\Core\Entity\EntityViewBuilder->build(Array)
call_user_func_array(Array, Array) (Line: 100)
Drupal\Core\Render\Renderer->doTrustedCallback(Array, Array, 'Render #pre_render callbacks must be methods of a class that implements \Drupal\Core\Security\TrustedCallbackInterface or be an anonymous function. The callback was %s. Support for this callback implementation is deprecated in 8.8.0 and will be removed in Drupal 9.0.0. See https://www.drupal.org/node/2966725', 'silenced_deprecation', 'Drupal\Core\Render\Element\RenderCallbackInterface') (Line: 781)
Drupal\Core\Render\Renderer->doCallback('#pre_render', Array, Array) (Line: 372)
Drupal\Core\Render\Renderer->doRender(Array, ) (Line: 200)
Drupal\Core\Render\Renderer->render(Array, ) (Line: 226)
Drupal\Core\Render\MainContent\HtmlRenderer->Drupal\Core\Render\MainContent\{closure}() (Line: 573)
Drupal\Core\Render\Renderer->executeInRenderContext(Object, Object) (Line: 227)
Drupal\Core\Render\MainContent\HtmlRenderer->prepare(Array, Object, Object) (Line: 117)
Drupal\Core\Render\MainContent\HtmlRenderer->renderResponse(Array, Object, Object) (Line: 90)
Drupal\Core\EventSubscriber\MainContentViewSubscriber->onViewRenderArray(Object, 'kernel.view', Object)
call_user_func(Array, Object, 'kernel.view', Object) (Line: 111)
Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher->dispatch('kernel.view', Object) (Line: 156)
Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object, 1) (Line: 68)
Symfony\Component\HttpKernel\HttpKernel->handle(Object, 1, 1) (Line: 57)
Drupal\Core\StackMiddleware\Session->handle(Object, 1, 1) (Line: 47)
Drupal\Core\StackMiddleware\KernelPreHandle->handle(Object, 1, 1) (Line: 191)
Drupal\page_cache\StackMiddleware\PageCache->fetch(Object, 1, 1) (Line: 128)
Drupal\page_cache\StackMiddleware\PageCache->lookup(Object, 1, 1) (Line: 82)
Drupal\page_cache\StackMiddleware\PageCache->handle(Object, 1, 1) (Line: 47)
Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle(Object, 1, 1) (Line: 52)
Drupal\Core\StackMiddleware\NegotiationMiddleware->handle(Object, 1, 1) (Line: 23)
Stack\StackedHttpKernel->handle(Object, 1, 1) (Line: 708)
Drupal\Core\DrupalKernel->handle(Object) (Line: 19)
- Deprecated function: implode(): Passing glue string after array is deprecated. Swap the parameters in element_gva_drupal_block->render_content() (line 106 of themes/gavias_kunco/gva_content_builder/gva_drupal_block.php).
element_gva_drupal_block->render_content(Array, '') (Line: 110)
gavias_content_builder_render_element('gva_drupal_block', Array) (Line: 54)
gavias_content_builder_render_el(Array) (Line: 22)
gavias_content_builder_frontend('[{"settings":{"bg_particles":"off","bg_position":"center top","bg_repeat":"no-repeat","bg_attachment":"scroll","bg_size":"cover","style_space":"remove_padding","layout":"container-fw"},"columns":[{"settings":{"element":"gva_column","bg_position":"center top","bg_repeat":"no-repeat","bg_attachment":"scroll","bg_size":"cover","el_class":"front"},"col_lg":12,"elements":[{"settings":{"content":"\r\n \r\n \r\n \r\n \r\n Urgent Appeal\r\n \r\n Be a helping hand for them in\r\n times of crisis\r\n \r\n \r\n At \"Wejdan Charity\", we work with full transparency to deliver your donations to those in need in conflict and poverty-stricken areas.\r\n \r\n \r\n <a>\r\n Charity Donations \r\n </a>\r\n <a>\r\n Our Projects \r\n </a>\r\n \r\n \r\n \r\n \r\n","animate_delay":"0"},"editing":false,"element_name":"gva_text_noeditor"}],"editing":false,"element_name":"gva_column"}],"editing":false,"element_name":"gva_row"},{"settings":{"element":"gva_row","bg_particles":"off","bg_position":"center top","bg_repeat":"no-repeat","bg_attachment":"scroll","bg_size":"cover","style_space":"remove_padding","layout":"container","class":"before-help-region"},"columns":[{"settings":{"element":"gva_column"},"col_lg":12,"elements":[{"settings":{"title":"Take action for animals now","link":"#","button_title":"Donation Now","button_align":"button-right-v2","style_text":"text-light","style_button":"btn-theme","donorbox":"off","target":"off","el_class":"margin","animate":"fade-up","animate_delay":"0"},"editing":false,"element_name":"gva_call_to_action"}],"editing":false,"element_name":"gva_column"}],"editing":false,"element_name":"gva_row"},{"settings":{"element":"gva_row","bg_particles":"off","bg_position":"center top","bg_repeat":"no-repeat","bg_attachment":"scroll","bg_size":"cover","style_space":"remove_padding","layout":"container-fw","bg_color":"#f9fafb"},"columns":[{"settings":{"element":"gva_column","bg_position":"center top","bg_repeat":"no-repeat","bg_attachment":"scroll","bg_size":"cover","el_class":"about"},"col_lg":12,"elements":[{"settings":{"content":"\r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n \r\n \r\n Who We Are\r\n \r\n \r\n We plant hope.. \r\n and build people and the future\r\n \r\n \r\n Wejdan Charity is a leading humanitarian organization, founded with an ambitious vision to be a bridge of الخير between donors and those in need.\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n Development Stages\r\n A continuous journey of growth\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n Areas of Work\r\n We reach where the need is\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \"We work with passion to bring smiles\"\r\n \r\n \r\n \r\n \r\n \r\n","animate_delay":"0"},"editing":false,"element_name":"gva_text_noeditor"}],"editing":false,"element_name":"gva_column"}],"editing":false,"element_name":"gva_row"},{"settings":{"element":"gva_row","bg_particles":"off","bg_position":"center top","bg_repeat":"no-repeat","bg_attachment":"scroll","bg_size":"cover","style_space":"remove_margin remove_padding remove_padding_col","layout":"container-fw","class":"partner","margin_top":"30","margin_bottom":"30"},"columns":[{"settings":{"element":"gva_column"},"col_lg":12,"elements":[{"settings":{"content":"\r\n\r\n \r\n \r\n Initiatives & Programs\r\n Our Areas of Work\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n Ongoing Charity\r\n Water wells, mosque construction\r\n \r\n \r\n \r\n \r\n \r\n \r\n Student Sponsorship\r\n Building the future through education\r\n \r\n \r\n \r\n \r\n \r\n \r\n Humanitarian Cases\r\n Patient treatment, surgeries\r\n \r\n \r\n \r\n \r\n \r\n \r\n Development Projects\r\n Empowering productive families\r\n \r\n \r\n<a>Learn more about our programs and initiatives</a>\r\n \r\n","animate_delay":"0"},"editing":false,"element_name":"gva_text_noeditor"}],"editing":false,"element_name":"gva_column"}],"editing":false,"element_name":"gva_row"},{"settings":{"element":"gva_row","bg_particles":"off","bg_position":"center top","bg_repeat":"no-repeat","bg_attachment":"scroll","bg_size":"cover","style_space":"remove_margin remove_padding remove_padding_col","layout":"container","class":"newsfront"},"columns":[{"settings":{"element":"gva_column"},"col_lg":12,"elements":[{"settings":{"content":"\r\n \r\n \r\n Our News\r\n \r\n \r\n \r\nNews that tells the story of giving \r\n \r\n","animate_delay":"0"},"editing":false,"element_name":"gva_text_noeditor"},{"settings":{"title_admin":"news: news Block -en","block_drupal":"views_block__news_block_3","hidden_title":"on","align_title":"title-align-left","remove_margin":"on","style_text":"text-dark","animate_delay":"0"},"editing":false,"element_name":"gva_drupal_block"}],"editing":false,"element_name":"gva_column"}],"editing":false,"element_name":"gva_row"},{"settings":{"bg_particles":"off","bg_position":"center top","bg_repeat":"no-repeat","bg_attachment":"scroll","bg_size":"cover","style_space":"remove_padding","layout":"container-fw","element":"gva_row","class":"sliderfrontpage"},"columns":[{"settings":{"element":"gva_column","bg_position":"center top","bg_repeat":"no-repeat","bg_attachment":"scroll","bg_size":"cover"},"col_lg":12,"elements":[{"settings":{"title_admin":"news: campigns-en","block_drupal":"views_block__news_block_5","hidden_title":"on","align_title":"title-align-right","remove_margin":"on","style_text":"text-dark","animate_delay":"0"},"editing":false,"element_name":"gva_drupal_block"}],"editing":false,"element_name":"gva_column"}],"editing":false,"element_name":"gva_row"},{"settings":{"element":"gva_row","bg_particles":"off","bg_position":"center top","bg_repeat":"no-repeat","bg_attachment":"scroll","bg_size":"cover","style_space":"remove_margin remove_padding remove_padding_col","layout":"container-fw","class":"partner"},"columns":[{"settings":{"element":"gva_column"},"col_lg":12,"elements":[{"settings":{"content":"\r\n \r\n \r\n \r\n Our Distinguished Projects\r\n \r\n \r\n \r\n At Wejdan Charity, we strive to provide support and assistance to communities in need who are affected by disasters, crises, and wars, with the aim of improving quality of life and promoting sustainable development. Our projects span across several areas:\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n Relief Projects\r\n Emergency response to disasters and wars, providing food and medicine.\r\n \r\n<a> Browse Projects </a>\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n Development Projects\r\n Empowering communities and building capacities.\r\n \r\n<a> Browse Projects </a>\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n Seasonal Projects\r\n Ramadan campaigns, Qurbani, and winter clothing.\r\n \r\n<a> Browse Projects </a>\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n Endowment Projects\r\n An investment for the hereafter—mosques, wells, and charitable endowments.\r\n<a> Browse Projects </a>\r\n \r\n \r\n \r\n \r\n","animate_delay":"0"},"editing":false,"element_name":"gva_text_noeditor"}],"editing":false,"element_name":"gva_column"}],"editing":false,"element_name":"gva_row"},{"settings":{"element":"gva_row","bg_particles":"off","bg_position":"center top","bg_repeat":"no-repeat","bg_attachment":"scroll","bg_size":"cover","style_space":"remove_margin remove_padding remove_padding_col","layout":"container-fw","class":"partner"},"columns":[{"settings":{"element":"gva_column"},"col_lg":12,"elements":[{"settings":{"content":"\r\n \r\n \r\n\r\n \r\n \r\n Our Achievements in Numbers\r\n Your trust makes the difference\r\n \r\n \r\n\r\n \r\n \r\n 0\r\n Beneficiaries worldwide\r\n \r\n \r\n \r\n 0\r\n Projects implemented\r\n \r\n \r\n \r\n 0\r\n Countries we operate in\r\n \r\n \r\n \r\n 0\r\n Volunteers\r\n \r\n \r\n \r\n \r\n\r\n\r\n// Enhanced counter animation for facts section\r\nfunction animateFactsCounters() {\r\n const statNumbers = document.querySelectorAll('.facts-section__stat-number');\r\n \r\n const observer = new IntersectionObserver((entries) => {\r\n entries.forEach(entry => {\r\n if (entry.isIntersecting) {\r\n const counter = entry.target;\r\n const target = parseInt(counter.getAttribute('data-target'));\r\n const duration = 2000;\r\n const increment = target / (duration / 16);\r\n \r\n let current = 0;\r\n const updateCounter = () => {\r\n current += increment;\r\n if (current < target) {\r\n // Format number with K for thousands\r\n let displayNum = Math.ceil(current);\r\n if (displayNum >= 1000) {\r\n counter.textContent = (displayNum / 1000).toFixed(1).replace('.0', '') + 'K';\r\n } else {\r\n counter.textContent = displayNum.toLocaleString();\r\n }\r\n requestAnimationFrame(updateCounter);\r\n } else {\r\n // Final formatting\r\n if (target >= 1000) {\r\n counter.textContent = (target / 1000).toFixed(1).replace('.0', '') + 'K';\r\n counter.classList.add('formatted');\r\n } else {\r\n counter.textContent = target.toLocaleString();\r\n }\r\n counter.classList.add('animated');\r\n setTimeout(() => counter.classList.remove('animated'), 600);\r\n }\r\n };\r\n updateCounter();\r\n observer.unobserve(counter);\r\n }\r\n });\r\n }, { threshold: 0.5, rootMargin: '0px 0px -50px 0px' });\r\n \r\n statNumbers.forEach(counter => observer.observe(counter));\r\n}\r\n\r\n// Call this function when DOM is loaded\r\ndocument.addEventListener('DOMContentLoaded', () => {\r\n animateFactsCounters();\r\n});","animate_delay":"0"},"editing":false,"element_name":"gva_text_noeditor"}],"editing":false,"element_name":"gva_column"}],"editing":false,"element_name":"gva_row"},{"settings":{"element":"gva_row","bg_particles":"off","bg_position":"center top","bg_repeat":"no-repeat","bg_attachment":"scroll","bg_size":"cover","style_space":"remove_margin remove_padding remove_padding_col","layout":"container-fw","class":"zakatcalc"},"columns":[{"settings":{"element":"gva_column"},"col_lg":12,"elements":[{"settings":{"content":"\r\n\r\n \r\n \r\n \r\n \r\nSmart Zakat Calculator\r\n A precise and comprehensive tool\r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n \r\n \r\n Money & Savings\r\n \r\n \r\n \r\n Cash (on hand or at home)\r\n \r\n \r\n $\r\n \r\n \r\n \r\n Bank balances\r\n \r\n \r\n $\r\n \r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n Gold & Silver\r\n \r\n \r\n Refresh Prices\r\n \r\n \r\n \r\n \r\n \r\n Gold weight (grams)\r\n \r\n \r\n \r\n \r\n Current gold price per gram\r\n \r\n Live\r\n \r\n \r\n \r\n \r\n $ / gram\r\n \r\n \r\n \r\n\r\n \r\n \r\n Silver weight (grams)\r\n \r\n \r\n \r\n \r\n Current silver price per gram\r\n \r\n Live\r\n \r\n \r\n \r\n \r\n $ / gram\r\n \r\n \r\n \r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n Zakat Summary\r\n \r\n \r\n Total assets:\r\n 0.00 $\r\n \r\n \r\n Net zakatable assets:\r\n 0.00 $\r\n \r\n \r\n Nisab value (85g gold):\r\n ...\r\n \r\n \r\n Enter data to check eligibility\r\n \r\n \r\n \r\n\r\n \r\n \r\n Zakat due (2.5%)\r\n 0.00 $\r\n \r\n \r\n <a>\r\n \r\n Contact via WhatsApp for consultation and donation\r\n </a>\r\n \r\n \r\n \r\n \r\n\r\n\r\n// Zakat Calculator Logic\r\nlet zakatcalculatorPricesLoaded = false;\r\n\r\n// Initialize calculator when DOM is loaded\r\ndocument.addEventListener('DOMContentLoaded', () => {\r\n zakatcalculatorFetchPrices();\r\n zakatcalculatorCalculate();\r\n \r\n // Add input event listeners for real-time calculation\r\n const inputs = document.querySelectorAll('.zakatcalculator-section__input');\r\n inputs.forEach(input => {\r\n input.addEventListener('input', zakatcalculatorCalculate);\r\n });\r\n \r\n // Format numbers as user types\r\n inputs.forEach(input => {\r\n input.addEventListener('blur', function() {\r\n if (this.value) {\r\n const value = parseFloat(this.value);\r\n if (!isNaN(value)) {\r\n this.value = value.toLocaleString('en-US', {\r\n minimumFractionDigits: 2,\r\n maximumFractionDigits: 2\r\n });\r\n }\r\n }\r\n });\r\n \r\n input.addEventListener('focus', function() {\r\n if (this.value) {\r\n this.value = this.value.replace(/[^\\d.]/g, '');\r\n }\r\n });\r\n });\r\n});\r\n\r\n// Fetch metal prices\r\nasync function zakatcalculatorFetchPrices() {\r\n const goldInput = document.getElementById('goldPrice');\r\n const silverInput = document.getElementById('silverPrice');\r\n const refreshButton = document.querySelector('.zakatcalculator-section__refresh-button');\r\n const refreshIcon = document.querySelector('.zakatcalculator-section__refresh-icon');\r\n \r\n if (!refreshButton || !refreshIcon) return;\r\n \r\n // Show loading state\r\n refreshButton.disabled = true;\r\n refreshIcon.classList.add('zakatcalculator-section__refresh-icon--spinning');\r\n goldInput.classList.add('zakatcalculator-section__input--loading');\r\n silverInput.classList.add('zakatcalculator-section__input--loading');\r\n \r\n try {\r\n // Simulate API call with delay\r\n await new Promise(resolve => setTimeout(resolve, 1500));\r\n \r\n // Mock data (in a real app, you would fetch from an API)\r\n const liveGoldPrice = 76.50;\r\n const liveSilverPrice = 0.95;\r\n \r\n // Update inputs\r\n goldInput.value = liveGoldPrice.toFixed(2);\r\n silverInput.value = liveSilverPrice.toFixed(2);\r\n \r\n // Remove loading state\r\n goldInput.classList.remove('zakatcalculator-section__input--loading');\r\n silverInput.classList.remove('zakatcalculator-section__input--loading');\r\n goldInput.classList.add('zakatcalculator-section__input--valid');\r\n silverInput.classList.add('zakatcalculator-section__input--valid');\r\n \r\n zakatcalculatorPricesLoaded = true;\r\n \r\n // Show success feedback\r\n refreshButton.innerHTML = ' Updated';\r\n refreshButton.style.backgroundColor = '#617f67';\r\n refreshButton.style.color = 'white';\r\n \r\n setTimeout(() => {\r\n refreshButton.innerHTML = ' Refresh Prices';\r\n refreshButton.style.backgroundColor = '';\r\n refreshButton.style.color = '';\r\n }, 2000);\r\n \r\n } catch (error) {\r\n console.error(\"Failed to fetch prices\", error);\r\n \r\n // Fallback values\r\n goldInput.value = 75.00;\r\n silverInput.value = 0.90;\r\n \r\n // Show error state\r\n goldInput.classList.remove('zakatcalculator-section__input--loading');\r\n silverInput.classList.remove('zakatcalculator-section__input--loading');\r\n goldInput.classList.add('zakatcalculator-section__input--invalid');\r\n silverInput.classList.add('zakatcalculator-section__input--invalid');\r\n \r\n refreshButton.innerHTML = ' Update Failed';\r\n refreshButton.style.backgroundColor = '#dc2626';\r\n refreshButton.style.color = 'white';\r\n \r\n setTimeout(() => {\r\n refreshButton.innerHTML = ' Refresh Prices';\r\n refreshButton.style.backgroundColor = '';\r\n refreshButton.style.color = '';\r\n }, 2000);\r\n \r\n } finally {\r\n refreshButton.disabled = false;\r\n refreshIcon.classList.remove('zakatcalculator-section__refresh-icon--spinning');\r\n \r\n // Recalculate zakat\r\n zakatcalculatorCalculate();\r\n }\r\n}\r\n\r\n// Calculate zakat\r\nfunction zakatcalculatorCalculate() {\r\n const cashHand = parseFloat(document.getElementById('cashHand').value) || 0;\r\n const cashBank = parseFloat(document.getElementById('cashBank').value) || 0;\r\n const goldWeight = parseFloat(document.getElementById('goldWeight').value) || 0;\r\n const goldPrice = parseFloat(document.getElementById('goldPrice').value) || 0;\r\n const silverWeight = parseFloat(document.getElementById('silverWeight').value) || 0;\r\n const silverPrice = parseFloat(document.getElementById('silverPrice').value) || 0;\r\n \r\n // Calculate totals\r\n const totalAssets = cashHand + cashBank + (goldWeight * goldPrice) + (silverWeight * silverPrice);\r\n const nisabThreshold = 85 * goldPrice;\r\n \r\n // Update display\r\n document.getElementById('totalAssetsDisplay').textContent = \r\n formatCurrency(totalAssets);\r\n \r\n document.getElementById('netAssetsDisplay').textContent = \r\n formatCurrency(totalAssets);\r\n \r\n if (goldPrice > 0) {\r\n document.getElementById('nisabValueDisplay').textContent = \r\n formatCurrency(nisabThreshold);\r\n } else {\r\n document.getElementById('nisabValueDisplay').textContent = '...';\r\n }\r\n \r\n // Update status and final zakat\r\n const statusBadge = document.getElementById('statusBadge');\r\n const finalDisplay = document.getElementById('finalZakatDisplay');\r\n const payButton = document.querySelector('.zakatcalculator-section__pay-button');\r\n \r\n if (totalAssets >= nisabThreshold && goldPrice > 0 && zakatcalculatorPricesLoaded) {\r\n const zakatAmount = totalAssets * 0.025;\r\n finalDisplay.textContent = formatCurrency(zakatAmount);\r\n \r\n // Update status badge\r\n statusBadge.textContent = '✓ Zakat is due (Nisab reached)';\r\n statusBadge.className = 'zakatcalculator-section__status zakatcalculator-section__status--eligible';\r\n \r\n // Enable pay button\r\n payButton.disabled = false;\r\n payButton.innerHTML = ' Pay Zakat Now';\r\n \r\n } else {\r\n finalDisplay.textContent = '0.00 $';\r\n \r\n // Update status badge\r\n if (!zakatcalculatorPricesLoaded) {\r\n statusBadge.textContent = 'Enter data to check eligibility';\r\n statusBadge.className = 'zakatcalculator-section__status zakatcalculator-section__status--not-eligible';\r\n } else if (totalAssets < nisabThreshold) {\r\n statusBadge.textContent = 'Zakat is not due (Nisab not reached)';\r\n statusBadge.className = 'zakatcalculator-section__status zakatcalculator-section__status--not-eligible';\r\n } else {\r\n statusBadge.textContent = 'Enter data to check eligibility';\r\n statusBadge.className = 'zakatcalculator-section__status zakatcalculator-section__status--not-eligible';\r\n }\r\n \r\n // Disable pay button\r\n payButton.disabled = true;\r\n payButton.innerHTML = ' Pay Zakat Now';\r\n }\r\n}\r\n\r\n// Format currency\r\nfunction formatCurrency(amount) {\r\n return new Intl.NumberFormat('en-US', {\r\n style: 'currency',\r\n currency: 'USD',\r\n minimumFractionDigits: 2,\r\n maximumFractionDigits: 2\r\n }).format(amount);\r\n}\r\n\r\n// Add zakat to cart\r\nfunction zakatcalculatorAddToCart() {\r\n const amountText = document.getElementById('finalZakatDisplay').textContent;\r\n const amount = parseFloat(amountText.replace(/[^0-9.-]+/g, \"\"));\r\n \r\n if (amount > 0 && !isNaN(amount)) {\r\n // Use your existing addToCart function\r\n if (typeof addToCart === 'function') {\r\n addToCart('Calculated Zakat', amount, 'Zakat');\r\n } else {\r\n // Fallback if addToCart is not defined\r\n alert(`Calculated Zakat amount: ${amountText}`);\r\n }\r\n } else {\r\n alert(\"Invalid zakat amount. Please check your inputs.\");\r\n }\r\n}\r\n\r\n// Input validation\r\nfunction validateZakatInput(input) {\r\n const value = parseFloat(input.value);\r\n const min = parseFloat(input.getAttribute('min')) || 0;\r\n \r\n if (isNaN(value) || value < min) {\r\n input.classList.add('zakatcalculator-section__input--invalid');\r\n return false;\r\n } else {\r\n input.classList.remove('zakatcalculator-section__input--invalid');\r\n input.classList.add('zakatcalculator-section__input--valid');\r\n return true;\r\n }\r\n}","animate_delay":"0"},"editing":false,"element_name":"gva_text_noeditor"}],"editing":false,"element_name":"gva_column"}],"editing":false,"element_name":"gva_row"},{"settings":{"element":"gva_row","bg_particles":"off","bg_position":"center top","bg_repeat":"no-repeat","bg_attachment":"scroll","bg_size":"cover","style_space":"remove_margin remove_padding remove_padding_col","layout":"container-fw","class":"partner","margin_top":"30","margin_bottom":"30"},"columns":[{"settings":{"element":"gva_column"},"col_lg":12,"elements":[{"settings":{"content":"\r\n \r\n Strategic Partnerships\r\n Our partners in creating hope\r\n \r\n \r\n ","animate_delay":"0"},"editing":false,"element_name":"gva_text_noeditor"},{"settings":{"title_admin":"Partners: Partners Block - en","block_drupal":"views_block__partners_block_2","hidden_title":"on","align_title":"title-align-right","remove_margin":"on","style_text":"text-dark","animate_delay":"0"},"editing":false,"element_name":"gva_drupal_block"}],"editing":false,"element_name":"gva_column"}],"editing":false,"element_name":"gva_row"}]') (Line: 47)
Drupal\gavias_content_builder\Plugin\Field\FieldFormatter\GaviasContentBuilderFormatter->viewElements(Object, 'en') (Line: 89)
Drupal\Core\Field\FormatterBase->view(Object, 'en') (Line: 263)
Drupal\Core\Entity\Entity\EntityViewDisplay->buildMultiple(Array) (Line: 351)
Drupal\Core\Entity\EntityViewBuilder->buildComponents(Array, Array, Array, 'full') (Line: 24)
Drupal\node\NodeViewBuilder->buildComponents(Array, Array, Array, 'full') (Line: 293)
Drupal\Core\Entity\EntityViewBuilder->buildMultiple(Array) (Line: 250)
Drupal\Core\Entity\EntityViewBuilder->build(Array)
call_user_func_array(Array, Array) (Line: 100)
Drupal\Core\Render\Renderer->doTrustedCallback(Array, Array, 'Render #pre_render callbacks must be methods of a class that implements \Drupal\Core\Security\TrustedCallbackInterface or be an anonymous function. The callback was %s. Support for this callback implementation is deprecated in 8.8.0 and will be removed in Drupal 9.0.0. See https://www.drupal.org/node/2966725', 'silenced_deprecation', 'Drupal\Core\Render\Element\RenderCallbackInterface') (Line: 781)
Drupal\Core\Render\Renderer->doCallback('#pre_render', Array, Array) (Line: 372)
Drupal\Core\Render\Renderer->doRender(Array, ) (Line: 200)
Drupal\Core\Render\Renderer->render(Array, ) (Line: 226)
Drupal\Core\Render\MainContent\HtmlRenderer->Drupal\Core\Render\MainContent\{closure}() (Line: 573)
Drupal\Core\Render\Renderer->executeInRenderContext(Object, Object) (Line: 227)
Drupal\Core\Render\MainContent\HtmlRenderer->prepare(Array, Object, Object) (Line: 117)
Drupal\Core\Render\MainContent\HtmlRenderer->renderResponse(Array, Object, Object) (Line: 90)
Drupal\Core\EventSubscriber\MainContentViewSubscriber->onViewRenderArray(Object, 'kernel.view', Object)
call_user_func(Array, Object, 'kernel.view', Object) (Line: 111)
Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher->dispatch('kernel.view', Object) (Line: 156)
Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object, 1) (Line: 68)
Symfony\Component\HttpKernel\HttpKernel->handle(Object, 1, 1) (Line: 57)
Drupal\Core\StackMiddleware\Session->handle(Object, 1, 1) (Line: 47)
Drupal\Core\StackMiddleware\KernelPreHandle->handle(Object, 1, 1) (Line: 191)
Drupal\page_cache\StackMiddleware\PageCache->fetch(Object, 1, 1) (Line: 128)
Drupal\page_cache\StackMiddleware\PageCache->lookup(Object, 1, 1) (Line: 82)
Drupal\page_cache\StackMiddleware\PageCache->handle(Object, 1, 1) (Line: 47)
Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle(Object, 1, 1) (Line: 52)
Drupal\Core\StackMiddleware\NegotiationMiddleware->handle(Object, 1, 1) (Line: 23)
Stack\StackedHttpKernel->handle(Object, 1, 1) (Line: 708)
Drupal\Core\DrupalKernel->handle(Object) (Line: 19)
- Deprecated function: implode(): Passing glue string after array is deprecated. Swap the parameters in element_gva_column->render_content() (line 462 of themes/gavias_kunco/gva_content_builder/gva_column.php).
element_gva_column->render_content(Array, '
حملاتنا
أثر عطائكم… حياة تتغيّر
مع كل مساهمة، نصنع فرقًا حقيقيًا ونترك أثرًا إنسانيًا يمتد أثره إلى حياة أكثر استقرارًا وأملًا.
أثر عطائكم في حملاتنا
نؤمن أن عطائكم هو القوة الحقيقية خلف كل حملة نطلقها. فمن خلال دعمكم، تتحول المبادرات الإنسانية إلى قصص أمل، ويصبح الأثر واقعًا يلمسه الإنسان في حياته اليومية.
{
entries.forEach(entry => {
if (entry.isIntersecting) {
entry.target.classList.add('active');
}
})
}, { threshold: 0.1 });
reveals.forEach(el => revealObserver.observe(el));
function toggleCart() {
alert('Cart toggle clicked');
}
function toggleMobileMenu() {
alert('Mobile menu clicked');
}
//-->
<a href="/en/node/262" hreflang="en">Support a student</a>
Humanitarian Case
In remote villages in Chad, residents suffer from a scarcity of potable water, forcing women and children to travel long distances daily in search of water.
<a href="/en/node/262" class="sliderfront-section__slide-button sliderfront-section__slide-button--education">
Read the full story
</a>
<a href="/en/node/261" hreflang="en">Support a student</a>
Humanitarian Case
In remote villages in Chad, residents suffer from a scarcity of potable water, forcing women and children to travel long distances daily in search of water.
<a href="/en/node/261" class="sliderfront-section__slide-button sliderfront-section__slide-button--education">
Read the full story
</a>
') (Line: 110)
gavias_content_builder_render_element('gva_column', Array, '
حملاتنا
أثر عطائكم… حياة تتغيّر
مع كل مساهمة، نصنع فرقًا حقيقيًا ونترك أثرًا إنسانيًا يمتد أثره إلى حياة أكثر استقرارًا وأملًا.
أثر عطائكم في حملاتنا
نؤمن أن عطائكم هو القوة الحقيقية خلف كل حملة نطلقها. فمن خلال دعمكم، تتحول المبادرات الإنسانية إلى قصص أمل، ويصبح الأثر واقعًا يلمسه الإنسان في حياته اليومية.
{
entries.forEach(entry => {
if (entry.isIntersecting) {
entry.target.classList.add('active');
}
})
}, { threshold: 0.1 });
reveals.forEach(el => revealObserver.observe(el));
function toggleCart() {
alert('Cart toggle clicked');
}
function toggleMobileMenu() {
alert('Mobile menu clicked');
}
//-->
<a href="/en/node/262" hreflang="en">Support a student</a>
Humanitarian Case
In remote villages in Chad, residents suffer from a scarcity of potable water, forcing women and children to travel long distances daily in search of water.
<a href="/en/node/262" class="sliderfront-section__slide-button sliderfront-section__slide-button--education">
Read the full story
</a>
<a href="/en/node/261" hreflang="en">Support a student</a>
Humanitarian Case
In remote villages in Chad, residents suffer from a scarcity of potable water, forcing women and children to travel long distances daily in search of water.
<a href="/en/node/261" class="sliderfront-section__slide-button sliderfront-section__slide-button--education">
Read the full story
</a>
') (Line: 58)
gavias_content_builder_render_el(Array) (Line: 22)
gavias_content_builder_frontend('[{"settings":{"bg_particles":"off","bg_position":"center top","bg_repeat":"no-repeat","bg_attachment":"scroll","bg_size":"cover","style_space":"remove_padding","layout":"container-fw"},"columns":[{"settings":{"element":"gva_column","bg_position":"center top","bg_repeat":"no-repeat","bg_attachment":"scroll","bg_size":"cover","el_class":"front"},"col_lg":12,"elements":[{"settings":{"content":"\r\n \r\n \r\n \r\n \r\n Urgent Appeal\r\n \r\n Be a helping hand for them in\r\n times of crisis\r\n \r\n \r\n At \"Wejdan Charity\", we work with full transparency to deliver your donations to those in need in conflict and poverty-stricken areas.\r\n \r\n \r\n <a>\r\n Charity Donations \r\n </a>\r\n <a>\r\n Our Projects \r\n </a>\r\n \r\n \r\n \r\n \r\n","animate_delay":"0"},"editing":false,"element_name":"gva_text_noeditor"}],"editing":false,"element_name":"gva_column"}],"editing":false,"element_name":"gva_row"},{"settings":{"element":"gva_row","bg_particles":"off","bg_position":"center top","bg_repeat":"no-repeat","bg_attachment":"scroll","bg_size":"cover","style_space":"remove_padding","layout":"container","class":"before-help-region"},"columns":[{"settings":{"element":"gva_column"},"col_lg":12,"elements":[{"settings":{"title":"Take action for animals now","link":"#","button_title":"Donation Now","button_align":"button-right-v2","style_text":"text-light","style_button":"btn-theme","donorbox":"off","target":"off","el_class":"margin","animate":"fade-up","animate_delay":"0"},"editing":false,"element_name":"gva_call_to_action"}],"editing":false,"element_name":"gva_column"}],"editing":false,"element_name":"gva_row"},{"settings":{"element":"gva_row","bg_particles":"off","bg_position":"center top","bg_repeat":"no-repeat","bg_attachment":"scroll","bg_size":"cover","style_space":"remove_padding","layout":"container-fw","bg_color":"#f9fafb"},"columns":[{"settings":{"element":"gva_column","bg_position":"center top","bg_repeat":"no-repeat","bg_attachment":"scroll","bg_size":"cover","el_class":"about"},"col_lg":12,"elements":[{"settings":{"content":"\r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n \r\n \r\n Who We Are\r\n \r\n \r\n We plant hope.. \r\n and build people and the future\r\n \r\n \r\n Wejdan Charity is a leading humanitarian organization, founded with an ambitious vision to be a bridge of الخير between donors and those in need.\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n Development Stages\r\n A continuous journey of growth\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n Areas of Work\r\n We reach where the need is\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \"We work with passion to bring smiles\"\r\n \r\n \r\n \r\n \r\n \r\n","animate_delay":"0"},"editing":false,"element_name":"gva_text_noeditor"}],"editing":false,"element_name":"gva_column"}],"editing":false,"element_name":"gva_row"},{"settings":{"element":"gva_row","bg_particles":"off","bg_position":"center top","bg_repeat":"no-repeat","bg_attachment":"scroll","bg_size":"cover","style_space":"remove_margin remove_padding remove_padding_col","layout":"container-fw","class":"partner","margin_top":"30","margin_bottom":"30"},"columns":[{"settings":{"element":"gva_column"},"col_lg":12,"elements":[{"settings":{"content":"\r\n\r\n \r\n \r\n Initiatives & Programs\r\n Our Areas of Work\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n Ongoing Charity\r\n Water wells, mosque construction\r\n \r\n \r\n \r\n \r\n \r\n \r\n Student Sponsorship\r\n Building the future through education\r\n \r\n \r\n \r\n \r\n \r\n \r\n Humanitarian Cases\r\n Patient treatment, surgeries\r\n \r\n \r\n \r\n \r\n \r\n \r\n Development Projects\r\n Empowering productive families\r\n \r\n \r\n<a>Learn more about our programs and initiatives</a>\r\n \r\n","animate_delay":"0"},"editing":false,"element_name":"gva_text_noeditor"}],"editing":false,"element_name":"gva_column"}],"editing":false,"element_name":"gva_row"},{"settings":{"element":"gva_row","bg_particles":"off","bg_position":"center top","bg_repeat":"no-repeat","bg_attachment":"scroll","bg_size":"cover","style_space":"remove_margin remove_padding remove_padding_col","layout":"container","class":"newsfront"},"columns":[{"settings":{"element":"gva_column"},"col_lg":12,"elements":[{"settings":{"content":"\r\n \r\n \r\n Our News\r\n \r\n \r\n \r\nNews that tells the story of giving \r\n \r\n","animate_delay":"0"},"editing":false,"element_name":"gva_text_noeditor"},{"settings":{"title_admin":"news: news Block -en","block_drupal":"views_block__news_block_3","hidden_title":"on","align_title":"title-align-left","remove_margin":"on","style_text":"text-dark","animate_delay":"0"},"editing":false,"element_name":"gva_drupal_block"}],"editing":false,"element_name":"gva_column"}],"editing":false,"element_name":"gva_row"},{"settings":{"bg_particles":"off","bg_position":"center top","bg_repeat":"no-repeat","bg_attachment":"scroll","bg_size":"cover","style_space":"remove_padding","layout":"container-fw","element":"gva_row","class":"sliderfrontpage"},"columns":[{"settings":{"element":"gva_column","bg_position":"center top","bg_repeat":"no-repeat","bg_attachment":"scroll","bg_size":"cover"},"col_lg":12,"elements":[{"settings":{"title_admin":"news: campigns-en","block_drupal":"views_block__news_block_5","hidden_title":"on","align_title":"title-align-right","remove_margin":"on","style_text":"text-dark","animate_delay":"0"},"editing":false,"element_name":"gva_drupal_block"}],"editing":false,"element_name":"gva_column"}],"editing":false,"element_name":"gva_row"},{"settings":{"element":"gva_row","bg_particles":"off","bg_position":"center top","bg_repeat":"no-repeat","bg_attachment":"scroll","bg_size":"cover","style_space":"remove_margin remove_padding remove_padding_col","layout":"container-fw","class":"partner"},"columns":[{"settings":{"element":"gva_column"},"col_lg":12,"elements":[{"settings":{"content":"\r\n \r\n \r\n \r\n Our Distinguished Projects\r\n \r\n \r\n \r\n At Wejdan Charity, we strive to provide support and assistance to communities in need who are affected by disasters, crises, and wars, with the aim of improving quality of life and promoting sustainable development. Our projects span across several areas:\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n Relief Projects\r\n Emergency response to disasters and wars, providing food and medicine.\r\n \r\n<a> Browse Projects </a>\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n Development Projects\r\n Empowering communities and building capacities.\r\n \r\n<a> Browse Projects </a>\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n Seasonal Projects\r\n Ramadan campaigns, Qurbani, and winter clothing.\r\n \r\n<a> Browse Projects </a>\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n Endowment Projects\r\n An investment for the hereafter—mosques, wells, and charitable endowments.\r\n<a> Browse Projects </a>\r\n \r\n \r\n \r\n \r\n","animate_delay":"0"},"editing":false,"element_name":"gva_text_noeditor"}],"editing":false,"element_name":"gva_column"}],"editing":false,"element_name":"gva_row"},{"settings":{"element":"gva_row","bg_particles":"off","bg_position":"center top","bg_repeat":"no-repeat","bg_attachment":"scroll","bg_size":"cover","style_space":"remove_margin remove_padding remove_padding_col","layout":"container-fw","class":"partner"},"columns":[{"settings":{"element":"gva_column"},"col_lg":12,"elements":[{"settings":{"content":"\r\n \r\n \r\n\r\n \r\n \r\n Our Achievements in Numbers\r\n Your trust makes the difference\r\n \r\n \r\n\r\n \r\n \r\n 0\r\n Beneficiaries worldwide\r\n \r\n \r\n \r\n 0\r\n Projects implemented\r\n \r\n \r\n \r\n 0\r\n Countries we operate in\r\n \r\n \r\n \r\n 0\r\n Volunteers\r\n \r\n \r\n \r\n \r\n\r\n\r\n// Enhanced counter animation for facts section\r\nfunction animateFactsCounters() {\r\n const statNumbers = document.querySelectorAll('.facts-section__stat-number');\r\n \r\n const observer = new IntersectionObserver((entries) => {\r\n entries.forEach(entry => {\r\n if (entry.isIntersecting) {\r\n const counter = entry.target;\r\n const target = parseInt(counter.getAttribute('data-target'));\r\n const duration = 2000;\r\n const increment = target / (duration / 16);\r\n \r\n let current = 0;\r\n const updateCounter = () => {\r\n current += increment;\r\n if (current < target) {\r\n // Format number with K for thousands\r\n let displayNum = Math.ceil(current);\r\n if (displayNum >= 1000) {\r\n counter.textContent = (displayNum / 1000).toFixed(1).replace('.0', '') + 'K';\r\n } else {\r\n counter.textContent = displayNum.toLocaleString();\r\n }\r\n requestAnimationFrame(updateCounter);\r\n } else {\r\n // Final formatting\r\n if (target >= 1000) {\r\n counter.textContent = (target / 1000).toFixed(1).replace('.0', '') + 'K';\r\n counter.classList.add('formatted');\r\n } else {\r\n counter.textContent = target.toLocaleString();\r\n }\r\n counter.classList.add('animated');\r\n setTimeout(() => counter.classList.remove('animated'), 600);\r\n }\r\n };\r\n updateCounter();\r\n observer.unobserve(counter);\r\n }\r\n });\r\n }, { threshold: 0.5, rootMargin: '0px 0px -50px 0px' });\r\n \r\n statNumbers.forEach(counter => observer.observe(counter));\r\n}\r\n\r\n// Call this function when DOM is loaded\r\ndocument.addEventListener('DOMContentLoaded', () => {\r\n animateFactsCounters();\r\n});","animate_delay":"0"},"editing":false,"element_name":"gva_text_noeditor"}],"editing":false,"element_name":"gva_column"}],"editing":false,"element_name":"gva_row"},{"settings":{"element":"gva_row","bg_particles":"off","bg_position":"center top","bg_repeat":"no-repeat","bg_attachment":"scroll","bg_size":"cover","style_space":"remove_margin remove_padding remove_padding_col","layout":"container-fw","class":"zakatcalc"},"columns":[{"settings":{"element":"gva_column"},"col_lg":12,"elements":[{"settings":{"content":"\r\n\r\n \r\n \r\n \r\n \r\nSmart Zakat Calculator\r\n A precise and comprehensive tool\r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n \r\n \r\n Money & Savings\r\n \r\n \r\n \r\n Cash (on hand or at home)\r\n \r\n \r\n $\r\n \r\n \r\n \r\n Bank balances\r\n \r\n \r\n $\r\n \r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n Gold & Silver\r\n \r\n \r\n Refresh Prices\r\n \r\n \r\n \r\n \r\n \r\n Gold weight (grams)\r\n \r\n \r\n \r\n \r\n Current gold price per gram\r\n \r\n Live\r\n \r\n \r\n \r\n \r\n $ / gram\r\n \r\n \r\n \r\n\r\n \r\n \r\n Silver weight (grams)\r\n \r\n \r\n \r\n \r\n Current silver price per gram\r\n \r\n Live\r\n \r\n \r\n \r\n \r\n $ / gram\r\n \r\n \r\n \r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n Zakat Summary\r\n \r\n \r\n Total assets:\r\n 0.00 $\r\n \r\n \r\n Net zakatable assets:\r\n 0.00 $\r\n \r\n \r\n Nisab value (85g gold):\r\n ...\r\n \r\n \r\n Enter data to check eligibility\r\n \r\n \r\n \r\n\r\n \r\n \r\n Zakat due (2.5%)\r\n 0.00 $\r\n \r\n \r\n <a>\r\n \r\n Contact via WhatsApp for consultation and donation\r\n </a>\r\n \r\n \r\n \r\n \r\n\r\n\r\n// Zakat Calculator Logic\r\nlet zakatcalculatorPricesLoaded = false;\r\n\r\n// Initialize calculator when DOM is loaded\r\ndocument.addEventListener('DOMContentLoaded', () => {\r\n zakatcalculatorFetchPrices();\r\n zakatcalculatorCalculate();\r\n \r\n // Add input event listeners for real-time calculation\r\n const inputs = document.querySelectorAll('.zakatcalculator-section__input');\r\n inputs.forEach(input => {\r\n input.addEventListener('input', zakatcalculatorCalculate);\r\n });\r\n \r\n // Format numbers as user types\r\n inputs.forEach(input => {\r\n input.addEventListener('blur', function() {\r\n if (this.value) {\r\n const value = parseFloat(this.value);\r\n if (!isNaN(value)) {\r\n this.value = value.toLocaleString('en-US', {\r\n minimumFractionDigits: 2,\r\n maximumFractionDigits: 2\r\n });\r\n }\r\n }\r\n });\r\n \r\n input.addEventListener('focus', function() {\r\n if (this.value) {\r\n this.value = this.value.replace(/[^\\d.]/g, '');\r\n }\r\n });\r\n });\r\n});\r\n\r\n// Fetch metal prices\r\nasync function zakatcalculatorFetchPrices() {\r\n const goldInput = document.getElementById('goldPrice');\r\n const silverInput = document.getElementById('silverPrice');\r\n const refreshButton = document.querySelector('.zakatcalculator-section__refresh-button');\r\n const refreshIcon = document.querySelector('.zakatcalculator-section__refresh-icon');\r\n \r\n if (!refreshButton || !refreshIcon) return;\r\n \r\n // Show loading state\r\n refreshButton.disabled = true;\r\n refreshIcon.classList.add('zakatcalculator-section__refresh-icon--spinning');\r\n goldInput.classList.add('zakatcalculator-section__input--loading');\r\n silverInput.classList.add('zakatcalculator-section__input--loading');\r\n \r\n try {\r\n // Simulate API call with delay\r\n await new Promise(resolve => setTimeout(resolve, 1500));\r\n \r\n // Mock data (in a real app, you would fetch from an API)\r\n const liveGoldPrice = 76.50;\r\n const liveSilverPrice = 0.95;\r\n \r\n // Update inputs\r\n goldInput.value = liveGoldPrice.toFixed(2);\r\n silverInput.value = liveSilverPrice.toFixed(2);\r\n \r\n // Remove loading state\r\n goldInput.classList.remove('zakatcalculator-section__input--loading');\r\n silverInput.classList.remove('zakatcalculator-section__input--loading');\r\n goldInput.classList.add('zakatcalculator-section__input--valid');\r\n silverInput.classList.add('zakatcalculator-section__input--valid');\r\n \r\n zakatcalculatorPricesLoaded = true;\r\n \r\n // Show success feedback\r\n refreshButton.innerHTML = ' Updated';\r\n refreshButton.style.backgroundColor = '#617f67';\r\n refreshButton.style.color = 'white';\r\n \r\n setTimeout(() => {\r\n refreshButton.innerHTML = ' Refresh Prices';\r\n refreshButton.style.backgroundColor = '';\r\n refreshButton.style.color = '';\r\n }, 2000);\r\n \r\n } catch (error) {\r\n console.error(\"Failed to fetch prices\", error);\r\n \r\n // Fallback values\r\n goldInput.value = 75.00;\r\n silverInput.value = 0.90;\r\n \r\n // Show error state\r\n goldInput.classList.remove('zakatcalculator-section__input--loading');\r\n silverInput.classList.remove('zakatcalculator-section__input--loading');\r\n goldInput.classList.add('zakatcalculator-section__input--invalid');\r\n silverInput.classList.add('zakatcalculator-section__input--invalid');\r\n \r\n refreshButton.innerHTML = ' Update Failed';\r\n refreshButton.style.backgroundColor = '#dc2626';\r\n refreshButton.style.color = 'white';\r\n \r\n setTimeout(() => {\r\n refreshButton.innerHTML = ' Refresh Prices';\r\n refreshButton.style.backgroundColor = '';\r\n refreshButton.style.color = '';\r\n }, 2000);\r\n \r\n } finally {\r\n refreshButton.disabled = false;\r\n refreshIcon.classList.remove('zakatcalculator-section__refresh-icon--spinning');\r\n \r\n // Recalculate zakat\r\n zakatcalculatorCalculate();\r\n }\r\n}\r\n\r\n// Calculate zakat\r\nfunction zakatcalculatorCalculate() {\r\n const cashHand = parseFloat(document.getElementById('cashHand').value) || 0;\r\n const cashBank = parseFloat(document.getElementById('cashBank').value) || 0;\r\n const goldWeight = parseFloat(document.getElementById('goldWeight').value) || 0;\r\n const goldPrice = parseFloat(document.getElementById('goldPrice').value) || 0;\r\n const silverWeight = parseFloat(document.getElementById('silverWeight').value) || 0;\r\n const silverPrice = parseFloat(document.getElementById('silverPrice').value) || 0;\r\n \r\n // Calculate totals\r\n const totalAssets = cashHand + cashBank + (goldWeight * goldPrice) + (silverWeight * silverPrice);\r\n const nisabThreshold = 85 * goldPrice;\r\n \r\n // Update display\r\n document.getElementById('totalAssetsDisplay').textContent = \r\n formatCurrency(totalAssets);\r\n \r\n document.getElementById('netAssetsDisplay').textContent = \r\n formatCurrency(totalAssets);\r\n \r\n if (goldPrice > 0) {\r\n document.getElementById('nisabValueDisplay').textContent = \r\n formatCurrency(nisabThreshold);\r\n } else {\r\n document.getElementById('nisabValueDisplay').textContent = '...';\r\n }\r\n \r\n // Update status and final zakat\r\n const statusBadge = document.getElementById('statusBadge');\r\n const finalDisplay = document.getElementById('finalZakatDisplay');\r\n const payButton = document.querySelector('.zakatcalculator-section__pay-button');\r\n \r\n if (totalAssets >= nisabThreshold && goldPrice > 0 && zakatcalculatorPricesLoaded) {\r\n const zakatAmount = totalAssets * 0.025;\r\n finalDisplay.textContent = formatCurrency(zakatAmount);\r\n \r\n // Update status badge\r\n statusBadge.textContent = '✓ Zakat is due (Nisab reached)';\r\n statusBadge.className = 'zakatcalculator-section__status zakatcalculator-section__status--eligible';\r\n \r\n // Enable pay button\r\n payButton.disabled = false;\r\n payButton.innerHTML = ' Pay Zakat Now';\r\n \r\n } else {\r\n finalDisplay.textContent = '0.00 $';\r\n \r\n // Update status badge\r\n if (!zakatcalculatorPricesLoaded) {\r\n statusBadge.textContent = 'Enter data to check eligibility';\r\n statusBadge.className = 'zakatcalculator-section__status zakatcalculator-section__status--not-eligible';\r\n } else if (totalAssets < nisabThreshold) {\r\n statusBadge.textContent = 'Zakat is not due (Nisab not reached)';\r\n statusBadge.className = 'zakatcalculator-section__status zakatcalculator-section__status--not-eligible';\r\n } else {\r\n statusBadge.textContent = 'Enter data to check eligibility';\r\n statusBadge.className = 'zakatcalculator-section__status zakatcalculator-section__status--not-eligible';\r\n }\r\n \r\n // Disable pay button\r\n payButton.disabled = true;\r\n payButton.innerHTML = ' Pay Zakat Now';\r\n }\r\n}\r\n\r\n// Format currency\r\nfunction formatCurrency(amount) {\r\n return new Intl.NumberFormat('en-US', {\r\n style: 'currency',\r\n currency: 'USD',\r\n minimumFractionDigits: 2,\r\n maximumFractionDigits: 2\r\n }).format(amount);\r\n}\r\n\r\n// Add zakat to cart\r\nfunction zakatcalculatorAddToCart() {\r\n const amountText = document.getElementById('finalZakatDisplay').textContent;\r\n const amount = parseFloat(amountText.replace(/[^0-9.-]+/g, \"\"));\r\n \r\n if (amount > 0 && !isNaN(amount)) {\r\n // Use your existing addToCart function\r\n if (typeof addToCart === 'function') {\r\n addToCart('Calculated Zakat', amount, 'Zakat');\r\n } else {\r\n // Fallback if addToCart is not defined\r\n alert(`Calculated Zakat amount: ${amountText}`);\r\n }\r\n } else {\r\n alert(\"Invalid zakat amount. Please check your inputs.\");\r\n }\r\n}\r\n\r\n// Input validation\r\nfunction validateZakatInput(input) {\r\n const value = parseFloat(input.value);\r\n const min = parseFloat(input.getAttribute('min')) || 0;\r\n \r\n if (isNaN(value) || value < min) {\r\n input.classList.add('zakatcalculator-section__input--invalid');\r\n return false;\r\n } else {\r\n input.classList.remove('zakatcalculator-section__input--invalid');\r\n input.classList.add('zakatcalculator-section__input--valid');\r\n return true;\r\n }\r\n}","animate_delay":"0"},"editing":false,"element_name":"gva_text_noeditor"}],"editing":false,"element_name":"gva_column"}],"editing":false,"element_name":"gva_row"},{"settings":{"element":"gva_row","bg_particles":"off","bg_position":"center top","bg_repeat":"no-repeat","bg_attachment":"scroll","bg_size":"cover","style_space":"remove_margin remove_padding remove_padding_col","layout":"container-fw","class":"partner","margin_top":"30","margin_bottom":"30"},"columns":[{"settings":{"element":"gva_column"},"col_lg":12,"elements":[{"settings":{"content":"\r\n \r\n Strategic Partnerships\r\n Our partners in creating hope\r\n \r\n \r\n ","animate_delay":"0"},"editing":false,"element_name":"gva_text_noeditor"},{"settings":{"title_admin":"Partners: Partners Block - en","block_drupal":"views_block__partners_block_2","hidden_title":"on","align_title":"title-align-right","remove_margin":"on","style_text":"text-dark","animate_delay":"0"},"editing":false,"element_name":"gva_drupal_block"}],"editing":false,"element_name":"gva_column"}],"editing":false,"element_name":"gva_row"}]') (Line: 47)
Drupal\gavias_content_builder\Plugin\Field\FieldFormatter\GaviasContentBuilderFormatter->viewElements(Object, 'en') (Line: 89)
Drupal\Core\Field\FormatterBase->view(Object, 'en') (Line: 263)
Drupal\Core\Entity\Entity\EntityViewDisplay->buildMultiple(Array) (Line: 351)
Drupal\Core\Entity\EntityViewBuilder->buildComponents(Array, Array, Array, 'full') (Line: 24)
Drupal\node\NodeViewBuilder->buildComponents(Array, Array, Array, 'full') (Line: 293)
Drupal\Core\Entity\EntityViewBuilder->buildMultiple(Array) (Line: 250)
Drupal\Core\Entity\EntityViewBuilder->build(Array)
call_user_func_array(Array, Array) (Line: 100)
Drupal\Core\Render\Renderer->doTrustedCallback(Array, Array, 'Render #pre_render callbacks must be methods of a class that implements \Drupal\Core\Security\TrustedCallbackInterface or be an anonymous function. The callback was %s. Support for this callback implementation is deprecated in 8.8.0 and will be removed in Drupal 9.0.0. See https://www.drupal.org/node/2966725', 'silenced_deprecation', 'Drupal\Core\Render\Element\RenderCallbackInterface') (Line: 781)
Drupal\Core\Render\Renderer->doCallback('#pre_render', Array, Array) (Line: 372)
Drupal\Core\Render\Renderer->doRender(Array, ) (Line: 200)
Drupal\Core\Render\Renderer->render(Array, ) (Line: 226)
Drupal\Core\Render\MainContent\HtmlRenderer->Drupal\Core\Render\MainContent\{closure}() (Line: 573)
Drupal\Core\Render\Renderer->executeInRenderContext(Object, Object) (Line: 227)
Drupal\Core\Render\MainContent\HtmlRenderer->prepare(Array, Object, Object) (Line: 117)
Drupal\Core\Render\MainContent\HtmlRenderer->renderResponse(Array, Object, Object) (Line: 90)
Drupal\Core\EventSubscriber\MainContentViewSubscriber->onViewRenderArray(Object, 'kernel.view', Object)
call_user_func(Array, Object, 'kernel.view', Object) (Line: 111)
Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher->dispatch('kernel.view', Object) (Line: 156)
Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object, 1) (Line: 68)
Symfony\Component\HttpKernel\HttpKernel->handle(Object, 1, 1) (Line: 57)
Drupal\Core\StackMiddleware\Session->handle(Object, 1, 1) (Line: 47)
Drupal\Core\StackMiddleware\KernelPreHandle->handle(Object, 1, 1) (Line: 191)
Drupal\page_cache\StackMiddleware\PageCache->fetch(Object, 1, 1) (Line: 128)
Drupal\page_cache\StackMiddleware\PageCache->lookup(Object, 1, 1) (Line: 82)
Drupal\page_cache\StackMiddleware\PageCache->handle(Object, 1, 1) (Line: 47)
Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle(Object, 1, 1) (Line: 52)
Drupal\Core\StackMiddleware\NegotiationMiddleware->handle(Object, 1, 1) (Line: 23)
Stack\StackedHttpKernel->handle(Object, 1, 1) (Line: 708)
Drupal\Core\DrupalKernel->handle(Object) (Line: 19)
- Deprecated function: implode(): Passing glue string after array is deprecated. Swap the parameters in element_gva_column->render_content() (line 463 of themes/gavias_kunco/gva_content_builder/gva_column.php).
element_gva_column->render_content(Array, '
حملاتنا
أثر عطائكم… حياة تتغيّر
مع كل مساهمة، نصنع فرقًا حقيقيًا ونترك أثرًا إنسانيًا يمتد أثره إلى حياة أكثر استقرارًا وأملًا.
أثر عطائكم في حملاتنا
نؤمن أن عطائكم هو القوة الحقيقية خلف كل حملة نطلقها. فمن خلال دعمكم، تتحول المبادرات الإنسانية إلى قصص أمل، ويصبح الأثر واقعًا يلمسه الإنسان في حياته اليومية.
{
entries.forEach(entry => {
if (entry.isIntersecting) {
entry.target.classList.add('active');
}
})
}, { threshold: 0.1 });
reveals.forEach(el => revealObserver.observe(el));
function toggleCart() {
alert('Cart toggle clicked');
}
function toggleMobileMenu() {
alert('Mobile menu clicked');
}
//-->
<a href="/en/node/262" hreflang="en">Support a student</a>
Humanitarian Case
In remote villages in Chad, residents suffer from a scarcity of potable water, forcing women and children to travel long distances daily in search of water.
<a href="/en/node/262" class="sliderfront-section__slide-button sliderfront-section__slide-button--education">
Read the full story
</a>
<a href="/en/node/261" hreflang="en">Support a student</a>
Humanitarian Case
In remote villages in Chad, residents suffer from a scarcity of potable water, forcing women and children to travel long distances daily in search of water.
<a href="/en/node/261" class="sliderfront-section__slide-button sliderfront-section__slide-button--education">
Read the full story
</a>
') (Line: 110)
gavias_content_builder_render_element('gva_column', Array, '
حملاتنا
أثر عطائكم… حياة تتغيّر
مع كل مساهمة، نصنع فرقًا حقيقيًا ونترك أثرًا إنسانيًا يمتد أثره إلى حياة أكثر استقرارًا وأملًا.
أثر عطائكم في حملاتنا
نؤمن أن عطائكم هو القوة الحقيقية خلف كل حملة نطلقها. فمن خلال دعمكم، تتحول المبادرات الإنسانية إلى قصص أمل، ويصبح الأثر واقعًا يلمسه الإنسان في حياته اليومية.
{
entries.forEach(entry => {
if (entry.isIntersecting) {
entry.target.classList.add('active');
}
})
}, { threshold: 0.1 });
reveals.forEach(el => revealObserver.observe(el));
function toggleCart() {
alert('Cart toggle clicked');
}
function toggleMobileMenu() {
alert('Mobile menu clicked');
}
//-->
<a href="/en/node/262" hreflang="en">Support a student</a>
Humanitarian Case
In remote villages in Chad, residents suffer from a scarcity of potable water, forcing women and children to travel long distances daily in search of water.
<a href="/en/node/262" class="sliderfront-section__slide-button sliderfront-section__slide-button--education">
Read the full story
</a>
<a href="/en/node/261" hreflang="en">Support a student</a>
Humanitarian Case
In remote villages in Chad, residents suffer from a scarcity of potable water, forcing women and children to travel long distances daily in search of water.
<a href="/en/node/261" class="sliderfront-section__slide-button sliderfront-section__slide-button--education">
Read the full story
</a>
') (Line: 58)
gavias_content_builder_render_el(Array) (Line: 22)
gavias_content_builder_frontend('[{"settings":{"bg_particles":"off","bg_position":"center top","bg_repeat":"no-repeat","bg_attachment":"scroll","bg_size":"cover","style_space":"remove_padding","layout":"container-fw"},"columns":[{"settings":{"element":"gva_column","bg_position":"center top","bg_repeat":"no-repeat","bg_attachment":"scroll","bg_size":"cover","el_class":"front"},"col_lg":12,"elements":[{"settings":{"content":"\r\n \r\n \r\n \r\n \r\n Urgent Appeal\r\n \r\n Be a helping hand for them in\r\n times of crisis\r\n \r\n \r\n At \"Wejdan Charity\", we work with full transparency to deliver your donations to those in need in conflict and poverty-stricken areas.\r\n \r\n \r\n <a>\r\n Charity Donations \r\n </a>\r\n <a>\r\n Our Projects \r\n </a>\r\n \r\n \r\n \r\n \r\n","animate_delay":"0"},"editing":false,"element_name":"gva_text_noeditor"}],"editing":false,"element_name":"gva_column"}],"editing":false,"element_name":"gva_row"},{"settings":{"element":"gva_row","bg_particles":"off","bg_position":"center top","bg_repeat":"no-repeat","bg_attachment":"scroll","bg_size":"cover","style_space":"remove_padding","layout":"container","class":"before-help-region"},"columns":[{"settings":{"element":"gva_column"},"col_lg":12,"elements":[{"settings":{"title":"Take action for animals now","link":"#","button_title":"Donation Now","button_align":"button-right-v2","style_text":"text-light","style_button":"btn-theme","donorbox":"off","target":"off","el_class":"margin","animate":"fade-up","animate_delay":"0"},"editing":false,"element_name":"gva_call_to_action"}],"editing":false,"element_name":"gva_column"}],"editing":false,"element_name":"gva_row"},{"settings":{"element":"gva_row","bg_particles":"off","bg_position":"center top","bg_repeat":"no-repeat","bg_attachment":"scroll","bg_size":"cover","style_space":"remove_padding","layout":"container-fw","bg_color":"#f9fafb"},"columns":[{"settings":{"element":"gva_column","bg_position":"center top","bg_repeat":"no-repeat","bg_attachment":"scroll","bg_size":"cover","el_class":"about"},"col_lg":12,"elements":[{"settings":{"content":"\r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n \r\n \r\n Who We Are\r\n \r\n \r\n We plant hope.. \r\n and build people and the future\r\n \r\n \r\n Wejdan Charity is a leading humanitarian organization, founded with an ambitious vision to be a bridge of الخير between donors and those in need.\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n Development Stages\r\n A continuous journey of growth\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n Areas of Work\r\n We reach where the need is\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \"We work with passion to bring smiles\"\r\n \r\n \r\n \r\n \r\n \r\n","animate_delay":"0"},"editing":false,"element_name":"gva_text_noeditor"}],"editing":false,"element_name":"gva_column"}],"editing":false,"element_name":"gva_row"},{"settings":{"element":"gva_row","bg_particles":"off","bg_position":"center top","bg_repeat":"no-repeat","bg_attachment":"scroll","bg_size":"cover","style_space":"remove_margin remove_padding remove_padding_col","layout":"container-fw","class":"partner","margin_top":"30","margin_bottom":"30"},"columns":[{"settings":{"element":"gva_column"},"col_lg":12,"elements":[{"settings":{"content":"\r\n\r\n \r\n \r\n Initiatives & Programs\r\n Our Areas of Work\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n Ongoing Charity\r\n Water wells, mosque construction\r\n \r\n \r\n \r\n \r\n \r\n \r\n Student Sponsorship\r\n Building the future through education\r\n \r\n \r\n \r\n \r\n \r\n \r\n Humanitarian Cases\r\n Patient treatment, surgeries\r\n \r\n \r\n \r\n \r\n \r\n \r\n Development Projects\r\n Empowering productive families\r\n \r\n \r\n<a>Learn more about our programs and initiatives</a>\r\n \r\n","animate_delay":"0"},"editing":false,"element_name":"gva_text_noeditor"}],"editing":false,"element_name":"gva_column"}],"editing":false,"element_name":"gva_row"},{"settings":{"element":"gva_row","bg_particles":"off","bg_position":"center top","bg_repeat":"no-repeat","bg_attachment":"scroll","bg_size":"cover","style_space":"remove_margin remove_padding remove_padding_col","layout":"container","class":"newsfront"},"columns":[{"settings":{"element":"gva_column"},"col_lg":12,"elements":[{"settings":{"content":"\r\n \r\n \r\n Our News\r\n \r\n \r\n \r\nNews that tells the story of giving \r\n \r\n","animate_delay":"0"},"editing":false,"element_name":"gva_text_noeditor"},{"settings":{"title_admin":"news: news Block -en","block_drupal":"views_block__news_block_3","hidden_title":"on","align_title":"title-align-left","remove_margin":"on","style_text":"text-dark","animate_delay":"0"},"editing":false,"element_name":"gva_drupal_block"}],"editing":false,"element_name":"gva_column"}],"editing":false,"element_name":"gva_row"},{"settings":{"bg_particles":"off","bg_position":"center top","bg_repeat":"no-repeat","bg_attachment":"scroll","bg_size":"cover","style_space":"remove_padding","layout":"container-fw","element":"gva_row","class":"sliderfrontpage"},"columns":[{"settings":{"element":"gva_column","bg_position":"center top","bg_repeat":"no-repeat","bg_attachment":"scroll","bg_size":"cover"},"col_lg":12,"elements":[{"settings":{"title_admin":"news: campigns-en","block_drupal":"views_block__news_block_5","hidden_title":"on","align_title":"title-align-right","remove_margin":"on","style_text":"text-dark","animate_delay":"0"},"editing":false,"element_name":"gva_drupal_block"}],"editing":false,"element_name":"gva_column"}],"editing":false,"element_name":"gva_row"},{"settings":{"element":"gva_row","bg_particles":"off","bg_position":"center top","bg_repeat":"no-repeat","bg_attachment":"scroll","bg_size":"cover","style_space":"remove_margin remove_padding remove_padding_col","layout":"container-fw","class":"partner"},"columns":[{"settings":{"element":"gva_column"},"col_lg":12,"elements":[{"settings":{"content":"\r\n \r\n \r\n \r\n Our Distinguished Projects\r\n \r\n \r\n \r\n At Wejdan Charity, we strive to provide support and assistance to communities in need who are affected by disasters, crises, and wars, with the aim of improving quality of life and promoting sustainable development. Our projects span across several areas:\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n Relief Projects\r\n Emergency response to disasters and wars, providing food and medicine.\r\n \r\n<a> Browse Projects </a>\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n Development Projects\r\n Empowering communities and building capacities.\r\n \r\n<a> Browse Projects </a>\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n Seasonal Projects\r\n Ramadan campaigns, Qurbani, and winter clothing.\r\n \r\n<a> Browse Projects </a>\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n Endowment Projects\r\n An investment for the hereafter—mosques, wells, and charitable endowments.\r\n<a> Browse Projects </a>\r\n \r\n \r\n \r\n \r\n","animate_delay":"0"},"editing":false,"element_name":"gva_text_noeditor"}],"editing":false,"element_name":"gva_column"}],"editing":false,"element_name":"gva_row"},{"settings":{"element":"gva_row","bg_particles":"off","bg_position":"center top","bg_repeat":"no-repeat","bg_attachment":"scroll","bg_size":"cover","style_space":"remove_margin remove_padding remove_padding_col","layout":"container-fw","class":"partner"},"columns":[{"settings":{"element":"gva_column"},"col_lg":12,"elements":[{"settings":{"content":"\r\n \r\n \r\n\r\n \r\n \r\n Our Achievements in Numbers\r\n Your trust makes the difference\r\n \r\n \r\n\r\n \r\n \r\n 0\r\n Beneficiaries worldwide\r\n \r\n \r\n \r\n 0\r\n Projects implemented\r\n \r\n \r\n \r\n 0\r\n Countries we operate in\r\n \r\n \r\n \r\n 0\r\n Volunteers\r\n \r\n \r\n \r\n \r\n\r\n\r\n// Enhanced counter animation for facts section\r\nfunction animateFactsCounters() {\r\n const statNumbers = document.querySelectorAll('.facts-section__stat-number');\r\n \r\n const observer = new IntersectionObserver((entries) => {\r\n entries.forEach(entry => {\r\n if (entry.isIntersecting) {\r\n const counter = entry.target;\r\n const target = parseInt(counter.getAttribute('data-target'));\r\n const duration = 2000;\r\n const increment = target / (duration / 16);\r\n \r\n let current = 0;\r\n const updateCounter = () => {\r\n current += increment;\r\n if (current < target) {\r\n // Format number with K for thousands\r\n let displayNum = Math.ceil(current);\r\n if (displayNum >= 1000) {\r\n counter.textContent = (displayNum / 1000).toFixed(1).replace('.0', '') + 'K';\r\n } else {\r\n counter.textContent = displayNum.toLocaleString();\r\n }\r\n requestAnimationFrame(updateCounter);\r\n } else {\r\n // Final formatting\r\n if (target >= 1000) {\r\n counter.textContent = (target / 1000).toFixed(1).replace('.0', '') + 'K';\r\n counter.classList.add('formatted');\r\n } else {\r\n counter.textContent = target.toLocaleString();\r\n }\r\n counter.classList.add('animated');\r\n setTimeout(() => counter.classList.remove('animated'), 600);\r\n }\r\n };\r\n updateCounter();\r\n observer.unobserve(counter);\r\n }\r\n });\r\n }, { threshold: 0.5, rootMargin: '0px 0px -50px 0px' });\r\n \r\n statNumbers.forEach(counter => observer.observe(counter));\r\n}\r\n\r\n// Call this function when DOM is loaded\r\ndocument.addEventListener('DOMContentLoaded', () => {\r\n animateFactsCounters();\r\n});","animate_delay":"0"},"editing":false,"element_name":"gva_text_noeditor"}],"editing":false,"element_name":"gva_column"}],"editing":false,"element_name":"gva_row"},{"settings":{"element":"gva_row","bg_particles":"off","bg_position":"center top","bg_repeat":"no-repeat","bg_attachment":"scroll","bg_size":"cover","style_space":"remove_margin remove_padding remove_padding_col","layout":"container-fw","class":"zakatcalc"},"columns":[{"settings":{"element":"gva_column"},"col_lg":12,"elements":[{"settings":{"content":"\r\n\r\n \r\n \r\n \r\n \r\nSmart Zakat Calculator\r\n A precise and comprehensive tool\r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n \r\n \r\n Money & Savings\r\n \r\n \r\n \r\n Cash (on hand or at home)\r\n \r\n \r\n $\r\n \r\n \r\n \r\n Bank balances\r\n \r\n \r\n $\r\n \r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n Gold & Silver\r\n \r\n \r\n Refresh Prices\r\n \r\n \r\n \r\n \r\n \r\n Gold weight (grams)\r\n \r\n \r\n \r\n \r\n Current gold price per gram\r\n \r\n Live\r\n \r\n \r\n \r\n \r\n $ / gram\r\n \r\n \r\n \r\n\r\n \r\n \r\n Silver weight (grams)\r\n \r\n \r\n \r\n \r\n Current silver price per gram\r\n \r\n Live\r\n \r\n \r\n \r\n \r\n $ / gram\r\n \r\n \r\n \r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n Zakat Summary\r\n \r\n \r\n Total assets:\r\n 0.00 $\r\n \r\n \r\n Net zakatable assets:\r\n 0.00 $\r\n \r\n \r\n Nisab value (85g gold):\r\n ...\r\n \r\n \r\n Enter data to check eligibility\r\n \r\n \r\n \r\n\r\n \r\n \r\n Zakat due (2.5%)\r\n 0.00 $\r\n \r\n \r\n <a>\r\n \r\n Contact via WhatsApp for consultation and donation\r\n </a>\r\n \r\n \r\n \r\n \r\n\r\n\r\n// Zakat Calculator Logic\r\nlet zakatcalculatorPricesLoaded = false;\r\n\r\n// Initialize calculator when DOM is loaded\r\ndocument.addEventListener('DOMContentLoaded', () => {\r\n zakatcalculatorFetchPrices();\r\n zakatcalculatorCalculate();\r\n \r\n // Add input event listeners for real-time calculation\r\n const inputs = document.querySelectorAll('.zakatcalculator-section__input');\r\n inputs.forEach(input => {\r\n input.addEventListener('input', zakatcalculatorCalculate);\r\n });\r\n \r\n // Format numbers as user types\r\n inputs.forEach(input => {\r\n input.addEventListener('blur', function() {\r\n if (this.value) {\r\n const value = parseFloat(this.value);\r\n if (!isNaN(value)) {\r\n this.value = value.toLocaleString('en-US', {\r\n minimumFractionDigits: 2,\r\n maximumFractionDigits: 2\r\n });\r\n }\r\n }\r\n });\r\n \r\n input.addEventListener('focus', function() {\r\n if (this.value) {\r\n this.value = this.value.replace(/[^\\d.]/g, '');\r\n }\r\n });\r\n });\r\n});\r\n\r\n// Fetch metal prices\r\nasync function zakatcalculatorFetchPrices() {\r\n const goldInput = document.getElementById('goldPrice');\r\n const silverInput = document.getElementById('silverPrice');\r\n const refreshButton = document.querySelector('.zakatcalculator-section__refresh-button');\r\n const refreshIcon = document.querySelector('.zakatcalculator-section__refresh-icon');\r\n \r\n if (!refreshButton || !refreshIcon) return;\r\n \r\n // Show loading state\r\n refreshButton.disabled = true;\r\n refreshIcon.classList.add('zakatcalculator-section__refresh-icon--spinning');\r\n goldInput.classList.add('zakatcalculator-section__input--loading');\r\n silverInput.classList.add('zakatcalculator-section__input--loading');\r\n \r\n try {\r\n // Simulate API call with delay\r\n await new Promise(resolve => setTimeout(resolve, 1500));\r\n \r\n // Mock data (in a real app, you would fetch from an API)\r\n const liveGoldPrice = 76.50;\r\n const liveSilverPrice = 0.95;\r\n \r\n // Update inputs\r\n goldInput.value = liveGoldPrice.toFixed(2);\r\n silverInput.value = liveSilverPrice.toFixed(2);\r\n \r\n // Remove loading state\r\n goldInput.classList.remove('zakatcalculator-section__input--loading');\r\n silverInput.classList.remove('zakatcalculator-section__input--loading');\r\n goldInput.classList.add('zakatcalculator-section__input--valid');\r\n silverInput.classList.add('zakatcalculator-section__input--valid');\r\n \r\n zakatcalculatorPricesLoaded = true;\r\n \r\n // Show success feedback\r\n refreshButton.innerHTML = ' Updated';\r\n refreshButton.style.backgroundColor = '#617f67';\r\n refreshButton.style.color = 'white';\r\n \r\n setTimeout(() => {\r\n refreshButton.innerHTML = ' Refresh Prices';\r\n refreshButton.style.backgroundColor = '';\r\n refreshButton.style.color = '';\r\n }, 2000);\r\n \r\n } catch (error) {\r\n console.error(\"Failed to fetch prices\", error);\r\n \r\n // Fallback values\r\n goldInput.value = 75.00;\r\n silverInput.value = 0.90;\r\n \r\n // Show error state\r\n goldInput.classList.remove('zakatcalculator-section__input--loading');\r\n silverInput.classList.remove('zakatcalculator-section__input--loading');\r\n goldInput.classList.add('zakatcalculator-section__input--invalid');\r\n silverInput.classList.add('zakatcalculator-section__input--invalid');\r\n \r\n refreshButton.innerHTML = ' Update Failed';\r\n refreshButton.style.backgroundColor = '#dc2626';\r\n refreshButton.style.color = 'white';\r\n \r\n setTimeout(() => {\r\n refreshButton.innerHTML = ' Refresh Prices';\r\n refreshButton.style.backgroundColor = '';\r\n refreshButton.style.color = '';\r\n }, 2000);\r\n \r\n } finally {\r\n refreshButton.disabled = false;\r\n refreshIcon.classList.remove('zakatcalculator-section__refresh-icon--spinning');\r\n \r\n // Recalculate zakat\r\n zakatcalculatorCalculate();\r\n }\r\n}\r\n\r\n// Calculate zakat\r\nfunction zakatcalculatorCalculate() {\r\n const cashHand = parseFloat(document.getElementById('cashHand').value) || 0;\r\n const cashBank = parseFloat(document.getElementById('cashBank').value) || 0;\r\n const goldWeight = parseFloat(document.getElementById('goldWeight').value) || 0;\r\n const goldPrice = parseFloat(document.getElementById('goldPrice').value) || 0;\r\n const silverWeight = parseFloat(document.getElementById('silverWeight').value) || 0;\r\n const silverPrice = parseFloat(document.getElementById('silverPrice').value) || 0;\r\n \r\n // Calculate totals\r\n const totalAssets = cashHand + cashBank + (goldWeight * goldPrice) + (silverWeight * silverPrice);\r\n const nisabThreshold = 85 * goldPrice;\r\n \r\n // Update display\r\n document.getElementById('totalAssetsDisplay').textContent = \r\n formatCurrency(totalAssets);\r\n \r\n document.getElementById('netAssetsDisplay').textContent = \r\n formatCurrency(totalAssets);\r\n \r\n if (goldPrice > 0) {\r\n document.getElementById('nisabValueDisplay').textContent = \r\n formatCurrency(nisabThreshold);\r\n } else {\r\n document.getElementById('nisabValueDisplay').textContent = '...';\r\n }\r\n \r\n // Update status and final zakat\r\n const statusBadge = document.getElementById('statusBadge');\r\n const finalDisplay = document.getElementById('finalZakatDisplay');\r\n const payButton = document.querySelector('.zakatcalculator-section__pay-button');\r\n \r\n if (totalAssets >= nisabThreshold && goldPrice > 0 && zakatcalculatorPricesLoaded) {\r\n const zakatAmount = totalAssets * 0.025;\r\n finalDisplay.textContent = formatCurrency(zakatAmount);\r\n \r\n // Update status badge\r\n statusBadge.textContent = '✓ Zakat is due (Nisab reached)';\r\n statusBadge.className = 'zakatcalculator-section__status zakatcalculator-section__status--eligible';\r\n \r\n // Enable pay button\r\n payButton.disabled = false;\r\n payButton.innerHTML = ' Pay Zakat Now';\r\n \r\n } else {\r\n finalDisplay.textContent = '0.00 $';\r\n \r\n // Update status badge\r\n if (!zakatcalculatorPricesLoaded) {\r\n statusBadge.textContent = 'Enter data to check eligibility';\r\n statusBadge.className = 'zakatcalculator-section__status zakatcalculator-section__status--not-eligible';\r\n } else if (totalAssets < nisabThreshold) {\r\n statusBadge.textContent = 'Zakat is not due (Nisab not reached)';\r\n statusBadge.className = 'zakatcalculator-section__status zakatcalculator-section__status--not-eligible';\r\n } else {\r\n statusBadge.textContent = 'Enter data to check eligibility';\r\n statusBadge.className = 'zakatcalculator-section__status zakatcalculator-section__status--not-eligible';\r\n }\r\n \r\n // Disable pay button\r\n payButton.disabled = true;\r\n payButton.innerHTML = ' Pay Zakat Now';\r\n }\r\n}\r\n\r\n// Format currency\r\nfunction formatCurrency(amount) {\r\n return new Intl.NumberFormat('en-US', {\r\n style: 'currency',\r\n currency: 'USD',\r\n minimumFractionDigits: 2,\r\n maximumFractionDigits: 2\r\n }).format(amount);\r\n}\r\n\r\n// Add zakat to cart\r\nfunction zakatcalculatorAddToCart() {\r\n const amountText = document.getElementById('finalZakatDisplay').textContent;\r\n const amount = parseFloat(amountText.replace(/[^0-9.-]+/g, \"\"));\r\n \r\n if (amount > 0 && !isNaN(amount)) {\r\n // Use your existing addToCart function\r\n if (typeof addToCart === 'function') {\r\n addToCart('Calculated Zakat', amount, 'Zakat');\r\n } else {\r\n // Fallback if addToCart is not defined\r\n alert(`Calculated Zakat amount: ${amountText}`);\r\n }\r\n } else {\r\n alert(\"Invalid zakat amount. Please check your inputs.\");\r\n }\r\n}\r\n\r\n// Input validation\r\nfunction validateZakatInput(input) {\r\n const value = parseFloat(input.value);\r\n const min = parseFloat(input.getAttribute('min')) || 0;\r\n \r\n if (isNaN(value) || value < min) {\r\n input.classList.add('zakatcalculator-section__input--invalid');\r\n return false;\r\n } else {\r\n input.classList.remove('zakatcalculator-section__input--invalid');\r\n input.classList.add('zakatcalculator-section__input--valid');\r\n return true;\r\n }\r\n}","animate_delay":"0"},"editing":false,"element_name":"gva_text_noeditor"}],"editing":false,"element_name":"gva_column"}],"editing":false,"element_name":"gva_row"},{"settings":{"element":"gva_row","bg_particles":"off","bg_position":"center top","bg_repeat":"no-repeat","bg_attachment":"scroll","bg_size":"cover","style_space":"remove_margin remove_padding remove_padding_col","layout":"container-fw","class":"partner","margin_top":"30","margin_bottom":"30"},"columns":[{"settings":{"element":"gva_column"},"col_lg":12,"elements":[{"settings":{"content":"\r\n \r\n Strategic Partnerships\r\n Our partners in creating hope\r\n \r\n \r\n ","animate_delay":"0"},"editing":false,"element_name":"gva_text_noeditor"},{"settings":{"title_admin":"Partners: Partners Block - en","block_drupal":"views_block__partners_block_2","hidden_title":"on","align_title":"title-align-right","remove_margin":"on","style_text":"text-dark","animate_delay":"0"},"editing":false,"element_name":"gva_drupal_block"}],"editing":false,"element_name":"gva_column"}],"editing":false,"element_name":"gva_row"}]') (Line: 47)
Drupal\gavias_content_builder\Plugin\Field\FieldFormatter\GaviasContentBuilderFormatter->viewElements(Object, 'en') (Line: 89)
Drupal\Core\Field\FormatterBase->view(Object, 'en') (Line: 263)
Drupal\Core\Entity\Entity\EntityViewDisplay->buildMultiple(Array) (Line: 351)
Drupal\Core\Entity\EntityViewBuilder->buildComponents(Array, Array, Array, 'full') (Line: 24)
Drupal\node\NodeViewBuilder->buildComponents(Array, Array, Array, 'full') (Line: 293)
Drupal\Core\Entity\EntityViewBuilder->buildMultiple(Array) (Line: 250)
Drupal\Core\Entity\EntityViewBuilder->build(Array)
call_user_func_array(Array, Array) (Line: 100)
Drupal\Core\Render\Renderer->doTrustedCallback(Array, Array, 'Render #pre_render callbacks must be methods of a class that implements \Drupal\Core\Security\TrustedCallbackInterface or be an anonymous function. The callback was %s. Support for this callback implementation is deprecated in 8.8.0 and will be removed in Drupal 9.0.0. See https://www.drupal.org/node/2966725', 'silenced_deprecation', 'Drupal\Core\Render\Element\RenderCallbackInterface') (Line: 781)
Drupal\Core\Render\Renderer->doCallback('#pre_render', Array, Array) (Line: 372)
Drupal\Core\Render\Renderer->doRender(Array, ) (Line: 200)
Drupal\Core\Render\Renderer->render(Array, ) (Line: 226)
Drupal\Core\Render\MainContent\HtmlRenderer->Drupal\Core\Render\MainContent\{closure}() (Line: 573)
Drupal\Core\Render\Renderer->executeInRenderContext(Object, Object) (Line: 227)
Drupal\Core\Render\MainContent\HtmlRenderer->prepare(Array, Object, Object) (Line: 117)
Drupal\Core\Render\MainContent\HtmlRenderer->renderResponse(Array, Object, Object) (Line: 90)
Drupal\Core\EventSubscriber\MainContentViewSubscriber->onViewRenderArray(Object, 'kernel.view', Object)
call_user_func(Array, Object, 'kernel.view', Object) (Line: 111)
Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher->dispatch('kernel.view', Object) (Line: 156)
Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object, 1) (Line: 68)
Symfony\Component\HttpKernel\HttpKernel->handle(Object, 1, 1) (Line: 57)
Drupal\Core\StackMiddleware\Session->handle(Object, 1, 1) (Line: 47)
Drupal\Core\StackMiddleware\KernelPreHandle->handle(Object, 1, 1) (Line: 191)
Drupal\page_cache\StackMiddleware\PageCache->fetch(Object, 1, 1) (Line: 128)
Drupal\page_cache\StackMiddleware\PageCache->lookup(Object, 1, 1) (Line: 82)
Drupal\page_cache\StackMiddleware\PageCache->handle(Object, 1, 1) (Line: 47)
Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle(Object, 1, 1) (Line: 52)
Drupal\Core\StackMiddleware\NegotiationMiddleware->handle(Object, 1, 1) (Line: 23)
Stack\StackedHttpKernel->handle(Object, 1, 1) (Line: 708)
Drupal\Core\DrupalKernel->handle(Object) (Line: 19)
- Deprecated function: implode(): Passing glue string after array is deprecated. Swap the parameters in element_gva_row->render_content() (line 317 of themes/gavias_kunco/gva_content_builder/gva_row.php).
element_gva_row->render_content(Array, '
حملاتنا
أثر عطائكم… حياة تتغيّر
مع كل مساهمة، نصنع فرقًا حقيقيًا ونترك أثرًا إنسانيًا يمتد أثره إلى حياة أكثر استقرارًا وأملًا.
أثر عطائكم في حملاتنا
نؤمن أن عطائكم هو القوة الحقيقية خلف كل حملة نطلقها. فمن خلال دعمكم، تتحول المبادرات الإنسانية إلى قصص أمل، ويصبح الأثر واقعًا يلمسه الإنسان في حياته اليومية.
{
entries.forEach(entry => {
if (entry.isIntersecting) {
entry.target.classList.add('active');
}
})
}, { threshold: 0.1 });
reveals.forEach(el => revealObserver.observe(el));
function toggleCart() {
alert('Cart toggle clicked');
}
function toggleMobileMenu() {
alert('Mobile menu clicked');
}
//-->
<a href="/en/node/262" hreflang="en">Support a student</a>
Humanitarian Case
In remote villages in Chad, residents suffer from a scarcity of potable water, forcing women and children to travel long distances daily in search of water.
<a href="/en/node/262" class="sliderfront-section__slide-button sliderfront-section__slide-button--education">
Read the full story
</a>
<a href="/en/node/261" hreflang="en">Support a student</a>
Humanitarian Case
In remote villages in Chad, residents suffer from a scarcity of potable water, forcing women and children to travel long distances daily in search of water.
<a href="/en/node/261" class="sliderfront-section__slide-button sliderfront-section__slide-button--education">
Read the full story
</a>
') (Line: 110)
gavias_content_builder_render_element('gva_row', Array, '
حملاتنا
أثر عطائكم… حياة تتغيّر
مع كل مساهمة، نصنع فرقًا حقيقيًا ونترك أثرًا إنسانيًا يمتد أثره إلى حياة أكثر استقرارًا وأملًا.
أثر عطائكم في حملاتنا
نؤمن أن عطائكم هو القوة الحقيقية خلف كل حملة نطلقها. فمن خلال دعمكم، تتحول المبادرات الإنسانية إلى قصص أمل، ويصبح الأثر واقعًا يلمسه الإنسان في حياته اليومية.
{
entries.forEach(entry => {
if (entry.isIntersecting) {
entry.target.classList.add('active');
}
})
}, { threshold: 0.1 });
reveals.forEach(el => revealObserver.observe(el));
function toggleCart() {
alert('Cart toggle clicked');
}
function toggleMobileMenu() {
alert('Mobile menu clicked');
}
//-->
<a href="/en/node/262" hreflang="en">Support a student</a>
Humanitarian Case
In remote villages in Chad, residents suffer from a scarcity of potable water, forcing women and children to travel long distances daily in search of water.
<a href="/en/node/262" class="sliderfront-section__slide-button sliderfront-section__slide-button--education">
Read the full story
</a>
<a href="/en/node/261" hreflang="en">Support a student</a>
Humanitarian Case
In remote villages in Chad, residents suffer from a scarcity of potable water, forcing women and children to travel long distances daily in search of water.
<a href="/en/node/261" class="sliderfront-section__slide-button sliderfront-section__slide-button--education">
Read the full story
</a>
') (Line: 62)
gavias_content_builder_render_el(Array) (Line: 22)
gavias_content_builder_frontend('[{"settings":{"bg_particles":"off","bg_position":"center top","bg_repeat":"no-repeat","bg_attachment":"scroll","bg_size":"cover","style_space":"remove_padding","layout":"container-fw"},"columns":[{"settings":{"element":"gva_column","bg_position":"center top","bg_repeat":"no-repeat","bg_attachment":"scroll","bg_size":"cover","el_class":"front"},"col_lg":12,"elements":[{"settings":{"content":"\r\n \r\n \r\n \r\n \r\n Urgent Appeal\r\n \r\n Be a helping hand for them in\r\n times of crisis\r\n \r\n \r\n At \"Wejdan Charity\", we work with full transparency to deliver your donations to those in need in conflict and poverty-stricken areas.\r\n \r\n \r\n <a>\r\n Charity Donations \r\n </a>\r\n <a>\r\n Our Projects \r\n </a>\r\n \r\n \r\n \r\n \r\n","animate_delay":"0"},"editing":false,"element_name":"gva_text_noeditor"}],"editing":false,"element_name":"gva_column"}],"editing":false,"element_name":"gva_row"},{"settings":{"element":"gva_row","bg_particles":"off","bg_position":"center top","bg_repeat":"no-repeat","bg_attachment":"scroll","bg_size":"cover","style_space":"remove_padding","layout":"container","class":"before-help-region"},"columns":[{"settings":{"element":"gva_column"},"col_lg":12,"elements":[{"settings":{"title":"Take action for animals now","link":"#","button_title":"Donation Now","button_align":"button-right-v2","style_text":"text-light","style_button":"btn-theme","donorbox":"off","target":"off","el_class":"margin","animate":"fade-up","animate_delay":"0"},"editing":false,"element_name":"gva_call_to_action"}],"editing":false,"element_name":"gva_column"}],"editing":false,"element_name":"gva_row"},{"settings":{"element":"gva_row","bg_particles":"off","bg_position":"center top","bg_repeat":"no-repeat","bg_attachment":"scroll","bg_size":"cover","style_space":"remove_padding","layout":"container-fw","bg_color":"#f9fafb"},"columns":[{"settings":{"element":"gva_column","bg_position":"center top","bg_repeat":"no-repeat","bg_attachment":"scroll","bg_size":"cover","el_class":"about"},"col_lg":12,"elements":[{"settings":{"content":"\r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n \r\n \r\n Who We Are\r\n \r\n \r\n We plant hope.. \r\n and build people and the future\r\n \r\n \r\n Wejdan Charity is a leading humanitarian organization, founded with an ambitious vision to be a bridge of الخير between donors and those in need.\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n Development Stages\r\n A continuous journey of growth\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n Areas of Work\r\n We reach where the need is\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \"We work with passion to bring smiles\"\r\n \r\n \r\n \r\n \r\n \r\n","animate_delay":"0"},"editing":false,"element_name":"gva_text_noeditor"}],"editing":false,"element_name":"gva_column"}],"editing":false,"element_name":"gva_row"},{"settings":{"element":"gva_row","bg_particles":"off","bg_position":"center top","bg_repeat":"no-repeat","bg_attachment":"scroll","bg_size":"cover","style_space":"remove_margin remove_padding remove_padding_col","layout":"container-fw","class":"partner","margin_top":"30","margin_bottom":"30"},"columns":[{"settings":{"element":"gva_column"},"col_lg":12,"elements":[{"settings":{"content":"\r\n\r\n \r\n \r\n Initiatives & Programs\r\n Our Areas of Work\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n Ongoing Charity\r\n Water wells, mosque construction\r\n \r\n \r\n \r\n \r\n \r\n \r\n Student Sponsorship\r\n Building the future through education\r\n \r\n \r\n \r\n \r\n \r\n \r\n Humanitarian Cases\r\n Patient treatment, surgeries\r\n \r\n \r\n \r\n \r\n \r\n \r\n Development Projects\r\n Empowering productive families\r\n \r\n \r\n<a>Learn more about our programs and initiatives</a>\r\n \r\n","animate_delay":"0"},"editing":false,"element_name":"gva_text_noeditor"}],"editing":false,"element_name":"gva_column"}],"editing":false,"element_name":"gva_row"},{"settings":{"element":"gva_row","bg_particles":"off","bg_position":"center top","bg_repeat":"no-repeat","bg_attachment":"scroll","bg_size":"cover","style_space":"remove_margin remove_padding remove_padding_col","layout":"container","class":"newsfront"},"columns":[{"settings":{"element":"gva_column"},"col_lg":12,"elements":[{"settings":{"content":"\r\n \r\n \r\n Our News\r\n \r\n \r\n \r\nNews that tells the story of giving \r\n \r\n","animate_delay":"0"},"editing":false,"element_name":"gva_text_noeditor"},{"settings":{"title_admin":"news: news Block -en","block_drupal":"views_block__news_block_3","hidden_title":"on","align_title":"title-align-left","remove_margin":"on","style_text":"text-dark","animate_delay":"0"},"editing":false,"element_name":"gva_drupal_block"}],"editing":false,"element_name":"gva_column"}],"editing":false,"element_name":"gva_row"},{"settings":{"bg_particles":"off","bg_position":"center top","bg_repeat":"no-repeat","bg_attachment":"scroll","bg_size":"cover","style_space":"remove_padding","layout":"container-fw","element":"gva_row","class":"sliderfrontpage"},"columns":[{"settings":{"element":"gva_column","bg_position":"center top","bg_repeat":"no-repeat","bg_attachment":"scroll","bg_size":"cover"},"col_lg":12,"elements":[{"settings":{"title_admin":"news: campigns-en","block_drupal":"views_block__news_block_5","hidden_title":"on","align_title":"title-align-right","remove_margin":"on","style_text":"text-dark","animate_delay":"0"},"editing":false,"element_name":"gva_drupal_block"}],"editing":false,"element_name":"gva_column"}],"editing":false,"element_name":"gva_row"},{"settings":{"element":"gva_row","bg_particles":"off","bg_position":"center top","bg_repeat":"no-repeat","bg_attachment":"scroll","bg_size":"cover","style_space":"remove_margin remove_padding remove_padding_col","layout":"container-fw","class":"partner"},"columns":[{"settings":{"element":"gva_column"},"col_lg":12,"elements":[{"settings":{"content":"\r\n \r\n \r\n \r\n Our Distinguished Projects\r\n \r\n \r\n \r\n At Wejdan Charity, we strive to provide support and assistance to communities in need who are affected by disasters, crises, and wars, with the aim of improving quality of life and promoting sustainable development. Our projects span across several areas:\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n Relief Projects\r\n Emergency response to disasters and wars, providing food and medicine.\r\n \r\n<a> Browse Projects </a>\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n Development Projects\r\n Empowering communities and building capacities.\r\n \r\n<a> Browse Projects </a>\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n Seasonal Projects\r\n Ramadan campaigns, Qurbani, and winter clothing.\r\n \r\n<a> Browse Projects </a>\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n Endowment Projects\r\n An investment for the hereafter—mosques, wells, and charitable endowments.\r\n<a> Browse Projects </a>\r\n \r\n \r\n \r\n \r\n","animate_delay":"0"},"editing":false,"element_name":"gva_text_noeditor"}],"editing":false,"element_name":"gva_column"}],"editing":false,"element_name":"gva_row"},{"settings":{"element":"gva_row","bg_particles":"off","bg_position":"center top","bg_repeat":"no-repeat","bg_attachment":"scroll","bg_size":"cover","style_space":"remove_margin remove_padding remove_padding_col","layout":"container-fw","class":"partner"},"columns":[{"settings":{"element":"gva_column"},"col_lg":12,"elements":[{"settings":{"content":"\r\n \r\n \r\n\r\n \r\n \r\n Our Achievements in Numbers\r\n Your trust makes the difference\r\n \r\n \r\n\r\n \r\n \r\n 0\r\n Beneficiaries worldwide\r\n \r\n \r\n \r\n 0\r\n Projects implemented\r\n \r\n \r\n \r\n 0\r\n Countries we operate in\r\n \r\n \r\n \r\n 0\r\n Volunteers\r\n \r\n \r\n \r\n \r\n\r\n\r\n// Enhanced counter animation for facts section\r\nfunction animateFactsCounters() {\r\n const statNumbers = document.querySelectorAll('.facts-section__stat-number');\r\n \r\n const observer = new IntersectionObserver((entries) => {\r\n entries.forEach(entry => {\r\n if (entry.isIntersecting) {\r\n const counter = entry.target;\r\n const target = parseInt(counter.getAttribute('data-target'));\r\n const duration = 2000;\r\n const increment = target / (duration / 16);\r\n \r\n let current = 0;\r\n const updateCounter = () => {\r\n current += increment;\r\n if (current < target) {\r\n // Format number with K for thousands\r\n let displayNum = Math.ceil(current);\r\n if (displayNum >= 1000) {\r\n counter.textContent = (displayNum / 1000).toFixed(1).replace('.0', '') + 'K';\r\n } else {\r\n counter.textContent = displayNum.toLocaleString();\r\n }\r\n requestAnimationFrame(updateCounter);\r\n } else {\r\n // Final formatting\r\n if (target >= 1000) {\r\n counter.textContent = (target / 1000).toFixed(1).replace('.0', '') + 'K';\r\n counter.classList.add('formatted');\r\n } else {\r\n counter.textContent = target.toLocaleString();\r\n }\r\n counter.classList.add('animated');\r\n setTimeout(() => counter.classList.remove('animated'), 600);\r\n }\r\n };\r\n updateCounter();\r\n observer.unobserve(counter);\r\n }\r\n });\r\n }, { threshold: 0.5, rootMargin: '0px 0px -50px 0px' });\r\n \r\n statNumbers.forEach(counter => observer.observe(counter));\r\n}\r\n\r\n// Call this function when DOM is loaded\r\ndocument.addEventListener('DOMContentLoaded', () => {\r\n animateFactsCounters();\r\n});","animate_delay":"0"},"editing":false,"element_name":"gva_text_noeditor"}],"editing":false,"element_name":"gva_column"}],"editing":false,"element_name":"gva_row"},{"settings":{"element":"gva_row","bg_particles":"off","bg_position":"center top","bg_repeat":"no-repeat","bg_attachment":"scroll","bg_size":"cover","style_space":"remove_margin remove_padding remove_padding_col","layout":"container-fw","class":"zakatcalc"},"columns":[{"settings":{"element":"gva_column"},"col_lg":12,"elements":[{"settings":{"content":"\r\n\r\n \r\n \r\n \r\n \r\nSmart Zakat Calculator\r\n A precise and comprehensive tool\r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n \r\n \r\n Money & Savings\r\n \r\n \r\n \r\n Cash (on hand or at home)\r\n \r\n \r\n $\r\n \r\n \r\n \r\n Bank balances\r\n \r\n \r\n $\r\n \r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n Gold & Silver\r\n \r\n \r\n Refresh Prices\r\n \r\n \r\n \r\n \r\n \r\n Gold weight (grams)\r\n \r\n \r\n \r\n \r\n Current gold price per gram\r\n \r\n Live\r\n \r\n \r\n \r\n \r\n $ / gram\r\n \r\n \r\n \r\n\r\n \r\n \r\n Silver weight (grams)\r\n \r\n \r\n \r\n \r\n Current silver price per gram\r\n \r\n Live\r\n \r\n \r\n \r\n \r\n $ / gram\r\n \r\n \r\n \r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n Zakat Summary\r\n \r\n \r\n Total assets:\r\n 0.00 $\r\n \r\n \r\n Net zakatable assets:\r\n 0.00 $\r\n \r\n \r\n Nisab value (85g gold):\r\n ...\r\n \r\n \r\n Enter data to check eligibility\r\n \r\n \r\n \r\n\r\n \r\n \r\n Zakat due (2.5%)\r\n 0.00 $\r\n \r\n \r\n <a>\r\n \r\n Contact via WhatsApp for consultation and donation\r\n </a>\r\n \r\n \r\n \r\n \r\n\r\n\r\n// Zakat Calculator Logic\r\nlet zakatcalculatorPricesLoaded = false;\r\n\r\n// Initialize calculator when DOM is loaded\r\ndocument.addEventListener('DOMContentLoaded', () => {\r\n zakatcalculatorFetchPrices();\r\n zakatcalculatorCalculate();\r\n \r\n // Add input event listeners for real-time calculation\r\n const inputs = document.querySelectorAll('.zakatcalculator-section__input');\r\n inputs.forEach(input => {\r\n input.addEventListener('input', zakatcalculatorCalculate);\r\n });\r\n \r\n // Format numbers as user types\r\n inputs.forEach(input => {\r\n input.addEventListener('blur', function() {\r\n if (this.value) {\r\n const value = parseFloat(this.value);\r\n if (!isNaN(value)) {\r\n this.value = value.toLocaleString('en-US', {\r\n minimumFractionDigits: 2,\r\n maximumFractionDigits: 2\r\n });\r\n }\r\n }\r\n });\r\n \r\n input.addEventListener('focus', function() {\r\n if (this.value) {\r\n this.value = this.value.replace(/[^\\d.]/g, '');\r\n }\r\n });\r\n });\r\n});\r\n\r\n// Fetch metal prices\r\nasync function zakatcalculatorFetchPrices() {\r\n const goldInput = document.getElementById('goldPrice');\r\n const silverInput = document.getElementById('silverPrice');\r\n const refreshButton = document.querySelector('.zakatcalculator-section__refresh-button');\r\n const refreshIcon = document.querySelector('.zakatcalculator-section__refresh-icon');\r\n \r\n if (!refreshButton || !refreshIcon) return;\r\n \r\n // Show loading state\r\n refreshButton.disabled = true;\r\n refreshIcon.classList.add('zakatcalculator-section__refresh-icon--spinning');\r\n goldInput.classList.add('zakatcalculator-section__input--loading');\r\n silverInput.classList.add('zakatcalculator-section__input--loading');\r\n \r\n try {\r\n // Simulate API call with delay\r\n await new Promise(resolve => setTimeout(resolve, 1500));\r\n \r\n // Mock data (in a real app, you would fetch from an API)\r\n const liveGoldPrice = 76.50;\r\n const liveSilverPrice = 0.95;\r\n \r\n // Update inputs\r\n goldInput.value = liveGoldPrice.toFixed(2);\r\n silverInput.value = liveSilverPrice.toFixed(2);\r\n \r\n // Remove loading state\r\n goldInput.classList.remove('zakatcalculator-section__input--loading');\r\n silverInput.classList.remove('zakatcalculator-section__input--loading');\r\n goldInput.classList.add('zakatcalculator-section__input--valid');\r\n silverInput.classList.add('zakatcalculator-section__input--valid');\r\n \r\n zakatcalculatorPricesLoaded = true;\r\n \r\n // Show success feedback\r\n refreshButton.innerHTML = ' Updated';\r\n refreshButton.style.backgroundColor = '#617f67';\r\n refreshButton.style.color = 'white';\r\n \r\n setTimeout(() => {\r\n refreshButton.innerHTML = ' Refresh Prices';\r\n refreshButton.style.backgroundColor = '';\r\n refreshButton.style.color = '';\r\n }, 2000);\r\n \r\n } catch (error) {\r\n console.error(\"Failed to fetch prices\", error);\r\n \r\n // Fallback values\r\n goldInput.value = 75.00;\r\n silverInput.value = 0.90;\r\n \r\n // Show error state\r\n goldInput.classList.remove('zakatcalculator-section__input--loading');\r\n silverInput.classList.remove('zakatcalculator-section__input--loading');\r\n goldInput.classList.add('zakatcalculator-section__input--invalid');\r\n silverInput.classList.add('zakatcalculator-section__input--invalid');\r\n \r\n refreshButton.innerHTML = ' Update Failed';\r\n refreshButton.style.backgroundColor = '#dc2626';\r\n refreshButton.style.color = 'white';\r\n \r\n setTimeout(() => {\r\n refreshButton.innerHTML = ' Refresh Prices';\r\n refreshButton.style.backgroundColor = '';\r\n refreshButton.style.color = '';\r\n }, 2000);\r\n \r\n } finally {\r\n refreshButton.disabled = false;\r\n refreshIcon.classList.remove('zakatcalculator-section__refresh-icon--spinning');\r\n \r\n // Recalculate zakat\r\n zakatcalculatorCalculate();\r\n }\r\n}\r\n\r\n// Calculate zakat\r\nfunction zakatcalculatorCalculate() {\r\n const cashHand = parseFloat(document.getElementById('cashHand').value) || 0;\r\n const cashBank = parseFloat(document.getElementById('cashBank').value) || 0;\r\n const goldWeight = parseFloat(document.getElementById('goldWeight').value) || 0;\r\n const goldPrice = parseFloat(document.getElementById('goldPrice').value) || 0;\r\n const silverWeight = parseFloat(document.getElementById('silverWeight').value) || 0;\r\n const silverPrice = parseFloat(document.getElementById('silverPrice').value) || 0;\r\n \r\n // Calculate totals\r\n const totalAssets = cashHand + cashBank + (goldWeight * goldPrice) + (silverWeight * silverPrice);\r\n const nisabThreshold = 85 * goldPrice;\r\n \r\n // Update display\r\n document.getElementById('totalAssetsDisplay').textContent = \r\n formatCurrency(totalAssets);\r\n \r\n document.getElementById('netAssetsDisplay').textContent = \r\n formatCurrency(totalAssets);\r\n \r\n if (goldPrice > 0) {\r\n document.getElementById('nisabValueDisplay').textContent = \r\n formatCurrency(nisabThreshold);\r\n } else {\r\n document.getElementById('nisabValueDisplay').textContent = '...';\r\n }\r\n \r\n // Update status and final zakat\r\n const statusBadge = document.getElementById('statusBadge');\r\n const finalDisplay = document.getElementById('finalZakatDisplay');\r\n const payButton = document.querySelector('.zakatcalculator-section__pay-button');\r\n \r\n if (totalAssets >= nisabThreshold && goldPrice > 0 && zakatcalculatorPricesLoaded) {\r\n const zakatAmount = totalAssets * 0.025;\r\n finalDisplay.textContent = formatCurrency(zakatAmount);\r\n \r\n // Update status badge\r\n statusBadge.textContent = '✓ Zakat is due (Nisab reached)';\r\n statusBadge.className = 'zakatcalculator-section__status zakatcalculator-section__status--eligible';\r\n \r\n // Enable pay button\r\n payButton.disabled = false;\r\n payButton.innerHTML = ' Pay Zakat Now';\r\n \r\n } else {\r\n finalDisplay.textContent = '0.00 $';\r\n \r\n // Update status badge\r\n if (!zakatcalculatorPricesLoaded) {\r\n statusBadge.textContent = 'Enter data to check eligibility';\r\n statusBadge.className = 'zakatcalculator-section__status zakatcalculator-section__status--not-eligible';\r\n } else if (totalAssets < nisabThreshold) {\r\n statusBadge.textContent = 'Zakat is not due (Nisab not reached)';\r\n statusBadge.className = 'zakatcalculator-section__status zakatcalculator-section__status--not-eligible';\r\n } else {\r\n statusBadge.textContent = 'Enter data to check eligibility';\r\n statusBadge.className = 'zakatcalculator-section__status zakatcalculator-section__status--not-eligible';\r\n }\r\n \r\n // Disable pay button\r\n payButton.disabled = true;\r\n payButton.innerHTML = ' Pay Zakat Now';\r\n }\r\n}\r\n\r\n// Format currency\r\nfunction formatCurrency(amount) {\r\n return new Intl.NumberFormat('en-US', {\r\n style: 'currency',\r\n currency: 'USD',\r\n minimumFractionDigits: 2,\r\n maximumFractionDigits: 2\r\n }).format(amount);\r\n}\r\n\r\n// Add zakat to cart\r\nfunction zakatcalculatorAddToCart() {\r\n const amountText = document.getElementById('finalZakatDisplay').textContent;\r\n const amount = parseFloat(amountText.replace(/[^0-9.-]+/g, \"\"));\r\n \r\n if (amount > 0 && !isNaN(amount)) {\r\n // Use your existing addToCart function\r\n if (typeof addToCart === 'function') {\r\n addToCart('Calculated Zakat', amount, 'Zakat');\r\n } else {\r\n // Fallback if addToCart is not defined\r\n alert(`Calculated Zakat amount: ${amountText}`);\r\n }\r\n } else {\r\n alert(\"Invalid zakat amount. Please check your inputs.\");\r\n }\r\n}\r\n\r\n// Input validation\r\nfunction validateZakatInput(input) {\r\n const value = parseFloat(input.value);\r\n const min = parseFloat(input.getAttribute('min')) || 0;\r\n \r\n if (isNaN(value) || value < min) {\r\n input.classList.add('zakatcalculator-section__input--invalid');\r\n return false;\r\n } else {\r\n input.classList.remove('zakatcalculator-section__input--invalid');\r\n input.classList.add('zakatcalculator-section__input--valid');\r\n return true;\r\n }\r\n}","animate_delay":"0"},"editing":false,"element_name":"gva_text_noeditor"}],"editing":false,"element_name":"gva_column"}],"editing":false,"element_name":"gva_row"},{"settings":{"element":"gva_row","bg_particles":"off","bg_position":"center top","bg_repeat":"no-repeat","bg_attachment":"scroll","bg_size":"cover","style_space":"remove_margin remove_padding remove_padding_col","layout":"container-fw","class":"partner","margin_top":"30","margin_bottom":"30"},"columns":[{"settings":{"element":"gva_column"},"col_lg":12,"elements":[{"settings":{"content":"\r\n \r\n Strategic Partnerships\r\n Our partners in creating hope\r\n \r\n \r\n ","animate_delay":"0"},"editing":false,"element_name":"gva_text_noeditor"},{"settings":{"title_admin":"Partners: Partners Block - en","block_drupal":"views_block__partners_block_2","hidden_title":"on","align_title":"title-align-right","remove_margin":"on","style_text":"text-dark","animate_delay":"0"},"editing":false,"element_name":"gva_drupal_block"}],"editing":false,"element_name":"gva_column"}],"editing":false,"element_name":"gva_row"}]') (Line: 47)
Drupal\gavias_content_builder\Plugin\Field\FieldFormatter\GaviasContentBuilderFormatter->viewElements(Object, 'en') (Line: 89)
Drupal\Core\Field\FormatterBase->view(Object, 'en') (Line: 263)
Drupal\Core\Entity\Entity\EntityViewDisplay->buildMultiple(Array) (Line: 351)
Drupal\Core\Entity\EntityViewBuilder->buildComponents(Array, Array, Array, 'full') (Line: 24)
Drupal\node\NodeViewBuilder->buildComponents(Array, Array, Array, 'full') (Line: 293)
Drupal\Core\Entity\EntityViewBuilder->buildMultiple(Array) (Line: 250)
Drupal\Core\Entity\EntityViewBuilder->build(Array)
call_user_func_array(Array, Array) (Line: 100)
Drupal\Core\Render\Renderer->doTrustedCallback(Array, Array, 'Render #pre_render callbacks must be methods of a class that implements \Drupal\Core\Security\TrustedCallbackInterface or be an anonymous function. The callback was %s. Support for this callback implementation is deprecated in 8.8.0 and will be removed in Drupal 9.0.0. See https://www.drupal.org/node/2966725', 'silenced_deprecation', 'Drupal\Core\Render\Element\RenderCallbackInterface') (Line: 781)
Drupal\Core\Render\Renderer->doCallback('#pre_render', Array, Array) (Line: 372)
Drupal\Core\Render\Renderer->doRender(Array, ) (Line: 200)
Drupal\Core\Render\Renderer->render(Array, ) (Line: 226)
Drupal\Core\Render\MainContent\HtmlRenderer->Drupal\Core\Render\MainContent\{closure}() (Line: 573)
Drupal\Core\Render\Renderer->executeInRenderContext(Object, Object) (Line: 227)
Drupal\Core\Render\MainContent\HtmlRenderer->prepare(Array, Object, Object) (Line: 117)
Drupal\Core\Render\MainContent\HtmlRenderer->renderResponse(Array, Object, Object) (Line: 90)
Drupal\Core\EventSubscriber\MainContentViewSubscriber->onViewRenderArray(Object, 'kernel.view', Object)
call_user_func(Array, Object, 'kernel.view', Object) (Line: 111)
Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher->dispatch('kernel.view', Object) (Line: 156)
Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object, 1) (Line: 68)
Symfony\Component\HttpKernel\HttpKernel->handle(Object, 1, 1) (Line: 57)
Drupal\Core\StackMiddleware\Session->handle(Object, 1, 1) (Line: 47)
Drupal\Core\StackMiddleware\KernelPreHandle->handle(Object, 1, 1) (Line: 191)
Drupal\page_cache\StackMiddleware\PageCache->fetch(Object, 1, 1) (Line: 128)
Drupal\page_cache\StackMiddleware\PageCache->lookup(Object, 1, 1) (Line: 82)
Drupal\page_cache\StackMiddleware\PageCache->handle(Object, 1, 1) (Line: 47)
Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle(Object, 1, 1) (Line: 52)
Drupal\Core\StackMiddleware\NegotiationMiddleware->handle(Object, 1, 1) (Line: 23)
Stack\StackedHttpKernel->handle(Object, 1, 1) (Line: 708)
Drupal\Core\DrupalKernel->handle(Object) (Line: 19)
- Deprecated function: implode(): Passing glue string after array is deprecated. Swap the parameters in element_gva_column->render_content() (line 462 of themes/gavias_kunco/gva_content_builder/gva_column.php).
element_gva_column->render_content(Array, '
Our Distinguished Projects
At Wejdan Charity, we strive to provide support and assistance to communities in need who are affected by disasters, crises, and wars, with the aim of improving quality of life and promoting sustainable development. Our projects span across several areas:
Relief Projects
Emergency response to disasters and wars, providing food and medicine.
<a href="relief-projects" class="projects-section__card-button projects-section__card-button--relief"> Browse Projects </a>
Development Projects
Empowering communities and building capacities.
<a href="development-projects" class="projects-section__card-button projects-section__card-button--development"> Browse Projects </a>
Seasonal Projects
Ramadan campaigns, Qurbani, and winter clothing.
<a href="seasonal-projects" class="projects-section__card-button projects-section__card-button--seasonal"> Browse Projects </a>
Endowment Projects
An investment for the hereafter—mosques, wells, and charitable endowments.
<a href="endowment-projects" class="projects-section__card-button projects-section__card-button--waqf"> Browse Projects </a>
') (Line: 110)
gavias_content_builder_render_element('gva_column', Array, '
Our Distinguished Projects
At Wejdan Charity, we strive to provide support and assistance to communities in need who are affected by disasters, crises, and wars, with the aim of improving quality of life and promoting sustainable development. Our projects span across several areas:
Relief Projects
Emergency response to disasters and wars, providing food and medicine.
<a href="relief-projects" class="projects-section__card-button projects-section__card-button--relief"> Browse Projects </a>
Development Projects
Empowering communities and building capacities.
<a href="development-projects" class="projects-section__card-button projects-section__card-button--development"> Browse Projects </a>
Seasonal Projects
Ramadan campaigns, Qurbani, and winter clothing.
<a href="seasonal-projects" class="projects-section__card-button projects-section__card-button--seasonal"> Browse Projects </a>
Endowment Projects
An investment for the hereafter—mosques, wells, and charitable endowments.
<a href="endowment-projects" class="projects-section__card-button projects-section__card-button--waqf"> Browse Projects </a>
') (Line: 58)
gavias_content_builder_render_el(Array) (Line: 22)
gavias_content_builder_frontend('[{"settings":{"bg_particles":"off","bg_position":"center top","bg_repeat":"no-repeat","bg_attachment":"scroll","bg_size":"cover","style_space":"remove_padding","layout":"container-fw"},"columns":[{"settings":{"element":"gva_column","bg_position":"center top","bg_repeat":"no-repeat","bg_attachment":"scroll","bg_size":"cover","el_class":"front"},"col_lg":12,"elements":[{"settings":{"content":"\r\n \r\n \r\n \r\n \r\n Urgent Appeal\r\n \r\n Be a helping hand for them in\r\n times of crisis\r\n \r\n \r\n At \"Wejdan Charity\", we work with full transparency to deliver your donations to those in need in conflict and poverty-stricken areas.\r\n \r\n \r\n <a>\r\n Charity Donations \r\n </a>\r\n <a>\r\n Our Projects \r\n </a>\r\n \r\n \r\n \r\n \r\n","animate_delay":"0"},"editing":false,"element_name":"gva_text_noeditor"}],"editing":false,"element_name":"gva_column"}],"editing":false,"element_name":"gva_row"},{"settings":{"element":"gva_row","bg_particles":"off","bg_position":"center top","bg_repeat":"no-repeat","bg_attachment":"scroll","bg_size":"cover","style_space":"remove_padding","layout":"container","class":"before-help-region"},"columns":[{"settings":{"element":"gva_column"},"col_lg":12,"elements":[{"settings":{"title":"Take action for animals now","link":"#","button_title":"Donation Now","button_align":"button-right-v2","style_text":"text-light","style_button":"btn-theme","donorbox":"off","target":"off","el_class":"margin","animate":"fade-up","animate_delay":"0"},"editing":false,"element_name":"gva_call_to_action"}],"editing":false,"element_name":"gva_column"}],"editing":false,"element_name":"gva_row"},{"settings":{"element":"gva_row","bg_particles":"off","bg_position":"center top","bg_repeat":"no-repeat","bg_attachment":"scroll","bg_size":"cover","style_space":"remove_padding","layout":"container-fw","bg_color":"#f9fafb"},"columns":[{"settings":{"element":"gva_column","bg_position":"center top","bg_repeat":"no-repeat","bg_attachment":"scroll","bg_size":"cover","el_class":"about"},"col_lg":12,"elements":[{"settings":{"content":"\r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n \r\n \r\n Who We Are\r\n \r\n \r\n We plant hope.. \r\n and build people and the future\r\n \r\n \r\n Wejdan Charity is a leading humanitarian organization, founded with an ambitious vision to be a bridge of الخير between donors and those in need.\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n Development Stages\r\n A continuous journey of growth\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n Areas of Work\r\n We reach where the need is\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \"We work with passion to bring smiles\"\r\n \r\n \r\n \r\n \r\n \r\n","animate_delay":"0"},"editing":false,"element_name":"gva_text_noeditor"}],"editing":false,"element_name":"gva_column"}],"editing":false,"element_name":"gva_row"},{"settings":{"element":"gva_row","bg_particles":"off","bg_position":"center top","bg_repeat":"no-repeat","bg_attachment":"scroll","bg_size":"cover","style_space":"remove_margin remove_padding remove_padding_col","layout":"container-fw","class":"partner","margin_top":"30","margin_bottom":"30"},"columns":[{"settings":{"element":"gva_column"},"col_lg":12,"elements":[{"settings":{"content":"\r\n\r\n \r\n \r\n Initiatives & Programs\r\n Our Areas of Work\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n Ongoing Charity\r\n Water wells, mosque construction\r\n \r\n \r\n \r\n \r\n \r\n \r\n Student Sponsorship\r\n Building the future through education\r\n \r\n \r\n \r\n \r\n \r\n \r\n Humanitarian Cases\r\n Patient treatment, surgeries\r\n \r\n \r\n \r\n \r\n \r\n \r\n Development Projects\r\n Empowering productive families\r\n \r\n \r\n<a>Learn more about our programs and initiatives</a>\r\n \r\n","animate_delay":"0"},"editing":false,"element_name":"gva_text_noeditor"}],"editing":false,"element_name":"gva_column"}],"editing":false,"element_name":"gva_row"},{"settings":{"element":"gva_row","bg_particles":"off","bg_position":"center top","bg_repeat":"no-repeat","bg_attachment":"scroll","bg_size":"cover","style_space":"remove_margin remove_padding remove_padding_col","layout":"container","class":"newsfront"},"columns":[{"settings":{"element":"gva_column"},"col_lg":12,"elements":[{"settings":{"content":"\r\n \r\n \r\n Our News\r\n \r\n \r\n \r\nNews that tells the story of giving \r\n \r\n","animate_delay":"0"},"editing":false,"element_name":"gva_text_noeditor"},{"settings":{"title_admin":"news: news Block -en","block_drupal":"views_block__news_block_3","hidden_title":"on","align_title":"title-align-left","remove_margin":"on","style_text":"text-dark","animate_delay":"0"},"editing":false,"element_name":"gva_drupal_block"}],"editing":false,"element_name":"gva_column"}],"editing":false,"element_name":"gva_row"},{"settings":{"bg_particles":"off","bg_position":"center top","bg_repeat":"no-repeat","bg_attachment":"scroll","bg_size":"cover","style_space":"remove_padding","layout":"container-fw","element":"gva_row","class":"sliderfrontpage"},"columns":[{"settings":{"element":"gva_column","bg_position":"center top","bg_repeat":"no-repeat","bg_attachment":"scroll","bg_size":"cover"},"col_lg":12,"elements":[{"settings":{"title_admin":"news: campigns-en","block_drupal":"views_block__news_block_5","hidden_title":"on","align_title":"title-align-right","remove_margin":"on","style_text":"text-dark","animate_delay":"0"},"editing":false,"element_name":"gva_drupal_block"}],"editing":false,"element_name":"gva_column"}],"editing":false,"element_name":"gva_row"},{"settings":{"element":"gva_row","bg_particles":"off","bg_position":"center top","bg_repeat":"no-repeat","bg_attachment":"scroll","bg_size":"cover","style_space":"remove_margin remove_padding remove_padding_col","layout":"container-fw","class":"partner"},"columns":[{"settings":{"element":"gva_column"},"col_lg":12,"elements":[{"settings":{"content":"\r\n \r\n \r\n \r\n Our Distinguished Projects\r\n \r\n \r\n \r\n At Wejdan Charity, we strive to provide support and assistance to communities in need who are affected by disasters, crises, and wars, with the aim of improving quality of life and promoting sustainable development. Our projects span across several areas:\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n Relief Projects\r\n Emergency response to disasters and wars, providing food and medicine.\r\n \r\n<a> Browse Projects </a>\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n Development Projects\r\n Empowering communities and building capacities.\r\n \r\n<a> Browse Projects </a>\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n Seasonal Projects\r\n Ramadan campaigns, Qurbani, and winter clothing.\r\n \r\n<a> Browse Projects </a>\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n Endowment Projects\r\n An investment for the hereafter—mosques, wells, and charitable endowments.\r\n<a> Browse Projects </a>\r\n \r\n \r\n \r\n \r\n","animate_delay":"0"},"editing":false,"element_name":"gva_text_noeditor"}],"editing":false,"element_name":"gva_column"}],"editing":false,"element_name":"gva_row"},{"settings":{"element":"gva_row","bg_particles":"off","bg_position":"center top","bg_repeat":"no-repeat","bg_attachment":"scroll","bg_size":"cover","style_space":"remove_margin remove_padding remove_padding_col","layout":"container-fw","class":"partner"},"columns":[{"settings":{"element":"gva_column"},"col_lg":12,"elements":[{"settings":{"content":"\r\n \r\n \r\n\r\n \r\n \r\n Our Achievements in Numbers\r\n Your trust makes the difference\r\n \r\n \r\n\r\n \r\n \r\n 0\r\n Beneficiaries worldwide\r\n \r\n \r\n \r\n 0\r\n Projects implemented\r\n \r\n \r\n \r\n 0\r\n Countries we operate in\r\n \r\n \r\n \r\n 0\r\n Volunteers\r\n \r\n \r\n \r\n \r\n\r\n\r\n// Enhanced counter animation for facts section\r\nfunction animateFactsCounters() {\r\n const statNumbers = document.querySelectorAll('.facts-section__stat-number');\r\n \r\n const observer = new IntersectionObserver((entries) => {\r\n entries.forEach(entry => {\r\n if (entry.isIntersecting) {\r\n const counter = entry.target;\r\n const target = parseInt(counter.getAttribute('data-target'));\r\n const duration = 2000;\r\n const increment = target / (duration / 16);\r\n \r\n let current = 0;\r\n const updateCounter = () => {\r\n current += increment;\r\n if (current < target) {\r\n // Format number with K for thousands\r\n let displayNum = Math.ceil(current);\r\n if (displayNum >= 1000) {\r\n counter.textContent = (displayNum / 1000).toFixed(1).replace('.0', '') + 'K';\r\n } else {\r\n counter.textContent = displayNum.toLocaleString();\r\n }\r\n requestAnimationFrame(updateCounter);\r\n } else {\r\n // Final formatting\r\n if (target >= 1000) {\r\n counter.textContent = (target / 1000).toFixed(1).replace('.0', '') + 'K';\r\n counter.classList.add('formatted');\r\n } else {\r\n counter.textContent = target.toLocaleString();\r\n }\r\n counter.classList.add('animated');\r\n setTimeout(() => counter.classList.remove('animated'), 600);\r\n }\r\n };\r\n updateCounter();\r\n observer.unobserve(counter);\r\n }\r\n });\r\n }, { threshold: 0.5, rootMargin: '0px 0px -50px 0px' });\r\n \r\n statNumbers.forEach(counter => observer.observe(counter));\r\n}\r\n\r\n// Call this function when DOM is loaded\r\ndocument.addEventListener('DOMContentLoaded', () => {\r\n animateFactsCounters();\r\n});","animate_delay":"0"},"editing":false,"element_name":"gva_text_noeditor"}],"editing":false,"element_name":"gva_column"}],"editing":false,"element_name":"gva_row"},{"settings":{"element":"gva_row","bg_particles":"off","bg_position":"center top","bg_repeat":"no-repeat","bg_attachment":"scroll","bg_size":"cover","style_space":"remove_margin remove_padding remove_padding_col","layout":"container-fw","class":"zakatcalc"},"columns":[{"settings":{"element":"gva_column"},"col_lg":12,"elements":[{"settings":{"content":"\r\n\r\n \r\n \r\n \r\n \r\nSmart Zakat Calculator\r\n A precise and comprehensive tool\r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n \r\n \r\n Money & Savings\r\n \r\n \r\n \r\n Cash (on hand or at home)\r\n \r\n \r\n $\r\n \r\n \r\n \r\n Bank balances\r\n \r\n \r\n $\r\n \r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n Gold & Silver\r\n \r\n \r\n Refresh Prices\r\n \r\n \r\n \r\n \r\n \r\n Gold weight (grams)\r\n \r\n \r\n \r\n \r\n Current gold price per gram\r\n \r\n Live\r\n \r\n \r\n \r\n \r\n $ / gram\r\n \r\n \r\n \r\n\r\n \r\n \r\n Silver weight (grams)\r\n \r\n \r\n \r\n \r\n Current silver price per gram\r\n \r\n Live\r\n \r\n \r\n \r\n \r\n $ / gram\r\n \r\n \r\n \r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n Zakat Summary\r\n \r\n \r\n Total assets:\r\n 0.00 $\r\n \r\n \r\n Net zakatable assets:\r\n 0.00 $\r\n \r\n \r\n Nisab value (85g gold):\r\n ...\r\n \r\n \r\n Enter data to check eligibility\r\n \r\n \r\n \r\n\r\n \r\n \r\n Zakat due (2.5%)\r\n 0.00 $\r\n \r\n \r\n <a>\r\n \r\n Contact via WhatsApp for consultation and donation\r\n </a>\r\n \r\n \r\n \r\n \r\n\r\n\r\n// Zakat Calculator Logic\r\nlet zakatcalculatorPricesLoaded = false;\r\n\r\n// Initialize calculator when DOM is loaded\r\ndocument.addEventListener('DOMContentLoaded', () => {\r\n zakatcalculatorFetchPrices();\r\n zakatcalculatorCalculate();\r\n \r\n // Add input event listeners for real-time calculation\r\n const inputs = document.querySelectorAll('.zakatcalculator-section__input');\r\n inputs.forEach(input => {\r\n input.addEventListener('input', zakatcalculatorCalculate);\r\n });\r\n \r\n // Format numbers as user types\r\n inputs.forEach(input => {\r\n input.addEventListener('blur', function() {\r\n if (this.value) {\r\n const value = parseFloat(this.value);\r\n if (!isNaN(value)) {\r\n this.value = value.toLocaleString('en-US', {\r\n minimumFractionDigits: 2,\r\n maximumFractionDigits: 2\r\n });\r\n }\r\n }\r\n });\r\n \r\n input.addEventListener('focus', function() {\r\n if (this.value) {\r\n this.value = this.value.replace(/[^\\d.]/g, '');\r\n }\r\n });\r\n });\r\n});\r\n\r\n// Fetch metal prices\r\nasync function zakatcalculatorFetchPrices() {\r\n const goldInput = document.getElementById('goldPrice');\r\n const silverInput = document.getElementById('silverPrice');\r\n const refreshButton = document.querySelector('.zakatcalculator-section__refresh-button');\r\n const refreshIcon = document.querySelector('.zakatcalculator-section__refresh-icon');\r\n \r\n if (!refreshButton || !refreshIcon) return;\r\n \r\n // Show loading state\r\n refreshButton.disabled = true;\r\n refreshIcon.classList.add('zakatcalculator-section__refresh-icon--spinning');\r\n goldInput.classList.add('zakatcalculator-section__input--loading');\r\n silverInput.classList.add('zakatcalculator-section__input--loading');\r\n \r\n try {\r\n // Simulate API call with delay\r\n await new Promise(resolve => setTimeout(resolve, 1500));\r\n \r\n // Mock data (in a real app, you would fetch from an API)\r\n const liveGoldPrice = 76.50;\r\n const liveSilverPrice = 0.95;\r\n \r\n // Update inputs\r\n goldInput.value = liveGoldPrice.toFixed(2);\r\n silverInput.value = liveSilverPrice.toFixed(2);\r\n \r\n // Remove loading state\r\n goldInput.classList.remove('zakatcalculator-section__input--loading');\r\n silverInput.classList.remove('zakatcalculator-section__input--loading');\r\n goldInput.classList.add('zakatcalculator-section__input--valid');\r\n silverInput.classList.add('zakatcalculator-section__input--valid');\r\n \r\n zakatcalculatorPricesLoaded = true;\r\n \r\n // Show success feedback\r\n refreshButton.innerHTML = ' Updated';\r\n refreshButton.style.backgroundColor = '#617f67';\r\n refreshButton.style.color = 'white';\r\n \r\n setTimeout(() => {\r\n refreshButton.innerHTML = ' Refresh Prices';\r\n refreshButton.style.backgroundColor = '';\r\n refreshButton.style.color = '';\r\n }, 2000);\r\n \r\n } catch (error) {\r\n console.error(\"Failed to fetch prices\", error);\r\n \r\n // Fallback values\r\n goldInput.value = 75.00;\r\n silverInput.value = 0.90;\r\n \r\n // Show error state\r\n goldInput.classList.remove('zakatcalculator-section__input--loading');\r\n silverInput.classList.remove('zakatcalculator-section__input--loading');\r\n goldInput.classList.add('zakatcalculator-section__input--invalid');\r\n silverInput.classList.add('zakatcalculator-section__input--invalid');\r\n \r\n refreshButton.innerHTML = ' Update Failed';\r\n refreshButton.style.backgroundColor = '#dc2626';\r\n refreshButton.style.color = 'white';\r\n \r\n setTimeout(() => {\r\n refreshButton.innerHTML = ' Refresh Prices';\r\n refreshButton.style.backgroundColor = '';\r\n refreshButton.style.color = '';\r\n }, 2000);\r\n \r\n } finally {\r\n refreshButton.disabled = false;\r\n refreshIcon.classList.remove('zakatcalculator-section__refresh-icon--spinning');\r\n \r\n // Recalculate zakat\r\n zakatcalculatorCalculate();\r\n }\r\n}\r\n\r\n// Calculate zakat\r\nfunction zakatcalculatorCalculate() {\r\n const cashHand = parseFloat(document.getElementById('cashHand').value) || 0;\r\n const cashBank = parseFloat(document.getElementById('cashBank').value) || 0;\r\n const goldWeight = parseFloat(document.getElementById('goldWeight').value) || 0;\r\n const goldPrice = parseFloat(document.getElementById('goldPrice').value) || 0;\r\n const silverWeight = parseFloat(document.getElementById('silverWeight').value) || 0;\r\n const silverPrice = parseFloat(document.getElementById('silverPrice').value) || 0;\r\n \r\n // Calculate totals\r\n const totalAssets = cashHand + cashBank + (goldWeight * goldPrice) + (silverWeight * silverPrice);\r\n const nisabThreshold = 85 * goldPrice;\r\n \r\n // Update display\r\n document.getElementById('totalAssetsDisplay').textContent = \r\n formatCurrency(totalAssets);\r\n \r\n document.getElementById('netAssetsDisplay').textContent = \r\n formatCurrency(totalAssets);\r\n \r\n if (goldPrice > 0) {\r\n document.getElementById('nisabValueDisplay').textContent = \r\n formatCurrency(nisabThreshold);\r\n } else {\r\n document.getElementById('nisabValueDisplay').textContent = '...';\r\n }\r\n \r\n // Update status and final zakat\r\n const statusBadge = document.getElementById('statusBadge');\r\n const finalDisplay = document.getElementById('finalZakatDisplay');\r\n const payButton = document.querySelector('.zakatcalculator-section__pay-button');\r\n \r\n if (totalAssets >= nisabThreshold && goldPrice > 0 && zakatcalculatorPricesLoaded) {\r\n const zakatAmount = totalAssets * 0.025;\r\n finalDisplay.textContent = formatCurrency(zakatAmount);\r\n \r\n // Update status badge\r\n statusBadge.textContent = '✓ Zakat is due (Nisab reached)';\r\n statusBadge.className = 'zakatcalculator-section__status zakatcalculator-section__status--eligible';\r\n \r\n // Enable pay button\r\n payButton.disabled = false;\r\n payButton.innerHTML = ' Pay Zakat Now';\r\n \r\n } else {\r\n finalDisplay.textContent = '0.00 $';\r\n \r\n // Update status badge\r\n if (!zakatcalculatorPricesLoaded) {\r\n statusBadge.textContent = 'Enter data to check eligibility';\r\n statusBadge.className = 'zakatcalculator-section__status zakatcalculator-section__status--not-eligible';\r\n } else if (totalAssets < nisabThreshold) {\r\n statusBadge.textContent = 'Zakat is not due (Nisab not reached)';\r\n statusBadge.className = 'zakatcalculator-section__status zakatcalculator-section__status--not-eligible';\r\n } else {\r\n statusBadge.textContent = 'Enter data to check eligibility';\r\n statusBadge.className = 'zakatcalculator-section__status zakatcalculator-section__status--not-eligible';\r\n }\r\n \r\n // Disable pay button\r\n payButton.disabled = true;\r\n payButton.innerHTML = ' Pay Zakat Now';\r\n }\r\n}\r\n\r\n// Format currency\r\nfunction formatCurrency(amount) {\r\n return new Intl.NumberFormat('en-US', {\r\n style: 'currency',\r\n currency: 'USD',\r\n minimumFractionDigits: 2,\r\n maximumFractionDigits: 2\r\n }).format(amount);\r\n}\r\n\r\n// Add zakat to cart\r\nfunction zakatcalculatorAddToCart() {\r\n const amountText = document.getElementById('finalZakatDisplay').textContent;\r\n const amount = parseFloat(amountText.replace(/[^0-9.-]+/g, \"\"));\r\n \r\n if (amount > 0 && !isNaN(amount)) {\r\n // Use your existing addToCart function\r\n if (typeof addToCart === 'function') {\r\n addToCart('Calculated Zakat', amount, 'Zakat');\r\n } else {\r\n // Fallback if addToCart is not defined\r\n alert(`Calculated Zakat amount: ${amountText}`);\r\n }\r\n } else {\r\n alert(\"Invalid zakat amount. Please check your inputs.\");\r\n }\r\n}\r\n\r\n// Input validation\r\nfunction validateZakatInput(input) {\r\n const value = parseFloat(input.value);\r\n const min = parseFloat(input.getAttribute('min')) || 0;\r\n \r\n if (isNaN(value) || value < min) {\r\n input.classList.add('zakatcalculator-section__input--invalid');\r\n return false;\r\n } else {\r\n input.classList.remove('zakatcalculator-section__input--invalid');\r\n input.classList.add('zakatcalculator-section__input--valid');\r\n return true;\r\n }\r\n}","animate_delay":"0"},"editing":false,"element_name":"gva_text_noeditor"}],"editing":false,"element_name":"gva_column"}],"editing":false,"element_name":"gva_row"},{"settings":{"element":"gva_row","bg_particles":"off","bg_position":"center top","bg_repeat":"no-repeat","bg_attachment":"scroll","bg_size":"cover","style_space":"remove_margin remove_padding remove_padding_col","layout":"container-fw","class":"partner","margin_top":"30","margin_bottom":"30"},"columns":[{"settings":{"element":"gva_column"},"col_lg":12,"elements":[{"settings":{"content":"\r\n \r\n Strategic Partnerships\r\n Our partners in creating hope\r\n \r\n \r\n ","animate_delay":"0"},"editing":false,"element_name":"gva_text_noeditor"},{"settings":{"title_admin":"Partners: Partners Block - en","block_drupal":"views_block__partners_block_2","hidden_title":"on","align_title":"title-align-right","remove_margin":"on","style_text":"text-dark","animate_delay":"0"},"editing":false,"element_name":"gva_drupal_block"}],"editing":false,"element_name":"gva_column"}],"editing":false,"element_name":"gva_row"}]') (Line: 47)
Drupal\gavias_content_builder\Plugin\Field\FieldFormatter\GaviasContentBuilderFormatter->viewElements(Object, 'en') (Line: 89)
Drupal\Core\Field\FormatterBase->view(Object, 'en') (Line: 263)
Drupal\Core\Entity\Entity\EntityViewDisplay->buildMultiple(Array) (Line: 351)
Drupal\Core\Entity\EntityViewBuilder->buildComponents(Array, Array, Array, 'full') (Line: 24)
Drupal\node\NodeViewBuilder->buildComponents(Array, Array, Array, 'full') (Line: 293)
Drupal\Core\Entity\EntityViewBuilder->buildMultiple(Array) (Line: 250)
Drupal\Core\Entity\EntityViewBuilder->build(Array)
call_user_func_array(Array, Array) (Line: 100)
Drupal\Core\Render\Renderer->doTrustedCallback(Array, Array, 'Render #pre_render callbacks must be methods of a class that implements \Drupal\Core\Security\TrustedCallbackInterface or be an anonymous function. The callback was %s. Support for this callback implementation is deprecated in 8.8.0 and will be removed in Drupal 9.0.0. See https://www.drupal.org/node/2966725', 'silenced_deprecation', 'Drupal\Core\Render\Element\RenderCallbackInterface') (Line: 781)
Drupal\Core\Render\Renderer->doCallback('#pre_render', Array, Array) (Line: 372)
Drupal\Core\Render\Renderer->doRender(Array, ) (Line: 200)
Drupal\Core\Render\Renderer->render(Array, ) (Line: 226)
Drupal\Core\Render\MainContent\HtmlRenderer->Drupal\Core\Render\MainContent\{closure}() (Line: 573)
Drupal\Core\Render\Renderer->executeInRenderContext(Object, Object) (Line: 227)
Drupal\Core\Render\MainContent\HtmlRenderer->prepare(Array, Object, Object) (Line: 117)
Drupal\Core\Render\MainContent\HtmlRenderer->renderResponse(Array, Object, Object) (Line: 90)
Drupal\Core\EventSubscriber\MainContentViewSubscriber->onViewRenderArray(Object, 'kernel.view', Object)
call_user_func(Array, Object, 'kernel.view', Object) (Line: 111)
Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher->dispatch('kernel.view', Object) (Line: 156)
Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object, 1) (Line: 68)
Symfony\Component\HttpKernel\HttpKernel->handle(Object, 1, 1) (Line: 57)
Drupal\Core\StackMiddleware\Session->handle(Object, 1, 1) (Line: 47)
Drupal\Core\StackMiddleware\KernelPreHandle->handle(Object, 1, 1) (Line: 191)
Drupal\page_cache\StackMiddleware\PageCache->fetch(Object, 1, 1) (Line: 128)
Drupal\page_cache\StackMiddleware\PageCache->lookup(Object, 1, 1) (Line: 82)
Drupal\page_cache\StackMiddleware\PageCache->handle(Object, 1, 1) (Line: 47)
Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle(Object, 1, 1) (Line: 52)
Drupal\Core\StackMiddleware\NegotiationMiddleware->handle(Object, 1, 1) (Line: 23)
Stack\StackedHttpKernel->handle(Object, 1, 1) (Line: 708)
Drupal\Core\DrupalKernel->handle(Object) (Line: 19)
- Deprecated function: implode(): Passing glue string after array is deprecated. Swap the parameters in element_gva_column->render_content() (line 463 of themes/gavias_kunco/gva_content_builder/gva_column.php).
element_gva_column->render_content(Array, '
Our Distinguished Projects
At Wejdan Charity, we strive to provide support and assistance to communities in need who are affected by disasters, crises, and wars, with the aim of improving quality of life and promoting sustainable development. Our projects span across several areas:
Relief Projects
Emergency response to disasters and wars, providing food and medicine.
<a href="relief-projects" class="projects-section__card-button projects-section__card-button--relief"> Browse Projects </a>
Development Projects
Empowering communities and building capacities.
<a href="development-projects" class="projects-section__card-button projects-section__card-button--development"> Browse Projects </a>
Seasonal Projects
Ramadan campaigns, Qurbani, and winter clothing.
<a href="seasonal-projects" class="projects-section__card-button projects-section__card-button--seasonal"> Browse Projects </a>
Endowment Projects
An investment for the hereafter—mosques, wells, and charitable endowments.
<a href="endowment-projects" class="projects-section__card-button projects-section__card-button--waqf"> Browse Projects </a>
') (Line: 110)
gavias_content_builder_render_element('gva_column', Array, '
Our Distinguished Projects
At Wejdan Charity, we strive to provide support and assistance to communities in need who are affected by disasters, crises, and wars, with the aim of improving quality of life and promoting sustainable development. Our projects span across several areas:
Relief Projects
Emergency response to disasters and wars, providing food and medicine.
<a href="relief-projects" class="projects-section__card-button projects-section__card-button--relief"> Browse Projects </a>
Development Projects
Empowering communities and building capacities.
<a href="development-projects" class="projects-section__card-button projects-section__card-button--development"> Browse Projects </a>
Seasonal Projects
Ramadan campaigns, Qurbani, and winter clothing.
<a href="seasonal-projects" class="projects-section__card-button projects-section__card-button--seasonal"> Browse Projects </a>
Endowment Projects
An investment for the hereafter—mosques, wells, and charitable endowments.
<a href="endowment-projects" class="projects-section__card-button projects-section__card-button--waqf"> Browse Projects </a>
') (Line: 58)
gavias_content_builder_render_el(Array) (Line: 22)
gavias_content_builder_frontend('[{"settings":{"bg_particles":"off","bg_position":"center top","bg_repeat":"no-repeat","bg_attachment":"scroll","bg_size":"cover","style_space":"remove_padding","layout":"container-fw"},"columns":[{"settings":{"element":"gva_column","bg_position":"center top","bg_repeat":"no-repeat","bg_attachment":"scroll","bg_size":"cover","el_class":"front"},"col_lg":12,"elements":[{"settings":{"content":"\r\n \r\n \r\n \r\n \r\n Urgent Appeal\r\n \r\n Be a helping hand for them in\r\n times of crisis\r\n \r\n \r\n At \"Wejdan Charity\", we work with full transparency to deliver your donations to those in need in conflict and poverty-stricken areas.\r\n \r\n \r\n <a>\r\n Charity Donations \r\n </a>\r\n <a>\r\n Our Projects \r\n </a>\r\n \r\n \r\n \r\n \r\n","animate_delay":"0"},"editing":false,"element_name":"gva_text_noeditor"}],"editing":false,"element_name":"gva_column"}],"editing":false,"element_name":"gva_row"},{"settings":{"element":"gva_row","bg_particles":"off","bg_position":"center top","bg_repeat":"no-repeat","bg_attachment":"scroll","bg_size":"cover","style_space":"remove_padding","layout":"container","class":"before-help-region"},"columns":[{"settings":{"element":"gva_column"},"col_lg":12,"elements":[{"settings":{"title":"Take action for animals now","link":"#","button_title":"Donation Now","button_align":"button-right-v2","style_text":"text-light","style_button":"btn-theme","donorbox":"off","target":"off","el_class":"margin","animate":"fade-up","animate_delay":"0"},"editing":false,"element_name":"gva_call_to_action"}],"editing":false,"element_name":"gva_column"}],"editing":false,"element_name":"gva_row"},{"settings":{"element":"gva_row","bg_particles":"off","bg_position":"center top","bg_repeat":"no-repeat","bg_attachment":"scroll","bg_size":"cover","style_space":"remove_padding","layout":"container-fw","bg_color":"#f9fafb"},"columns":[{"settings":{"element":"gva_column","bg_position":"center top","bg_repeat":"no-repeat","bg_attachment":"scroll","bg_size":"cover","el_class":"about"},"col_lg":12,"elements":[{"settings":{"content":"\r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n \r\n \r\n Who We Are\r\n \r\n \r\n We plant hope.. \r\n and build people and the future\r\n \r\n \r\n Wejdan Charity is a leading humanitarian organization, founded with an ambitious vision to be a bridge of الخير between donors and those in need.\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n Development Stages\r\n A continuous journey of growth\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n Areas of Work\r\n We reach where the need is\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \"We work with passion to bring smiles\"\r\n \r\n \r\n \r\n \r\n \r\n","animate_delay":"0"},"editing":false,"element_name":"gva_text_noeditor"}],"editing":false,"element_name":"gva_column"}],"editing":false,"element_name":"gva_row"},{"settings":{"element":"gva_row","bg_particles":"off","bg_position":"center top","bg_repeat":"no-repeat","bg_attachment":"scroll","bg_size":"cover","style_space":"remove_margin remove_padding remove_padding_col","layout":"container-fw","class":"partner","margin_top":"30","margin_bottom":"30"},"columns":[{"settings":{"element":"gva_column"},"col_lg":12,"elements":[{"settings":{"content":"\r\n\r\n \r\n \r\n Initiatives & Programs\r\n Our Areas of Work\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n Ongoing Charity\r\n Water wells, mosque construction\r\n \r\n \r\n \r\n \r\n \r\n \r\n Student Sponsorship\r\n Building the future through education\r\n \r\n \r\n \r\n \r\n \r\n \r\n Humanitarian Cases\r\n Patient treatment, surgeries\r\n \r\n \r\n \r\n \r\n \r\n \r\n Development Projects\r\n Empowering productive families\r\n \r\n \r\n<a>Learn more about our programs and initiatives</a>\r\n \r\n","animate_delay":"0"},"editing":false,"element_name":"gva_text_noeditor"}],"editing":false,"element_name":"gva_column"}],"editing":false,"element_name":"gva_row"},{"settings":{"element":"gva_row","bg_particles":"off","bg_position":"center top","bg_repeat":"no-repeat","bg_attachment":"scroll","bg_size":"cover","style_space":"remove_margin remove_padding remove_padding_col","layout":"container","class":"newsfront"},"columns":[{"settings":{"element":"gva_column"},"col_lg":12,"elements":[{"settings":{"content":"\r\n \r\n \r\n Our News\r\n \r\n \r\n \r\nNews that tells the story of giving \r\n \r\n","animate_delay":"0"},"editing":false,"element_name":"gva_text_noeditor"},{"settings":{"title_admin":"news: news Block -en","block_drupal":"views_block__news_block_3","hidden_title":"on","align_title":"title-align-left","remove_margin":"on","style_text":"text-dark","animate_delay":"0"},"editing":false,"element_name":"gva_drupal_block"}],"editing":false,"element_name":"gva_column"}],"editing":false,"element_name":"gva_row"},{"settings":{"bg_particles":"off","bg_position":"center top","bg_repeat":"no-repeat","bg_attachment":"scroll","bg_size":"cover","style_space":"remove_padding","layout":"container-fw","element":"gva_row","class":"sliderfrontpage"},"columns":[{"settings":{"element":"gva_column","bg_position":"center top","bg_repeat":"no-repeat","bg_attachment":"scroll","bg_size":"cover"},"col_lg":12,"elements":[{"settings":{"title_admin":"news: campigns-en","block_drupal":"views_block__news_block_5","hidden_title":"on","align_title":"title-align-right","remove_margin":"on","style_text":"text-dark","animate_delay":"0"},"editing":false,"element_name":"gva_drupal_block"}],"editing":false,"element_name":"gva_column"}],"editing":false,"element_name":"gva_row"},{"settings":{"element":"gva_row","bg_particles":"off","bg_position":"center top","bg_repeat":"no-repeat","bg_attachment":"scroll","bg_size":"cover","style_space":"remove_margin remove_padding remove_padding_col","layout":"container-fw","class":"partner"},"columns":[{"settings":{"element":"gva_column"},"col_lg":12,"elements":[{"settings":{"content":"\r\n \r\n \r\n \r\n Our Distinguished Projects\r\n \r\n \r\n \r\n At Wejdan Charity, we strive to provide support and assistance to communities in need who are affected by disasters, crises, and wars, with the aim of improving quality of life and promoting sustainable development. Our projects span across several areas:\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n Relief Projects\r\n Emergency response to disasters and wars, providing food and medicine.\r\n \r\n<a> Browse Projects </a>\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n Development Projects\r\n Empowering communities and building capacities.\r\n \r\n<a> Browse Projects </a>\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n Seasonal Projects\r\n Ramadan campaigns, Qurbani, and winter clothing.\r\n \r\n<a> Browse Projects </a>\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n Endowment Projects\r\n An investment for the hereafter—mosques, wells, and charitable endowments.\r\n<a> Browse Projects </a>\r\n \r\n \r\n \r\n \r\n","animate_delay":"0"},"editing":false,"element_name":"gva_text_noeditor"}],"editing":false,"element_name":"gva_column"}],"editing":false,"element_name":"gva_row"},{"settings":{"element":"gva_row","bg_particles":"off","bg_position":"center top","bg_repeat":"no-repeat","bg_attachment":"scroll","bg_size":"cover","style_space":"remove_margin remove_padding remove_padding_col","layout":"container-fw","class":"partner"},"columns":[{"settings":{"element":"gva_column"},"col_lg":12,"elements":[{"settings":{"content":"\r\n \r\n \r\n\r\n \r\n \r\n Our Achievements in Numbers\r\n Your trust makes the difference\r\n \r\n \r\n\r\n \r\n \r\n 0\r\n Beneficiaries worldwide\r\n \r\n \r\n \r\n 0\r\n Projects implemented\r\n \r\n \r\n \r\n 0\r\n Countries we operate in\r\n \r\n \r\n \r\n 0\r\n Volunteers\r\n \r\n \r\n \r\n \r\n\r\n\r\n// Enhanced counter animation for facts section\r\nfunction animateFactsCounters() {\r\n const statNumbers = document.querySelectorAll('.facts-section__stat-number');\r\n \r\n const observer = new IntersectionObserver((entries) => {\r\n entries.forEach(entry => {\r\n if (entry.isIntersecting) {\r\n const counter = entry.target;\r\n const target = parseInt(counter.getAttribute('data-target'));\r\n const duration = 2000;\r\n const increment = target / (duration / 16);\r\n \r\n let current = 0;\r\n const updateCounter = () => {\r\n current += increment;\r\n if (current < target) {\r\n // Format number with K for thousands\r\n let displayNum = Math.ceil(current);\r\n if (displayNum >= 1000) {\r\n counter.textContent = (displayNum / 1000).toFixed(1).replace('.0', '') + 'K';\r\n } else {\r\n counter.textContent = displayNum.toLocaleString();\r\n }\r\n requestAnimationFrame(updateCounter);\r\n } else {\r\n // Final formatting\r\n if (target >= 1000) {\r\n counter.textContent = (target / 1000).toFixed(1).replace('.0', '') + 'K';\r\n counter.classList.add('formatted');\r\n } else {\r\n counter.textContent = target.toLocaleString();\r\n }\r\n counter.classList.add('animated');\r\n setTimeout(() => counter.classList.remove('animated'), 600);\r\n }\r\n };\r\n updateCounter();\r\n observer.unobserve(counter);\r\n }\r\n });\r\n }, { threshold: 0.5, rootMargin: '0px 0px -50px 0px' });\r\n \r\n statNumbers.forEach(counter => observer.observe(counter));\r\n}\r\n\r\n// Call this function when DOM is loaded\r\ndocument.addEventListener('DOMContentLoaded', () => {\r\n animateFactsCounters();\r\n});","animate_delay":"0"},"editing":false,"element_name":"gva_text_noeditor"}],"editing":false,"element_name":"gva_column"}],"editing":false,"element_name":"gva_row"},{"settings":{"element":"gva_row","bg_particles":"off","bg_position":"center top","bg_repeat":"no-repeat","bg_attachment":"scroll","bg_size":"cover","style_space":"remove_margin remove_padding remove_padding_col","layout":"container-fw","class":"zakatcalc"},"columns":[{"settings":{"element":"gva_column"},"col_lg":12,"elements":[{"settings":{"content":"\r\n\r\n \r\n \r\n \r\n \r\nSmart Zakat Calculator\r\n A precise and comprehensive tool\r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n \r\n \r\n Money & Savings\r\n \r\n \r\n \r\n Cash (on hand or at home)\r\n \r\n \r\n $\r\n \r\n \r\n \r\n Bank balances\r\n \r\n \r\n $\r\n \r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n Gold & Silver\r\n \r\n \r\n Refresh Prices\r\n \r\n \r\n \r\n \r\n \r\n Gold weight (grams)\r\n \r\n \r\n \r\n \r\n Current gold price per gram\r\n \r\n Live\r\n \r\n \r\n \r\n \r\n $ / gram\r\n \r\n \r\n \r\n\r\n \r\n \r\n Silver weight (grams)\r\n \r\n \r\n \r\n \r\n Current silver price per gram\r\n \r\n Live\r\n \r\n \r\n \r\n \r\n $ / gram\r\n \r\n \r\n \r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n Zakat Summary\r\n \r\n \r\n Total assets:\r\n 0.00 $\r\n \r\n \r\n Net zakatable assets:\r\n 0.00 $\r\n \r\n \r\n Nisab value (85g gold):\r\n ...\r\n \r\n \r\n Enter data to check eligibility\r\n \r\n \r\n \r\n\r\n \r\n \r\n Zakat due (2.5%)\r\n 0.00 $\r\n \r\n \r\n <a>\r\n \r\n Contact via WhatsApp for consultation and donation\r\n </a>\r\n \r\n \r\n \r\n \r\n\r\n\r\n// Zakat Calculator Logic\r\nlet zakatcalculatorPricesLoaded = false;\r\n\r\n// Initialize calculator when DOM is loaded\r\ndocument.addEventListener('DOMContentLoaded', () => {\r\n zakatcalculatorFetchPrices();\r\n zakatcalculatorCalculate();\r\n \r\n // Add input event listeners for real-time calculation\r\n const inputs = document.querySelectorAll('.zakatcalculator-section__input');\r\n inputs.forEach(input => {\r\n input.addEventListener('input', zakatcalculatorCalculate);\r\n });\r\n \r\n // Format numbers as user types\r\n inputs.forEach(input => {\r\n input.addEventListener('blur', function() {\r\n if (this.value) {\r\n const value = parseFloat(this.value);\r\n if (!isNaN(value)) {\r\n this.value = value.toLocaleString('en-US', {\r\n minimumFractionDigits: 2,\r\n maximumFractionDigits: 2\r\n });\r\n }\r\n }\r\n });\r\n \r\n input.addEventListener('focus', function() {\r\n if (this.value) {\r\n this.value = this.value.replace(/[^\\d.]/g, '');\r\n }\r\n });\r\n });\r\n});\r\n\r\n// Fetch metal prices\r\nasync function zakatcalculatorFetchPrices() {\r\n const goldInput = document.getElementById('goldPrice');\r\n const silverInput = document.getElementById('silverPrice');\r\n const refreshButton = document.querySelector('.zakatcalculator-section__refresh-button');\r\n const refreshIcon = document.querySelector('.zakatcalculator-section__refresh-icon');\r\n \r\n if (!refreshButton || !refreshIcon) return;\r\n \r\n // Show loading state\r\n refreshButton.disabled = true;\r\n refreshIcon.classList.add('zakatcalculator-section__refresh-icon--spinning');\r\n goldInput.classList.add('zakatcalculator-section__input--loading');\r\n silverInput.classList.add('zakatcalculator-section__input--loading');\r\n \r\n try {\r\n // Simulate API call with delay\r\n await new Promise(resolve => setTimeout(resolve, 1500));\r\n \r\n // Mock data (in a real app, you would fetch from an API)\r\n const liveGoldPrice = 76.50;\r\n const liveSilverPrice = 0.95;\r\n \r\n // Update inputs\r\n goldInput.value = liveGoldPrice.toFixed(2);\r\n silverInput.value = liveSilverPrice.toFixed(2);\r\n \r\n // Remove loading state\r\n goldInput.classList.remove('zakatcalculator-section__input--loading');\r\n silverInput.classList.remove('zakatcalculator-section__input--loading');\r\n goldInput.classList.add('zakatcalculator-section__input--valid');\r\n silverInput.classList.add('zakatcalculator-section__input--valid');\r\n \r\n zakatcalculatorPricesLoaded = true;\r\n \r\n // Show success feedback\r\n refreshButton.innerHTML = ' Updated';\r\n refreshButton.style.backgroundColor = '#617f67';\r\n refreshButton.style.color = 'white';\r\n \r\n setTimeout(() => {\r\n refreshButton.innerHTML = ' Refresh Prices';\r\n refreshButton.style.backgroundColor = '';\r\n refreshButton.style.color = '';\r\n }, 2000);\r\n \r\n } catch (error) {\r\n console.error(\"Failed to fetch prices\", error);\r\n \r\n // Fallback values\r\n goldInput.value = 75.00;\r\n silverInput.value = 0.90;\r\n \r\n // Show error state\r\n goldInput.classList.remove('zakatcalculator-section__input--loading');\r\n silverInput.classList.remove('zakatcalculator-section__input--loading');\r\n goldInput.classList.add('zakatcalculator-section__input--invalid');\r\n silverInput.classList.add('zakatcalculator-section__input--invalid');\r\n \r\n refreshButton.innerHTML = ' Update Failed';\r\n refreshButton.style.backgroundColor = '#dc2626';\r\n refreshButton.style.color = 'white';\r\n \r\n setTimeout(() => {\r\n refreshButton.innerHTML = ' Refresh Prices';\r\n refreshButton.style.backgroundColor = '';\r\n refreshButton.style.color = '';\r\n }, 2000);\r\n \r\n } finally {\r\n refreshButton.disabled = false;\r\n refreshIcon.classList.remove('zakatcalculator-section__refresh-icon--spinning');\r\n \r\n // Recalculate zakat\r\n zakatcalculatorCalculate();\r\n }\r\n}\r\n\r\n// Calculate zakat\r\nfunction zakatcalculatorCalculate() {\r\n const cashHand = parseFloat(document.getElementById('cashHand').value) || 0;\r\n const cashBank = parseFloat(document.getElementById('cashBank').value) || 0;\r\n const goldWeight = parseFloat(document.getElementById('goldWeight').value) || 0;\r\n const goldPrice = parseFloat(document.getElementById('goldPrice').value) || 0;\r\n const silverWeight = parseFloat(document.getElementById('silverWeight').value) || 0;\r\n const silverPrice = parseFloat(document.getElementById('silverPrice').value) || 0;\r\n \r\n // Calculate totals\r\n const totalAssets = cashHand + cashBank + (goldWeight * goldPrice) + (silverWeight * silverPrice);\r\n const nisabThreshold = 85 * goldPrice;\r\n \r\n // Update display\r\n document.getElementById('totalAssetsDisplay').textContent = \r\n formatCurrency(totalAssets);\r\n \r\n document.getElementById('netAssetsDisplay').textContent = \r\n formatCurrency(totalAssets);\r\n \r\n if (goldPrice > 0) {\r\n document.getElementById('nisabValueDisplay').textContent = \r\n formatCurrency(nisabThreshold);\r\n } else {\r\n document.getElementById('nisabValueDisplay').textContent = '...';\r\n }\r\n \r\n // Update status and final zakat\r\n const statusBadge = document.getElementById('statusBadge');\r\n const finalDisplay = document.getElementById('finalZakatDisplay');\r\n const payButton = document.querySelector('.zakatcalculator-section__pay-button');\r\n \r\n if (totalAssets >= nisabThreshold && goldPrice > 0 && zakatcalculatorPricesLoaded) {\r\n const zakatAmount = totalAssets * 0.025;\r\n finalDisplay.textContent = formatCurrency(zakatAmount);\r\n \r\n // Update status badge\r\n statusBadge.textContent = '✓ Zakat is due (Nisab reached)';\r\n statusBadge.className = 'zakatcalculator-section__status zakatcalculator-section__status--eligible';\r\n \r\n // Enable pay button\r\n payButton.disabled = false;\r\n payButton.innerHTML = ' Pay Zakat Now';\r\n \r\n } else {\r\n finalDisplay.textContent = '0.00 $';\r\n \r\n // Update status badge\r\n if (!zakatcalculatorPricesLoaded) {\r\n statusBadge.textContent = 'Enter data to check eligibility';\r\n statusBadge.className = 'zakatcalculator-section__status zakatcalculator-section__status--not-eligible';\r\n } else if (totalAssets < nisabThreshold) {\r\n statusBadge.textContent = 'Zakat is not due (Nisab not reached)';\r\n statusBadge.className = 'zakatcalculator-section__status zakatcalculator-section__status--not-eligible';\r\n } else {\r\n statusBadge.textContent = 'Enter data to check eligibility';\r\n statusBadge.className = 'zakatcalculator-section__status zakatcalculator-section__status--not-eligible';\r\n }\r\n \r\n // Disable pay button\r\n payButton.disabled = true;\r\n payButton.innerHTML = ' Pay Zakat Now';\r\n }\r\n}\r\n\r\n// Format currency\r\nfunction formatCurrency(amount) {\r\n return new Intl.NumberFormat('en-US', {\r\n style: 'currency',\r\n currency: 'USD',\r\n minimumFractionDigits: 2,\r\n maximumFractionDigits: 2\r\n }).format(amount);\r\n}\r\n\r\n// Add zakat to cart\r\nfunction zakatcalculatorAddToCart() {\r\n const amountText = document.getElementById('finalZakatDisplay').textContent;\r\n const amount = parseFloat(amountText.replace(/[^0-9.-]+/g, \"\"));\r\n \r\n if (amount > 0 && !isNaN(amount)) {\r\n // Use your existing addToCart function\r\n if (typeof addToCart === 'function') {\r\n addToCart('Calculated Zakat', amount, 'Zakat');\r\n } else {\r\n // Fallback if addToCart is not defined\r\n alert(`Calculated Zakat amount: ${amountText}`);\r\n }\r\n } else {\r\n alert(\"Invalid zakat amount. Please check your inputs.\");\r\n }\r\n}\r\n\r\n// Input validation\r\nfunction validateZakatInput(input) {\r\n const value = parseFloat(input.value);\r\n const min = parseFloat(input.getAttribute('min')) || 0;\r\n \r\n if (isNaN(value) || value < min) {\r\n input.classList.add('zakatcalculator-section__input--invalid');\r\n return false;\r\n } else {\r\n input.classList.remove('zakatcalculator-section__input--invalid');\r\n input.classList.add('zakatcalculator-section__input--valid');\r\n return true;\r\n }\r\n}","animate_delay":"0"},"editing":false,"element_name":"gva_text_noeditor"}],"editing":false,"element_name":"gva_column"}],"editing":false,"element_name":"gva_row"},{"settings":{"element":"gva_row","bg_particles":"off","bg_position":"center top","bg_repeat":"no-repeat","bg_attachment":"scroll","bg_size":"cover","style_space":"remove_margin remove_padding remove_padding_col","layout":"container-fw","class":"partner","margin_top":"30","margin_bottom":"30"},"columns":[{"settings":{"element":"gva_column"},"col_lg":12,"elements":[{"settings":{"content":"\r\n \r\n Strategic Partnerships\r\n Our partners in creating hope\r\n \r\n \r\n ","animate_delay":"0"},"editing":false,"element_name":"gva_text_noeditor"},{"settings":{"title_admin":"Partners: Partners Block - en","block_drupal":"views_block__partners_block_2","hidden_title":"on","align_title":"title-align-right","remove_margin":"on","style_text":"text-dark","animate_delay":"0"},"editing":false,"element_name":"gva_drupal_block"}],"editing":false,"element_name":"gva_column"}],"editing":false,"element_name":"gva_row"}]') (Line: 47)
Drupal\gavias_content_builder\Plugin\Field\FieldFormatter\GaviasContentBuilderFormatter->viewElements(Object, 'en') (Line: 89)
Drupal\Core\Field\FormatterBase->view(Object, 'en') (Line: 263)
Drupal\Core\Entity\Entity\EntityViewDisplay->buildMultiple(Array) (Line: 351)
Drupal\Core\Entity\EntityViewBuilder->buildComponents(Array, Array, Array, 'full') (Line: 24)
Drupal\node\NodeViewBuilder->buildComponents(Array, Array, Array, 'full') (Line: 293)
Drupal\Core\Entity\EntityViewBuilder->buildMultiple(Array) (Line: 250)
Drupal\Core\Entity\EntityViewBuilder->build(Array)
call_user_func_array(Array, Array) (Line: 100)
Drupal\Core\Render\Renderer->doTrustedCallback(Array, Array, 'Render #pre_render callbacks must be methods of a class that implements \Drupal\Core\Security\TrustedCallbackInterface or be an anonymous function. The callback was %s. Support for this callback implementation is deprecated in 8.8.0 and will be removed in Drupal 9.0.0. See https://www.drupal.org/node/2966725', 'silenced_deprecation', 'Drupal\Core\Render\Element\RenderCallbackInterface') (Line: 781)
Drupal\Core\Render\Renderer->doCallback('#pre_render', Array, Array) (Line: 372)
Drupal\Core\Render\Renderer->doRender(Array, ) (Line: 200)
Drupal\Core\Render\Renderer->render(Array, ) (Line: 226)
Drupal\Core\Render\MainContent\HtmlRenderer->Drupal\Core\Render\MainContent\{closure}() (Line: 573)
Drupal\Core\Render\Renderer->executeInRenderContext(Object, Object) (Line: 227)
Drupal\Core\Render\MainContent\HtmlRenderer->prepare(Array, Object, Object) (Line: 117)
Drupal\Core\Render\MainContent\HtmlRenderer->renderResponse(Array, Object, Object) (Line: 90)
Drupal\Core\EventSubscriber\MainContentViewSubscriber->onViewRenderArray(Object, 'kernel.view', Object)
call_user_func(Array, Object, 'kernel.view', Object) (Line: 111)
Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher->dispatch('kernel.view', Object) (Line: 156)
Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object, 1) (Line: 68)
Symfony\Component\HttpKernel\HttpKernel->handle(Object, 1, 1) (Line: 57)
Drupal\Core\StackMiddleware\Session->handle(Object, 1, 1) (Line: 47)
Drupal\Core\StackMiddleware\KernelPreHandle->handle(Object, 1, 1) (Line: 191)
Drupal\page_cache\StackMiddleware\PageCache->fetch(Object, 1, 1) (Line: 128)
Drupal\page_cache\StackMiddleware\PageCache->lookup(Object, 1, 1) (Line: 82)
Drupal\page_cache\StackMiddleware\PageCache->handle(Object, 1, 1) (Line: 47)
Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle(Object, 1, 1) (Line: 52)
Drupal\Core\StackMiddleware\NegotiationMiddleware->handle(Object, 1, 1) (Line: 23)
Stack\StackedHttpKernel->handle(Object, 1, 1) (Line: 708)
Drupal\Core\DrupalKernel->handle(Object) (Line: 19)
- Deprecated function: implode(): Passing glue string after array is deprecated. Swap the parameters in element_gva_row->render_content() (line 317 of themes/gavias_kunco/gva_content_builder/gva_row.php).
element_gva_row->render_content(Array, '
Our Distinguished Projects
At Wejdan Charity, we strive to provide support and assistance to communities in need who are affected by disasters, crises, and wars, with the aim of improving quality of life and promoting sustainable development. Our projects span across several areas:
Relief Projects
Emergency response to disasters and wars, providing food and medicine.
<a href="relief-projects" class="projects-section__card-button projects-section__card-button--relief"> Browse Projects </a>
Development Projects
Empowering communities and building capacities.
<a href="development-projects" class="projects-section__card-button projects-section__card-button--development"> Browse Projects </a>
Seasonal Projects
Ramadan campaigns, Qurbani, and winter clothing.
<a href="seasonal-projects" class="projects-section__card-button projects-section__card-button--seasonal"> Browse Projects </a>
Endowment Projects
An investment for the hereafter—mosques, wells, and charitable endowments.
<a href="endowment-projects" class="projects-section__card-button projects-section__card-button--waqf"> Browse Projects </a>
') (Line: 110)
gavias_content_builder_render_element('gva_row', Array, '
Our Distinguished Projects
At Wejdan Charity, we strive to provide support and assistance to communities in need who are affected by disasters, crises, and wars, with the aim of improving quality of life and promoting sustainable development. Our projects span across several areas:
Relief Projects
Emergency response to disasters and wars, providing food and medicine.
<a href="relief-projects" class="projects-section__card-button projects-section__card-button--relief"> Browse Projects </a>
Development Projects
Empowering communities and building capacities.
<a href="development-projects" class="projects-section__card-button projects-section__card-button--development"> Browse Projects </a>
Seasonal Projects
Ramadan campaigns, Qurbani, and winter clothing.
<a href="seasonal-projects" class="projects-section__card-button projects-section__card-button--seasonal"> Browse Projects </a>
Endowment Projects
An investment for the hereafter—mosques, wells, and charitable endowments.
<a href="endowment-projects" class="projects-section__card-button projects-section__card-button--waqf"> Browse Projects </a>
') (Line: 62)
gavias_content_builder_render_el(Array) (Line: 22)
gavias_content_builder_frontend('[{"settings":{"bg_particles":"off","bg_position":"center top","bg_repeat":"no-repeat","bg_attachment":"scroll","bg_size":"cover","style_space":"remove_padding","layout":"container-fw"},"columns":[{"settings":{"element":"gva_column","bg_position":"center top","bg_repeat":"no-repeat","bg_attachment":"scroll","bg_size":"cover","el_class":"front"},"col_lg":12,"elements":[{"settings":{"content":"\r\n \r\n \r\n \r\n \r\n Urgent Appeal\r\n \r\n Be a helping hand for them in\r\n times of crisis\r\n \r\n \r\n At \"Wejdan Charity\", we work with full transparency to deliver your donations to those in need in conflict and poverty-stricken areas.\r\n \r\n \r\n <a>\r\n Charity Donations \r\n </a>\r\n <a>\r\n Our Projects \r\n </a>\r\n \r\n \r\n \r\n \r\n","animate_delay":"0"},"editing":false,"element_name":"gva_text_noeditor"}],"editing":false,"element_name":"gva_column"}],"editing":false,"element_name":"gva_row"},{"settings":{"element":"gva_row","bg_particles":"off","bg_position":"center top","bg_repeat":"no-repeat","bg_attachment":"scroll","bg_size":"cover","style_space":"remove_padding","layout":"container","class":"before-help-region"},"columns":[{"settings":{"element":"gva_column"},"col_lg":12,"elements":[{"settings":{"title":"Take action for animals now","link":"#","button_title":"Donation Now","button_align":"button-right-v2","style_text":"text-light","style_button":"btn-theme","donorbox":"off","target":"off","el_class":"margin","animate":"fade-up","animate_delay":"0"},"editing":false,"element_name":"gva_call_to_action"}],"editing":false,"element_name":"gva_column"}],"editing":false,"element_name":"gva_row"},{"settings":{"element":"gva_row","bg_particles":"off","bg_position":"center top","bg_repeat":"no-repeat","bg_attachment":"scroll","bg_size":"cover","style_space":"remove_padding","layout":"container-fw","bg_color":"#f9fafb"},"columns":[{"settings":{"element":"gva_column","bg_position":"center top","bg_repeat":"no-repeat","bg_attachment":"scroll","bg_size":"cover","el_class":"about"},"col_lg":12,"elements":[{"settings":{"content":"\r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n \r\n \r\n Who We Are\r\n \r\n \r\n We plant hope.. \r\n and build people and the future\r\n \r\n \r\n Wejdan Charity is a leading humanitarian organization, founded with an ambitious vision to be a bridge of الخير between donors and those in need.\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n Development Stages\r\n A continuous journey of growth\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n Areas of Work\r\n We reach where the need is\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \"We work with passion to bring smiles\"\r\n \r\n \r\n \r\n \r\n \r\n","animate_delay":"0"},"editing":false,"element_name":"gva_text_noeditor"}],"editing":false,"element_name":"gva_column"}],"editing":false,"element_name":"gva_row"},{"settings":{"element":"gva_row","bg_particles":"off","bg_position":"center top","bg_repeat":"no-repeat","bg_attachment":"scroll","bg_size":"cover","style_space":"remove_margin remove_padding remove_padding_col","layout":"container-fw","class":"partner","margin_top":"30","margin_bottom":"30"},"columns":[{"settings":{"element":"gva_column"},"col_lg":12,"elements":[{"settings":{"content":"\r\n\r\n \r\n \r\n Initiatives & Programs\r\n Our Areas of Work\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n Ongoing Charity\r\n Water wells, mosque construction\r\n \r\n \r\n \r\n \r\n \r\n \r\n Student Sponsorship\r\n Building the future through education\r\n \r\n \r\n \r\n \r\n \r\n \r\n Humanitarian Cases\r\n Patient treatment, surgeries\r\n \r\n \r\n \r\n \r\n \r\n \r\n Development Projects\r\n Empowering productive families\r\n \r\n \r\n<a>Learn more about our programs and initiatives</a>\r\n \r\n","animate_delay":"0"},"editing":false,"element_name":"gva_text_noeditor"}],"editing":false,"element_name":"gva_column"}],"editing":false,"element_name":"gva_row"},{"settings":{"element":"gva_row","bg_particles":"off","bg_position":"center top","bg_repeat":"no-repeat","bg_attachment":"scroll","bg_size":"cover","style_space":"remove_margin remove_padding remove_padding_col","layout":"container","class":"newsfront"},"columns":[{"settings":{"element":"gva_column"},"col_lg":12,"elements":[{"settings":{"content":"\r\n \r\n \r\n Our News\r\n \r\n \r\n \r\nNews that tells the story of giving \r\n \r\n","animate_delay":"0"},"editing":false,"element_name":"gva_text_noeditor"},{"settings":{"title_admin":"news: news Block -en","block_drupal":"views_block__news_block_3","hidden_title":"on","align_title":"title-align-left","remove_margin":"on","style_text":"text-dark","animate_delay":"0"},"editing":false,"element_name":"gva_drupal_block"}],"editing":false,"element_name":"gva_column"}],"editing":false,"element_name":"gva_row"},{"settings":{"bg_particles":"off","bg_position":"center top","bg_repeat":"no-repeat","bg_attachment":"scroll","bg_size":"cover","style_space":"remove_padding","layout":"container-fw","element":"gva_row","class":"sliderfrontpage"},"columns":[{"settings":{"element":"gva_column","bg_position":"center top","bg_repeat":"no-repeat","bg_attachment":"scroll","bg_size":"cover"},"col_lg":12,"elements":[{"settings":{"title_admin":"news: campigns-en","block_drupal":"views_block__news_block_5","hidden_title":"on","align_title":"title-align-right","remove_margin":"on","style_text":"text-dark","animate_delay":"0"},"editing":false,"element_name":"gva_drupal_block"}],"editing":false,"element_name":"gva_column"}],"editing":false,"element_name":"gva_row"},{"settings":{"element":"gva_row","bg_particles":"off","bg_position":"center top","bg_repeat":"no-repeat","bg_attachment":"scroll","bg_size":"cover","style_space":"remove_margin remove_padding remove_padding_col","layout":"container-fw","class":"partner"},"columns":[{"settings":{"element":"gva_column"},"col_lg":12,"elements":[{"settings":{"content":"\r\n \r\n \r\n \r\n Our Distinguished Projects\r\n \r\n \r\n \r\n At Wejdan Charity, we strive to provide support and assistance to communities in need who are affected by disasters, crises, and wars, with the aim of improving quality of life and promoting sustainable development. Our projects span across several areas:\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n Relief Projects\r\n Emergency response to disasters and wars, providing food and medicine.\r\n \r\n<a> Browse Projects </a>\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n Development Projects\r\n Empowering communities and building capacities.\r\n \r\n<a> Browse Projects </a>\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n Seasonal Projects\r\n Ramadan campaigns, Qurbani, and winter clothing.\r\n \r\n<a> Browse Projects </a>\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n Endowment Projects\r\n An investment for the hereafter—mosques, wells, and charitable endowments.\r\n<a> Browse Projects </a>\r\n \r\n \r\n \r\n \r\n","animate_delay":"0"},"editing":false,"element_name":"gva_text_noeditor"}],"editing":false,"element_name":"gva_column"}],"editing":false,"element_name":"gva_row"},{"settings":{"element":"gva_row","bg_particles":"off","bg_position":"center top","bg_repeat":"no-repeat","bg_attachment":"scroll","bg_size":"cover","style_space":"remove_margin remove_padding remove_padding_col","layout":"container-fw","class":"partner"},"columns":[{"settings":{"element":"gva_column"},"col_lg":12,"elements":[{"settings":{"content":"\r\n \r\n \r\n\r\n \r\n \r\n Our Achievements in Numbers\r\n Your trust makes the difference\r\n \r\n \r\n\r\n \r\n \r\n 0\r\n Beneficiaries worldwide\r\n \r\n \r\n \r\n 0\r\n Projects implemented\r\n \r\n \r\n \r\n 0\r\n Countries we operate in\r\n \r\n \r\n \r\n 0\r\n Volunteers\r\n \r\n \r\n \r\n \r\n\r\n\r\n// Enhanced counter animation for facts section\r\nfunction animateFactsCounters() {\r\n const statNumbers = document.querySelectorAll('.facts-section__stat-number');\r\n \r\n const observer = new IntersectionObserver((entries) => {\r\n entries.forEach(entry => {\r\n if (entry.isIntersecting) {\r\n const counter = entry.target;\r\n const target = parseInt(counter.getAttribute('data-target'));\r\n const duration = 2000;\r\n const increment = target / (duration / 16);\r\n \r\n let current = 0;\r\n const updateCounter = () => {\r\n current += increment;\r\n if (current < target) {\r\n // Format number with K for thousands\r\n let displayNum = Math.ceil(current);\r\n if (displayNum >= 1000) {\r\n counter.textContent = (displayNum / 1000).toFixed(1).replace('.0', '') + 'K';\r\n } else {\r\n counter.textContent = displayNum.toLocaleString();\r\n }\r\n requestAnimationFrame(updateCounter);\r\n } else {\r\n // Final formatting\r\n if (target >= 1000) {\r\n counter.textContent = (target / 1000).toFixed(1).replace('.0', '') + 'K';\r\n counter.classList.add('formatted');\r\n } else {\r\n counter.textContent = target.toLocaleString();\r\n }\r\n counter.classList.add('animated');\r\n setTimeout(() => counter.classList.remove('animated'), 600);\r\n }\r\n };\r\n updateCounter();\r\n observer.unobserve(counter);\r\n }\r\n });\r\n }, { threshold: 0.5, rootMargin: '0px 0px -50px 0px' });\r\n \r\n statNumbers.forEach(counter => observer.observe(counter));\r\n}\r\n\r\n// Call this function when DOM is loaded\r\ndocument.addEventListener('DOMContentLoaded', () => {\r\n animateFactsCounters();\r\n});","animate_delay":"0"},"editing":false,"element_name":"gva_text_noeditor"}],"editing":false,"element_name":"gva_column"}],"editing":false,"element_name":"gva_row"},{"settings":{"element":"gva_row","bg_particles":"off","bg_position":"center top","bg_repeat":"no-repeat","bg_attachment":"scroll","bg_size":"cover","style_space":"remove_margin remove_padding remove_padding_col","layout":"container-fw","class":"zakatcalc"},"columns":[{"settings":{"element":"gva_column"},"col_lg":12,"elements":[{"settings":{"content":"\r\n\r\n \r\n \r\n \r\n \r\nSmart Zakat Calculator\r\n A precise and comprehensive tool\r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n \r\n \r\n Money & Savings\r\n \r\n \r\n \r\n Cash (on hand or at home)\r\n \r\n \r\n $\r\n \r\n \r\n \r\n Bank balances\r\n \r\n \r\n $\r\n \r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n Gold & Silver\r\n \r\n \r\n Refresh Prices\r\n \r\n \r\n \r\n \r\n \r\n Gold weight (grams)\r\n \r\n \r\n \r\n \r\n Current gold price per gram\r\n \r\n Live\r\n \r\n \r\n \r\n \r\n $ / gram\r\n \r\n \r\n \r\n\r\n \r\n \r\n Silver weight (grams)\r\n \r\n \r\n \r\n \r\n Current silver price per gram\r\n \r\n Live\r\n \r\n \r\n \r\n \r\n $ / gram\r\n \r\n \r\n \r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n Zakat Summary\r\n \r\n \r\n Total assets:\r\n 0.00 $\r\n \r\n \r\n Net zakatable assets:\r\n 0.00 $\r\n \r\n \r\n Nisab value (85g gold):\r\n ...\r\n \r\n \r\n Enter data to check eligibility\r\n \r\n \r\n \r\n\r\n \r\n \r\n Zakat due (2.5%)\r\n 0.00 $\r\n \r\n \r\n <a>\r\n \r\n Contact via WhatsApp for consultation and donation\r\n </a>\r\n \r\n \r\n \r\n \r\n\r\n\r\n// Zakat Calculator Logic\r\nlet zakatcalculatorPricesLoaded = false;\r\n\r\n// Initialize calculator when DOM is loaded\r\ndocument.addEventListener('DOMContentLoaded', () => {\r\n zakatcalculatorFetchPrices();\r\n zakatcalculatorCalculate();\r\n \r\n // Add input event listeners for real-time calculation\r\n const inputs = document.querySelectorAll('.zakatcalculator-section__input');\r\n inputs.forEach(input => {\r\n input.addEventListener('input', zakatcalculatorCalculate);\r\n });\r\n \r\n // Format numbers as user types\r\n inputs.forEach(input => {\r\n input.addEventListener('blur', function() {\r\n if (this.value) {\r\n const value = parseFloat(this.value);\r\n if (!isNaN(value)) {\r\n this.value = value.toLocaleString('en-US', {\r\n minimumFractionDigits: 2,\r\n maximumFractionDigits: 2\r\n });\r\n }\r\n }\r\n });\r\n \r\n input.addEventListener('focus', function() {\r\n if (this.value) {\r\n this.value = this.value.replace(/[^\\d.]/g, '');\r\n }\r\n });\r\n });\r\n});\r\n\r\n// Fetch metal prices\r\nasync function zakatcalculatorFetchPrices() {\r\n const goldInput = document.getElementById('goldPrice');\r\n const silverInput = document.getElementById('silverPrice');\r\n const refreshButton = document.querySelector('.zakatcalculator-section__refresh-button');\r\n const refreshIcon = document.querySelector('.zakatcalculator-section__refresh-icon');\r\n \r\n if (!refreshButton || !refreshIcon) return;\r\n \r\n // Show loading state\r\n refreshButton.disabled = true;\r\n refreshIcon.classList.add('zakatcalculator-section__refresh-icon--spinning');\r\n goldInput.classList.add('zakatcalculator-section__input--loading');\r\n silverInput.classList.add('zakatcalculator-section__input--loading');\r\n \r\n try {\r\n // Simulate API call with delay\r\n await new Promise(resolve => setTimeout(resolve, 1500));\r\n \r\n // Mock data (in a real app, you would fetch from an API)\r\n const liveGoldPrice = 76.50;\r\n const liveSilverPrice = 0.95;\r\n \r\n // Update inputs\r\n goldInput.value = liveGoldPrice.toFixed(2);\r\n silverInput.value = liveSilverPrice.toFixed(2);\r\n \r\n // Remove loading state\r\n goldInput.classList.remove('zakatcalculator-section__input--loading');\r\n silverInput.classList.remove('zakatcalculator-section__input--loading');\r\n goldInput.classList.add('zakatcalculator-section__input--valid');\r\n silverInput.classList.add('zakatcalculator-section__input--valid');\r\n \r\n zakatcalculatorPricesLoaded = true;\r\n \r\n // Show success feedback\r\n refreshButton.innerHTML = ' Updated';\r\n refreshButton.style.backgroundColor = '#617f67';\r\n refreshButton.style.color = 'white';\r\n \r\n setTimeout(() => {\r\n refreshButton.innerHTML = ' Refresh Prices';\r\n refreshButton.style.backgroundColor = '';\r\n refreshButton.style.color = '';\r\n }, 2000);\r\n \r\n } catch (error) {\r\n console.error(\"Failed to fetch prices\", error);\r\n \r\n // Fallback values\r\n goldInput.value = 75.00;\r\n silverInput.value = 0.90;\r\n \r\n // Show error state\r\n goldInput.classList.remove('zakatcalculator-section__input--loading');\r\n silverInput.classList.remove('zakatcalculator-section__input--loading');\r\n goldInput.classList.add('zakatcalculator-section__input--invalid');\r\n silverInput.classList.add('zakatcalculator-section__input--invalid');\r\n \r\n refreshButton.innerHTML = ' Update Failed';\r\n refreshButton.style.backgroundColor = '#dc2626';\r\n refreshButton.style.color = 'white';\r\n \r\n setTimeout(() => {\r\n refreshButton.innerHTML = ' Refresh Prices';\r\n refreshButton.style.backgroundColor = '';\r\n refreshButton.style.color = '';\r\n }, 2000);\r\n \r\n } finally {\r\n refreshButton.disabled = false;\r\n refreshIcon.classList.remove('zakatcalculator-section__refresh-icon--spinning');\r\n \r\n // Recalculate zakat\r\n zakatcalculatorCalculate();\r\n }\r\n}\r\n\r\n// Calculate zakat\r\nfunction zakatcalculatorCalculate() {\r\n const cashHand = parseFloat(document.getElementById('cashHand').value) || 0;\r\n const cashBank = parseFloat(document.getElementById('cashBank').value) || 0;\r\n const goldWeight = parseFloat(document.getElementById('goldWeight').value) || 0;\r\n const goldPrice = parseFloat(document.getElementById('goldPrice').value) || 0;\r\n const silverWeight = parseFloat(document.getElementById('silverWeight').value) || 0;\r\n const silverPrice = parseFloat(document.getElementById('silverPrice').value) || 0;\r\n \r\n // Calculate totals\r\n const totalAssets = cashHand + cashBank + (goldWeight * goldPrice) + (silverWeight * silverPrice);\r\n const nisabThreshold = 85 * goldPrice;\r\n \r\n // Update display\r\n document.getElementById('totalAssetsDisplay').textContent = \r\n formatCurrency(totalAssets);\r\n \r\n document.getElementById('netAssetsDisplay').textContent = \r\n formatCurrency(totalAssets);\r\n \r\n if (goldPrice > 0) {\r\n document.getElementById('nisabValueDisplay').textContent = \r\n formatCurrency(nisabThreshold);\r\n } else {\r\n document.getElementById('nisabValueDisplay').textContent = '...';\r\n }\r\n \r\n // Update status and final zakat\r\n const statusBadge = document.getElementById('statusBadge');\r\n const finalDisplay = document.getElementById('finalZakatDisplay');\r\n const payButton = document.querySelector('.zakatcalculator-section__pay-button');\r\n \r\n if (totalAssets >= nisabThreshold && goldPrice > 0 && zakatcalculatorPricesLoaded) {\r\n const zakatAmount = totalAssets * 0.025;\r\n finalDisplay.textContent = formatCurrency(zakatAmount);\r\n \r\n // Update status badge\r\n statusBadge.textContent = '✓ Zakat is due (Nisab reached)';\r\n statusBadge.className = 'zakatcalculator-section__status zakatcalculator-section__status--eligible';\r\n \r\n // Enable pay button\r\n payButton.disabled = false;\r\n payButton.innerHTML = ' Pay Zakat Now';\r\n \r\n } else {\r\n finalDisplay.textContent = '0.00 $';\r\n \r\n // Update status badge\r\n if (!zakatcalculatorPricesLoaded) {\r\n statusBadge.textContent = 'Enter data to check eligibility';\r\n statusBadge.className = 'zakatcalculator-section__status zakatcalculator-section__status--not-eligible';\r\n } else if (totalAssets < nisabThreshold) {\r\n statusBadge.textContent = 'Zakat is not due (Nisab not reached)';\r\n statusBadge.className = 'zakatcalculator-section__status zakatcalculator-section__status--not-eligible';\r\n } else {\r\n statusBadge.textContent = 'Enter data to check eligibility';\r\n statusBadge.className = 'zakatcalculator-section__status zakatcalculator-section__status--not-eligible';\r\n }\r\n \r\n // Disable pay button\r\n payButton.disabled = true;\r\n payButton.innerHTML = ' Pay Zakat Now';\r\n }\r\n}\r\n\r\n// Format currency\r\nfunction formatCurrency(amount) {\r\n return new Intl.NumberFormat('en-US', {\r\n style: 'currency',\r\n currency: 'USD',\r\n minimumFractionDigits: 2,\r\n maximumFractionDigits: 2\r\n }).format(amount);\r\n}\r\n\r\n// Add zakat to cart\r\nfunction zakatcalculatorAddToCart() {\r\n const amountText = document.getElementById('finalZakatDisplay').textContent;\r\n const amount = parseFloat(amountText.replace(/[^0-9.-]+/g, \"\"));\r\n \r\n if (amount > 0 && !isNaN(amount)) {\r\n // Use your existing addToCart function\r\n if (typeof addToCart === 'function') {\r\n addToCart('Calculated Zakat', amount, 'Zakat');\r\n } else {\r\n // Fallback if addToCart is not defined\r\n alert(`Calculated Zakat amount: ${amountText}`);\r\n }\r\n } else {\r\n alert(\"Invalid zakat amount. Please check your inputs.\");\r\n }\r\n}\r\n\r\n// Input validation\r\nfunction validateZakatInput(input) {\r\n const value = parseFloat(input.value);\r\n const min = parseFloat(input.getAttribute('min')) || 0;\r\n \r\n if (isNaN(value) || value < min) {\r\n input.classList.add('zakatcalculator-section__input--invalid');\r\n return false;\r\n } else {\r\n input.classList.remove('zakatcalculator-section__input--invalid');\r\n input.classList.add('zakatcalculator-section__input--valid');\r\n return true;\r\n }\r\n}","animate_delay":"0"},"editing":false,"element_name":"gva_text_noeditor"}],"editing":false,"element_name":"gva_column"}],"editing":false,"element_name":"gva_row"},{"settings":{"element":"gva_row","bg_particles":"off","bg_position":"center top","bg_repeat":"no-repeat","bg_attachment":"scroll","bg_size":"cover","style_space":"remove_margin remove_padding remove_padding_col","layout":"container-fw","class":"partner","margin_top":"30","margin_bottom":"30"},"columns":[{"settings":{"element":"gva_column"},"col_lg":12,"elements":[{"settings":{"content":"\r\n \r\n Strategic Partnerships\r\n Our partners in creating hope\r\n \r\n \r\n ","animate_delay":"0"},"editing":false,"element_name":"gva_text_noeditor"},{"settings":{"title_admin":"Partners: Partners Block - en","block_drupal":"views_block__partners_block_2","hidden_title":"on","align_title":"title-align-right","remove_margin":"on","style_text":"text-dark","animate_delay":"0"},"editing":false,"element_name":"gva_drupal_block"}],"editing":false,"element_name":"gva_column"}],"editing":false,"element_name":"gva_row"}]') (Line: 47)
Drupal\gavias_content_builder\Plugin\Field\FieldFormatter\GaviasContentBuilderFormatter->viewElements(Object, 'en') (Line: 89)
Drupal\Core\Field\FormatterBase->view(Object, 'en') (Line: 263)
Drupal\Core\Entity\Entity\EntityViewDisplay->buildMultiple(Array) (Line: 351)
Drupal\Core\Entity\EntityViewBuilder->buildComponents(Array, Array, Array, 'full') (Line: 24)
Drupal\node\NodeViewBuilder->buildComponents(Array, Array, Array, 'full') (Line: 293)
Drupal\Core\Entity\EntityViewBuilder->buildMultiple(Array) (Line: 250)
Drupal\Core\Entity\EntityViewBuilder->build(Array)
call_user_func_array(Array, Array) (Line: 100)
Drupal\Core\Render\Renderer->doTrustedCallback(Array, Array, 'Render #pre_render callbacks must be methods of a class that implements \Drupal\Core\Security\TrustedCallbackInterface or be an anonymous function. The callback was %s. Support for this callback implementation is deprecated in 8.8.0 and will be removed in Drupal 9.0.0. See https://www.drupal.org/node/2966725', 'silenced_deprecation', 'Drupal\Core\Render\Element\RenderCallbackInterface') (Line: 781)
Drupal\Core\Render\Renderer->doCallback('#pre_render', Array, Array) (Line: 372)
Drupal\Core\Render\Renderer->doRender(Array, ) (Line: 200)
Drupal\Core\Render\Renderer->render(Array, ) (Line: 226)
Drupal\Core\Render\MainContent\HtmlRenderer->Drupal\Core\Render\MainContent\{closure}() (Line: 573)
Drupal\Core\Render\Renderer->executeInRenderContext(Object, Object) (Line: 227)
Drupal\Core\Render\MainContent\HtmlRenderer->prepare(Array, Object, Object) (Line: 117)
Drupal\Core\Render\MainContent\HtmlRenderer->renderResponse(Array, Object, Object) (Line: 90)
Drupal\Core\EventSubscriber\MainContentViewSubscriber->onViewRenderArray(Object, 'kernel.view', Object)
call_user_func(Array, Object, 'kernel.view', Object) (Line: 111)
Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher->dispatch('kernel.view', Object) (Line: 156)
Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object, 1) (Line: 68)
Symfony\Component\HttpKernel\HttpKernel->handle(Object, 1, 1) (Line: 57)
Drupal\Core\StackMiddleware\Session->handle(Object, 1, 1) (Line: 47)
Drupal\Core\StackMiddleware\KernelPreHandle->handle(Object, 1, 1) (Line: 191)
Drupal\page_cache\StackMiddleware\PageCache->fetch(Object, 1, 1) (Line: 128)
Drupal\page_cache\StackMiddleware\PageCache->lookup(Object, 1, 1) (Line: 82)
Drupal\page_cache\StackMiddleware\PageCache->handle(Object, 1, 1) (Line: 47)
Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle(Object, 1, 1) (Line: 52)
Drupal\Core\StackMiddleware\NegotiationMiddleware->handle(Object, 1, 1) (Line: 23)
Stack\StackedHttpKernel->handle(Object, 1, 1) (Line: 708)
Drupal\Core\DrupalKernel->handle(Object) (Line: 19)
- Deprecated function: implode(): Passing glue string after array is deprecated. Swap the parameters in element_gva_column->render_content() (line 462 of themes/gavias_kunco/gva_content_builder/gva_column.php).
element_gva_column->render_content(Array, '
Our Achievements in Numbers
Your trust makes the difference
0
Beneficiaries worldwide
0
Projects implemented
0
Countries we operate in
0
Volunteers
// Enhanced counter animation for facts section
function animateFactsCounters() {
const statNumbers = document.querySelectorAll('.facts-section__stat-number');
const observer = new IntersectionObserver((entries) => {
entries.forEach(entry => {
if (entry.isIntersecting) {
const counter = entry.target;
const target = parseInt(counter.getAttribute('data-target'));
const duration = 2000;
const increment = target / (duration / 16);
let current = 0;
const updateCounter = () => {
current += increment;
if (current < target) {
// Format number with K for thousands
let displayNum = Math.ceil(current);
if (displayNum >= 1000) {
counter.textContent = (displayNum / 1000).toFixed(1).replace('.0', '') + 'K';
} else {
counter.textContent = displayNum.toLocaleString();
}
requestAnimationFrame(updateCounter);
} else {
// Final formatting
if (target >= 1000) {
counter.textContent = (target / 1000).toFixed(1).replace('.0', '') + 'K';
counter.classList.add('formatted');
} else {
counter.textContent = target.toLocaleString();
}
counter.classList.add('animated');
setTimeout(() => counter.classList.remove('animated'), 600);
}
};
updateCounter();
observer.unobserve(counter);
}
});
}, { threshold: 0.5, rootMargin: '0px 0px -50px 0px' });
statNumbers.forEach(counter => observer.observe(counter));
}
// Call this function when DOM is loaded
document.addEventListener('DOMContentLoaded', () => {
animateFactsCounters();
});') (Line: 110)
gavias_content_builder_render_element('gva_column', Array, '
Our Achievements in Numbers
Your trust makes the difference
0
Beneficiaries worldwide
0
Projects implemented
0
Countries we operate in
0
Volunteers
// Enhanced counter animation for facts section
function animateFactsCounters() {
const statNumbers = document.querySelectorAll('.facts-section__stat-number');
const observer = new IntersectionObserver((entries) => {
entries.forEach(entry => {
if (entry.isIntersecting) {
const counter = entry.target;
const target = parseInt(counter.getAttribute('data-target'));
const duration = 2000;
const increment = target / (duration / 16);
let current = 0;
const updateCounter = () => {
current += increment;
if (current < target) {
// Format number with K for thousands
let displayNum = Math.ceil(current);
if (displayNum >= 1000) {
counter.textContent = (displayNum / 1000).toFixed(1).replace('.0', '') + 'K';
} else {
counter.textContent = displayNum.toLocaleString();
}
requestAnimationFrame(updateCounter);
} else {
// Final formatting
if (target >= 1000) {
counter.textContent = (target / 1000).toFixed(1).replace('.0', '') + 'K';
counter.classList.add('formatted');
} else {
counter.textContent = target.toLocaleString();
}
counter.classList.add('animated');
setTimeout(() => counter.classList.remove('animated'), 600);
}
};
updateCounter();
observer.unobserve(counter);
}
});
}, { threshold: 0.5, rootMargin: '0px 0px -50px 0px' });
statNumbers.forEach(counter => observer.observe(counter));
}
// Call this function when DOM is loaded
document.addEventListener('DOMContentLoaded', () => {
animateFactsCounters();
});') (Line: 58)
gavias_content_builder_render_el(Array) (Line: 22)
gavias_content_builder_frontend('[{"settings":{"bg_particles":"off","bg_position":"center top","bg_repeat":"no-repeat","bg_attachment":"scroll","bg_size":"cover","style_space":"remove_padding","layout":"container-fw"},"columns":[{"settings":{"element":"gva_column","bg_position":"center top","bg_repeat":"no-repeat","bg_attachment":"scroll","bg_size":"cover","el_class":"front"},"col_lg":12,"elements":[{"settings":{"content":"\r\n \r\n \r\n \r\n \r\n Urgent Appeal\r\n \r\n Be a helping hand for them in\r\n times of crisis\r\n \r\n \r\n At \"Wejdan Charity\", we work with full transparency to deliver your donations to those in need in conflict and poverty-stricken areas.\r\n \r\n \r\n <a>\r\n Charity Donations \r\n </a>\r\n <a>\r\n Our Projects \r\n </a>\r\n \r\n \r\n \r\n \r\n","animate_delay":"0"},"editing":false,"element_name":"gva_text_noeditor"}],"editing":false,"element_name":"gva_column"}],"editing":false,"element_name":"gva_row"},{"settings":{"element":"gva_row","bg_particles":"off","bg_position":"center top","bg_repeat":"no-repeat","bg_attachment":"scroll","bg_size":"cover","style_space":"remove_padding","layout":"container","class":"before-help-region"},"columns":[{"settings":{"element":"gva_column"},"col_lg":12,"elements":[{"settings":{"title":"Take action for animals now","link":"#","button_title":"Donation Now","button_align":"button-right-v2","style_text":"text-light","style_button":"btn-theme","donorbox":"off","target":"off","el_class":"margin","animate":"fade-up","animate_delay":"0"},"editing":false,"element_name":"gva_call_to_action"}],"editing":false,"element_name":"gva_column"}],"editing":false,"element_name":"gva_row"},{"settings":{"element":"gva_row","bg_particles":"off","bg_position":"center top","bg_repeat":"no-repeat","bg_attachment":"scroll","bg_size":"cover","style_space":"remove_padding","layout":"container-fw","bg_color":"#f9fafb"},"columns":[{"settings":{"element":"gva_column","bg_position":"center top","bg_repeat":"no-repeat","bg_attachment":"scroll","bg_size":"cover","el_class":"about"},"col_lg":12,"elements":[{"settings":{"content":"\r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n \r\n \r\n Who We Are\r\n \r\n \r\n We plant hope.. \r\n and build people and the future\r\n \r\n \r\n Wejdan Charity is a leading humanitarian organization, founded with an ambitious vision to be a bridge of الخير between donors and those in need.\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n Development Stages\r\n A continuous journey of growth\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n Areas of Work\r\n We reach where the need is\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \"We work with passion to bring smiles\"\r\n \r\n \r\n \r\n \r\n \r\n","animate_delay":"0"},"editing":false,"element_name":"gva_text_noeditor"}],"editing":false,"element_name":"gva_column"}],"editing":false,"element_name":"gva_row"},{"settings":{"element":"gva_row","bg_particles":"off","bg_position":"center top","bg_repeat":"no-repeat","bg_attachment":"scroll","bg_size":"cover","style_space":"remove_margin remove_padding remove_padding_col","layout":"container-fw","class":"partner","margin_top":"30","margin_bottom":"30"},"columns":[{"settings":{"element":"gva_column"},"col_lg":12,"elements":[{"settings":{"content":"\r\n\r\n \r\n \r\n Initiatives & Programs\r\n Our Areas of Work\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n Ongoing Charity\r\n Water wells, mosque construction\r\n \r\n \r\n \r\n \r\n \r\n \r\n Student Sponsorship\r\n Building the future through education\r\n \r\n \r\n \r\n \r\n \r\n \r\n Humanitarian Cases\r\n Patient treatment, surgeries\r\n \r\n \r\n \r\n \r\n \r\n \r\n Development Projects\r\n Empowering productive families\r\n \r\n \r\n<a>Learn more about our programs and initiatives</a>\r\n \r\n","animate_delay":"0"},"editing":false,"element_name":"gva_text_noeditor"}],"editing":false,"element_name":"gva_column"}],"editing":false,"element_name":"gva_row"},{"settings":{"element":"gva_row","bg_particles":"off","bg_position":"center top","bg_repeat":"no-repeat","bg_attachment":"scroll","bg_size":"cover","style_space":"remove_margin remove_padding remove_padding_col","layout":"container","class":"newsfront"},"columns":[{"settings":{"element":"gva_column"},"col_lg":12,"elements":[{"settings":{"content":"\r\n \r\n \r\n Our News\r\n \r\n \r\n \r\nNews that tells the story of giving \r\n \r\n","animate_delay":"0"},"editing":false,"element_name":"gva_text_noeditor"},{"settings":{"title_admin":"news: news Block -en","block_drupal":"views_block__news_block_3","hidden_title":"on","align_title":"title-align-left","remove_margin":"on","style_text":"text-dark","animate_delay":"0"},"editing":false,"element_name":"gva_drupal_block"}],"editing":false,"element_name":"gva_column"}],"editing":false,"element_name":"gva_row"},{"settings":{"bg_particles":"off","bg_position":"center top","bg_repeat":"no-repeat","bg_attachment":"scroll","bg_size":"cover","style_space":"remove_padding","layout":"container-fw","element":"gva_row","class":"sliderfrontpage"},"columns":[{"settings":{"element":"gva_column","bg_position":"center top","bg_repeat":"no-repeat","bg_attachment":"scroll","bg_size":"cover"},"col_lg":12,"elements":[{"settings":{"title_admin":"news: campigns-en","block_drupal":"views_block__news_block_5","hidden_title":"on","align_title":"title-align-right","remove_margin":"on","style_text":"text-dark","animate_delay":"0"},"editing":false,"element_name":"gva_drupal_block"}],"editing":false,"element_name":"gva_column"}],"editing":false,"element_name":"gva_row"},{"settings":{"element":"gva_row","bg_particles":"off","bg_position":"center top","bg_repeat":"no-repeat","bg_attachment":"scroll","bg_size":"cover","style_space":"remove_margin remove_padding remove_padding_col","layout":"container-fw","class":"partner"},"columns":[{"settings":{"element":"gva_column"},"col_lg":12,"elements":[{"settings":{"content":"\r\n \r\n \r\n \r\n Our Distinguished Projects\r\n \r\n \r\n \r\n At Wejdan Charity, we strive to provide support and assistance to communities in need who are affected by disasters, crises, and wars, with the aim of improving quality of life and promoting sustainable development. Our projects span across several areas:\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n Relief Projects\r\n Emergency response to disasters and wars, providing food and medicine.\r\n \r\n<a> Browse Projects </a>\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n Development Projects\r\n Empowering communities and building capacities.\r\n \r\n<a> Browse Projects </a>\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n Seasonal Projects\r\n Ramadan campaigns, Qurbani, and winter clothing.\r\n \r\n<a> Browse Projects </a>\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n Endowment Projects\r\n An investment for the hereafter—mosques, wells, and charitable endowments.\r\n<a> Browse Projects </a>\r\n \r\n \r\n \r\n \r\n","animate_delay":"0"},"editing":false,"element_name":"gva_text_noeditor"}],"editing":false,"element_name":"gva_column"}],"editing":false,"element_name":"gva_row"},{"settings":{"element":"gva_row","bg_particles":"off","bg_position":"center top","bg_repeat":"no-repeat","bg_attachment":"scroll","bg_size":"cover","style_space":"remove_margin remove_padding remove_padding_col","layout":"container-fw","class":"partner"},"columns":[{"settings":{"element":"gva_column"},"col_lg":12,"elements":[{"settings":{"content":"\r\n \r\n \r\n\r\n \r\n \r\n Our Achievements in Numbers\r\n Your trust makes the difference\r\n \r\n \r\n\r\n \r\n \r\n 0\r\n Beneficiaries worldwide\r\n \r\n \r\n \r\n 0\r\n Projects implemented\r\n \r\n \r\n \r\n 0\r\n Countries we operate in\r\n \r\n \r\n \r\n 0\r\n Volunteers\r\n \r\n \r\n \r\n \r\n\r\n\r\n// Enhanced counter animation for facts section\r\nfunction animateFactsCounters() {\r\n const statNumbers = document.querySelectorAll('.facts-section__stat-number');\r\n \r\n const observer = new IntersectionObserver((entries) => {\r\n entries.forEach(entry => {\r\n if (entry.isIntersecting) {\r\n const counter = entry.target;\r\n const target = parseInt(counter.getAttribute('data-target'));\r\n const duration = 2000;\r\n const increment = target / (duration / 16);\r\n \r\n let current = 0;\r\n const updateCounter = () => {\r\n current += increment;\r\n if (current < target) {\r\n // Format number with K for thousands\r\n let displayNum = Math.ceil(current);\r\n if (displayNum >= 1000) {\r\n counter.textContent = (displayNum / 1000).toFixed(1).replace('.0', '') + 'K';\r\n } else {\r\n counter.textContent = displayNum.toLocaleString();\r\n }\r\n requestAnimationFrame(updateCounter);\r\n } else {\r\n // Final formatting\r\n if (target >= 1000) {\r\n counter.textContent = (target / 1000).toFixed(1).replace('.0', '') + 'K';\r\n counter.classList.add('formatted');\r\n } else {\r\n counter.textContent = target.toLocaleString();\r\n }\r\n counter.classList.add('animated');\r\n setTimeout(() => counter.classList.remove('animated'), 600);\r\n }\r\n };\r\n updateCounter();\r\n observer.unobserve(counter);\r\n }\r\n });\r\n }, { threshold: 0.5, rootMargin: '0px 0px -50px 0px' });\r\n \r\n statNumbers.forEach(counter => observer.observe(counter));\r\n}\r\n\r\n// Call this function when DOM is loaded\r\ndocument.addEventListener('DOMContentLoaded', () => {\r\n animateFactsCounters();\r\n});","animate_delay":"0"},"editing":false,"element_name":"gva_text_noeditor"}],"editing":false,"element_name":"gva_column"}],"editing":false,"element_name":"gva_row"},{"settings":{"element":"gva_row","bg_particles":"off","bg_position":"center top","bg_repeat":"no-repeat","bg_attachment":"scroll","bg_size":"cover","style_space":"remove_margin remove_padding remove_padding_col","layout":"container-fw","class":"zakatcalc"},"columns":[{"settings":{"element":"gva_column"},"col_lg":12,"elements":[{"settings":{"content":"\r\n\r\n \r\n \r\n \r\n \r\nSmart Zakat Calculator\r\n A precise and comprehensive tool\r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n \r\n \r\n Money & Savings\r\n \r\n \r\n \r\n Cash (on hand or at home)\r\n \r\n \r\n $\r\n \r\n \r\n \r\n Bank balances\r\n \r\n \r\n $\r\n \r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n Gold & Silver\r\n \r\n \r\n Refresh Prices\r\n \r\n \r\n \r\n \r\n \r\n Gold weight (grams)\r\n \r\n \r\n \r\n \r\n Current gold price per gram\r\n \r\n Live\r\n \r\n \r\n \r\n \r\n $ / gram\r\n \r\n \r\n \r\n\r\n \r\n \r\n Silver weight (grams)\r\n \r\n \r\n \r\n \r\n Current silver price per gram\r\n \r\n Live\r\n \r\n \r\n \r\n \r\n $ / gram\r\n \r\n \r\n \r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n Zakat Summary\r\n \r\n \r\n Total assets:\r\n 0.00 $\r\n \r\n \r\n Net zakatable assets:\r\n 0.00 $\r\n \r\n \r\n Nisab value (85g gold):\r\n ...\r\n \r\n \r\n Enter data to check eligibility\r\n \r\n \r\n \r\n\r\n \r\n \r\n Zakat due (2.5%)\r\n 0.00 $\r\n \r\n \r\n <a>\r\n \r\n Contact via WhatsApp for consultation and donation\r\n </a>\r\n \r\n \r\n \r\n \r\n\r\n\r\n// Zakat Calculator Logic\r\nlet zakatcalculatorPricesLoaded = false;\r\n\r\n// Initialize calculator when DOM is loaded\r\ndocument.addEventListener('DOMContentLoaded', () => {\r\n zakatcalculatorFetchPrices();\r\n zakatcalculatorCalculate();\r\n \r\n // Add input event listeners for real-time calculation\r\n const inputs = document.querySelectorAll('.zakatcalculator-section__input');\r\n inputs.forEach(input => {\r\n input.addEventListener('input', zakatcalculatorCalculate);\r\n });\r\n \r\n // Format numbers as user types\r\n inputs.forEach(input => {\r\n input.addEventListener('blur', function() {\r\n if (this.value) {\r\n const value = parseFloat(this.value);\r\n if (!isNaN(value)) {\r\n this.value = value.toLocaleString('en-US', {\r\n minimumFractionDigits: 2,\r\n maximumFractionDigits: 2\r\n });\r\n }\r\n }\r\n });\r\n \r\n input.addEventListener('focus', function() {\r\n if (this.value) {\r\n this.value = this.value.replace(/[^\\d.]/g, '');\r\n }\r\n });\r\n });\r\n});\r\n\r\n// Fetch metal prices\r\nasync function zakatcalculatorFetchPrices() {\r\n const goldInput = document.getElementById('goldPrice');\r\n const silverInput = document.getElementById('silverPrice');\r\n const refreshButton = document.querySelector('.zakatcalculator-section__refresh-button');\r\n const refreshIcon = document.querySelector('.zakatcalculator-section__refresh-icon');\r\n \r\n if (!refreshButton || !refreshIcon) return;\r\n \r\n // Show loading state\r\n refreshButton.disabled = true;\r\n refreshIcon.classList.add('zakatcalculator-section__refresh-icon--spinning');\r\n goldInput.classList.add('zakatcalculator-section__input--loading');\r\n silverInput.classList.add('zakatcalculator-section__input--loading');\r\n \r\n try {\r\n // Simulate API call with delay\r\n await new Promise(resolve => setTimeout(resolve, 1500));\r\n \r\n // Mock data (in a real app, you would fetch from an API)\r\n const liveGoldPrice = 76.50;\r\n const liveSilverPrice = 0.95;\r\n \r\n // Update inputs\r\n goldInput.value = liveGoldPrice.toFixed(2);\r\n silverInput.value = liveSilverPrice.toFixed(2);\r\n \r\n // Remove loading state\r\n goldInput.classList.remove('zakatcalculator-section__input--loading');\r\n silverInput.classList.remove('zakatcalculator-section__input--loading');\r\n goldInput.classList.add('zakatcalculator-section__input--valid');\r\n silverInput.classList.add('zakatcalculator-section__input--valid');\r\n \r\n zakatcalculatorPricesLoaded = true;\r\n \r\n // Show success feedback\r\n refreshButton.innerHTML = ' Updated';\r\n refreshButton.style.backgroundColor = '#617f67';\r\n refreshButton.style.color = 'white';\r\n \r\n setTimeout(() => {\r\n refreshButton.innerHTML = ' Refresh Prices';\r\n refreshButton.style.backgroundColor = '';\r\n refreshButton.style.color = '';\r\n }, 2000);\r\n \r\n } catch (error) {\r\n console.error(\"Failed to fetch prices\", error);\r\n \r\n // Fallback values\r\n goldInput.value = 75.00;\r\n silverInput.value = 0.90;\r\n \r\n // Show error state\r\n goldInput.classList.remove('zakatcalculator-section__input--loading');\r\n silverInput.classList.remove('zakatcalculator-section__input--loading');\r\n goldInput.classList.add('zakatcalculator-section__input--invalid');\r\n silverInput.classList.add('zakatcalculator-section__input--invalid');\r\n \r\n refreshButton.innerHTML = ' Update Failed';\r\n refreshButton.style.backgroundColor = '#dc2626';\r\n refreshButton.style.color = 'white';\r\n \r\n setTimeout(() => {\r\n refreshButton.innerHTML = ' Refresh Prices';\r\n refreshButton.style.backgroundColor = '';\r\n refreshButton.style.color = '';\r\n }, 2000);\r\n \r\n } finally {\r\n refreshButton.disabled = false;\r\n refreshIcon.classList.remove('zakatcalculator-section__refresh-icon--spinning');\r\n \r\n // Recalculate zakat\r\n zakatcalculatorCalculate();\r\n }\r\n}\r\n\r\n// Calculate zakat\r\nfunction zakatcalculatorCalculate() {\r\n const cashHand = parseFloat(document.getElementById('cashHand').value) || 0;\r\n const cashBank = parseFloat(document.getElementById('cashBank').value) || 0;\r\n const goldWeight = parseFloat(document.getElementById('goldWeight').value) || 0;\r\n const goldPrice = parseFloat(document.getElementById('goldPrice').value) || 0;\r\n const silverWeight = parseFloat(document.getElementById('silverWeight').value) || 0;\r\n const silverPrice = parseFloat(document.getElementById('silverPrice').value) || 0;\r\n \r\n // Calculate totals\r\n const totalAssets = cashHand + cashBank + (goldWeight * goldPrice) + (silverWeight * silverPrice);\r\n const nisabThreshold = 85 * goldPrice;\r\n \r\n // Update display\r\n document.getElementById('totalAssetsDisplay').textContent = \r\n formatCurrency(totalAssets);\r\n \r\n document.getElementById('netAssetsDisplay').textContent = \r\n formatCurrency(totalAssets);\r\n \r\n if (goldPrice > 0) {\r\n document.getElementById('nisabValueDisplay').textContent = \r\n formatCurrency(nisabThreshold);\r\n } else {\r\n document.getElementById('nisabValueDisplay').textContent = '...';\r\n }\r\n \r\n // Update status and final zakat\r\n const statusBadge = document.getElementById('statusBadge');\r\n const finalDisplay = document.getElementById('finalZakatDisplay');\r\n const payButton = document.querySelector('.zakatcalculator-section__pay-button');\r\n \r\n if (totalAssets >= nisabThreshold && goldPrice > 0 && zakatcalculatorPricesLoaded) {\r\n const zakatAmount = totalAssets * 0.025;\r\n finalDisplay.textContent = formatCurrency(zakatAmount);\r\n \r\n // Update status badge\r\n statusBadge.textContent = '✓ Zakat is due (Nisab reached)';\r\n statusBadge.className = 'zakatcalculator-section__status zakatcalculator-section__status--eligible';\r\n \r\n // Enable pay button\r\n payButton.disabled = false;\r\n payButton.innerHTML = ' Pay Zakat Now';\r\n \r\n } else {\r\n finalDisplay.textContent = '0.00 $';\r\n \r\n // Update status badge\r\n if (!zakatcalculatorPricesLoaded) {\r\n statusBadge.textContent = 'Enter data to check eligibility';\r\n statusBadge.className = 'zakatcalculator-section__status zakatcalculator-section__status--not-eligible';\r\n } else if (totalAssets < nisabThreshold) {\r\n statusBadge.textContent = 'Zakat is not due (Nisab not reached)';\r\n statusBadge.className = 'zakatcalculator-section__status zakatcalculator-section__status--not-eligible';\r\n } else {\r\n statusBadge.textContent = 'Enter data to check eligibility';\r\n statusBadge.className = 'zakatcalculator-section__status zakatcalculator-section__status--not-eligible';\r\n }\r\n \r\n // Disable pay button\r\n payButton.disabled = true;\r\n payButton.innerHTML = ' Pay Zakat Now';\r\n }\r\n}\r\n\r\n// Format currency\r\nfunction formatCurrency(amount) {\r\n return new Intl.NumberFormat('en-US', {\r\n style: 'currency',\r\n currency: 'USD',\r\n minimumFractionDigits: 2,\r\n maximumFractionDigits: 2\r\n }).format(amount);\r\n}\r\n\r\n// Add zakat to cart\r\nfunction zakatcalculatorAddToCart() {\r\n const amountText = document.getElementById('finalZakatDisplay').textContent;\r\n const amount = parseFloat(amountText.replace(/[^0-9.-]+/g, \"\"));\r\n \r\n if (amount > 0 && !isNaN(amount)) {\r\n // Use your existing addToCart function\r\n if (typeof addToCart === 'function') {\r\n addToCart('Calculated Zakat', amount, 'Zakat');\r\n } else {\r\n // Fallback if addToCart is not defined\r\n alert(`Calculated Zakat amount: ${amountText}`);\r\n }\r\n } else {\r\n alert(\"Invalid zakat amount. Please check your inputs.\");\r\n }\r\n}\r\n\r\n// Input validation\r\nfunction validateZakatInput(input) {\r\n const value = parseFloat(input.value);\r\n const min = parseFloat(input.getAttribute('min')) || 0;\r\n \r\n if (isNaN(value) || value < min) {\r\n input.classList.add('zakatcalculator-section__input--invalid');\r\n return false;\r\n } else {\r\n input.classList.remove('zakatcalculator-section__input--invalid');\r\n input.classList.add('zakatcalculator-section__input--valid');\r\n return true;\r\n }\r\n}","animate_delay":"0"},"editing":false,"element_name":"gva_text_noeditor"}],"editing":false,"element_name":"gva_column"}],"editing":false,"element_name":"gva_row"},{"settings":{"element":"gva_row","bg_particles":"off","bg_position":"center top","bg_repeat":"no-repeat","bg_attachment":"scroll","bg_size":"cover","style_space":"remove_margin remove_padding remove_padding_col","layout":"container-fw","class":"partner","margin_top":"30","margin_bottom":"30"},"columns":[{"settings":{"element":"gva_column"},"col_lg":12,"elements":[{"settings":{"content":"\r\n \r\n Strategic Partnerships\r\n Our partners in creating hope\r\n \r\n \r\n ","animate_delay":"0"},"editing":false,"element_name":"gva_text_noeditor"},{"settings":{"title_admin":"Partners: Partners Block - en","block_drupal":"views_block__partners_block_2","hidden_title":"on","align_title":"title-align-right","remove_margin":"on","style_text":"text-dark","animate_delay":"0"},"editing":false,"element_name":"gva_drupal_block"}],"editing":false,"element_name":"gva_column"}],"editing":false,"element_name":"gva_row"}]') (Line: 47)
Drupal\gavias_content_builder\Plugin\Field\FieldFormatter\GaviasContentBuilderFormatter->viewElements(Object, 'en') (Line: 89)
Drupal\Core\Field\FormatterBase->view(Object, 'en') (Line: 263)
Drupal\Core\Entity\Entity\EntityViewDisplay->buildMultiple(Array) (Line: 351)
Drupal\Core\Entity\EntityViewBuilder->buildComponents(Array, Array, Array, 'full') (Line: 24)
Drupal\node\NodeViewBuilder->buildComponents(Array, Array, Array, 'full') (Line: 293)
Drupal\Core\Entity\EntityViewBuilder->buildMultiple(Array) (Line: 250)
Drupal\Core\Entity\EntityViewBuilder->build(Array)
call_user_func_array(Array, Array) (Line: 100)
Drupal\Core\Render\Renderer->doTrustedCallback(Array, Array, 'Render #pre_render callbacks must be methods of a class that implements \Drupal\Core\Security\TrustedCallbackInterface or be an anonymous function. The callback was %s. Support for this callback implementation is deprecated in 8.8.0 and will be removed in Drupal 9.0.0. See https://www.drupal.org/node/2966725', 'silenced_deprecation', 'Drupal\Core\Render\Element\RenderCallbackInterface') (Line: 781)
Drupal\Core\Render\Renderer->doCallback('#pre_render', Array, Array) (Line: 372)
Drupal\Core\Render\Renderer->doRender(Array, ) (Line: 200)
Drupal\Core\Render\Renderer->render(Array, ) (Line: 226)
Drupal\Core\Render\MainContent\HtmlRenderer->Drupal\Core\Render\MainContent\{closure}() (Line: 573)
Drupal\Core\Render\Renderer->executeInRenderContext(Object, Object) (Line: 227)
Drupal\Core\Render\MainContent\HtmlRenderer->prepare(Array, Object, Object) (Line: 117)
Drupal\Core\Render\MainContent\HtmlRenderer->renderResponse(Array, Object, Object) (Line: 90)
Drupal\Core\EventSubscriber\MainContentViewSubscriber->onViewRenderArray(Object, 'kernel.view', Object)
call_user_func(Array, Object, 'kernel.view', Object) (Line: 111)
Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher->dispatch('kernel.view', Object) (Line: 156)
Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object, 1) (Line: 68)
Symfony\Component\HttpKernel\HttpKernel->handle(Object, 1, 1) (Line: 57)
Drupal\Core\StackMiddleware\Session->handle(Object, 1, 1) (Line: 47)
Drupal\Core\StackMiddleware\KernelPreHandle->handle(Object, 1, 1) (Line: 191)
Drupal\page_cache\StackMiddleware\PageCache->fetch(Object, 1, 1) (Line: 128)
Drupal\page_cache\StackMiddleware\PageCache->lookup(Object, 1, 1) (Line: 82)
Drupal\page_cache\StackMiddleware\PageCache->handle(Object, 1, 1) (Line: 47)
Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle(Object, 1, 1) (Line: 52)
Drupal\Core\StackMiddleware\NegotiationMiddleware->handle(Object, 1, 1) (Line: 23)
Stack\StackedHttpKernel->handle(Object, 1, 1) (Line: 708)
Drupal\Core\DrupalKernel->handle(Object) (Line: 19)
- Deprecated function: implode(): Passing glue string after array is deprecated. Swap the parameters in element_gva_column->render_content() (line 463 of themes/gavias_kunco/gva_content_builder/gva_column.php).
element_gva_column->render_content(Array, '
Our Achievements in Numbers
Your trust makes the difference
0
Beneficiaries worldwide
0
Projects implemented
0
Countries we operate in
0
Volunteers
// Enhanced counter animation for facts section
function animateFactsCounters() {
const statNumbers = document.querySelectorAll('.facts-section__stat-number');
const observer = new IntersectionObserver((entries) => {
entries.forEach(entry => {
if (entry.isIntersecting) {
const counter = entry.target;
const target = parseInt(counter.getAttribute('data-target'));
const duration = 2000;
const increment = target / (duration / 16);
let current = 0;
const updateCounter = () => {
current += increment;
if (current < target) {
// Format number with K for thousands
let displayNum = Math.ceil(current);
if (displayNum >= 1000) {
counter.textContent = (displayNum / 1000).toFixed(1).replace('.0', '') + 'K';
} else {
counter.textContent = displayNum.toLocaleString();
}
requestAnimationFrame(updateCounter);
} else {
// Final formatting
if (target >= 1000) {
counter.textContent = (target / 1000).toFixed(1).replace('.0', '') + 'K';
counter.classList.add('formatted');
} else {
counter.textContent = target.toLocaleString();
}
counter.classList.add('animated');
setTimeout(() => counter.classList.remove('animated'), 600);
}
};
updateCounter();
observer.unobserve(counter);
}
});
}, { threshold: 0.5, rootMargin: '0px 0px -50px 0px' });
statNumbers.forEach(counter => observer.observe(counter));
}
// Call this function when DOM is loaded
document.addEventListener('DOMContentLoaded', () => {
animateFactsCounters();
});') (Line: 110)
gavias_content_builder_render_element('gva_column', Array, '
Our Achievements in Numbers
Your trust makes the difference
0
Beneficiaries worldwide
0
Projects implemented
0
Countries we operate in
0
Volunteers
// Enhanced counter animation for facts section
function animateFactsCounters() {
const statNumbers = document.querySelectorAll('.facts-section__stat-number');
const observer = new IntersectionObserver((entries) => {
entries.forEach(entry => {
if (entry.isIntersecting) {
const counter = entry.target;
const target = parseInt(counter.getAttribute('data-target'));
const duration = 2000;
const increment = target / (duration / 16);
let current = 0;
const updateCounter = () => {
current += increment;
if (current < target) {
// Format number with K for thousands
let displayNum = Math.ceil(current);
if (displayNum >= 1000) {
counter.textContent = (displayNum / 1000).toFixed(1).replace('.0', '') + 'K';
} else {
counter.textContent = displayNum.toLocaleString();
}
requestAnimationFrame(updateCounter);
} else {
// Final formatting
if (target >= 1000) {
counter.textContent = (target / 1000).toFixed(1).replace('.0', '') + 'K';
counter.classList.add('formatted');
} else {
counter.textContent = target.toLocaleString();
}
counter.classList.add('animated');
setTimeout(() => counter.classList.remove('animated'), 600);
}
};
updateCounter();
observer.unobserve(counter);
}
});
}, { threshold: 0.5, rootMargin: '0px 0px -50px 0px' });
statNumbers.forEach(counter => observer.observe(counter));
}
// Call this function when DOM is loaded
document.addEventListener('DOMContentLoaded', () => {
animateFactsCounters();
});') (Line: 58)
gavias_content_builder_render_el(Array) (Line: 22)
gavias_content_builder_frontend('[{"settings":{"bg_particles":"off","bg_position":"center top","bg_repeat":"no-repeat","bg_attachment":"scroll","bg_size":"cover","style_space":"remove_padding","layout":"container-fw"},"columns":[{"settings":{"element":"gva_column","bg_position":"center top","bg_repeat":"no-repeat","bg_attachment":"scroll","bg_size":"cover","el_class":"front"},"col_lg":12,"elements":[{"settings":{"content":"\r\n \r\n \r\n \r\n \r\n Urgent Appeal\r\n \r\n Be a helping hand for them in\r\n times of crisis\r\n \r\n \r\n At \"Wejdan Charity\", we work with full transparency to deliver your donations to those in need in conflict and poverty-stricken areas.\r\n \r\n \r\n <a>\r\n Charity Donations \r\n </a>\r\n <a>\r\n Our Projects \r\n </a>\r\n \r\n \r\n \r\n \r\n","animate_delay":"0"},"editing":false,"element_name":"gva_text_noeditor"}],"editing":false,"element_name":"gva_column"}],"editing":false,"element_name":"gva_row"},{"settings":{"element":"gva_row","bg_particles":"off","bg_position":"center top","bg_repeat":"no-repeat","bg_attachment":"scroll","bg_size":"cover","style_space":"remove_padding","layout":"container","class":"before-help-region"},"columns":[{"settings":{"element":"gva_column"},"col_lg":12,"elements":[{"settings":{"title":"Take action for animals now","link":"#","button_title":"Donation Now","button_align":"button-right-v2","style_text":"text-light","style_button":"btn-theme","donorbox":"off","target":"off","el_class":"margin","animate":"fade-up","animate_delay":"0"},"editing":false,"element_name":"gva_call_to_action"}],"editing":false,"element_name":"gva_column"}],"editing":false,"element_name":"gva_row"},{"settings":{"element":"gva_row","bg_particles":"off","bg_position":"center top","bg_repeat":"no-repeat","bg_attachment":"scroll","bg_size":"cover","style_space":"remove_padding","layout":"container-fw","bg_color":"#f9fafb"},"columns":[{"settings":{"element":"gva_column","bg_position":"center top","bg_repeat":"no-repeat","bg_attachment":"scroll","bg_size":"cover","el_class":"about"},"col_lg":12,"elements":[{"settings":{"content":"\r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n \r\n \r\n Who We Are\r\n \r\n \r\n We plant hope.. \r\n and build people and the future\r\n \r\n \r\n Wejdan Charity is a leading humanitarian organization, founded with an ambitious vision to be a bridge of الخير between donors and those in need.\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n Development Stages\r\n A continuous journey of growth\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n Areas of Work\r\n We reach where the need is\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \"We work with passion to bring smiles\"\r\n \r\n \r\n \r\n \r\n \r\n","animate_delay":"0"},"editing":false,"element_name":"gva_text_noeditor"}],"editing":false,"element_name":"gva_column"}],"editing":false,"element_name":"gva_row"},{"settings":{"element":"gva_row","bg_particles":"off","bg_position":"center top","bg_repeat":"no-repeat","bg_attachment":"scroll","bg_size":"cover","style_space":"remove_margin remove_padding remove_padding_col","layout":"container-fw","class":"partner","margin_top":"30","margin_bottom":"30"},"columns":[{"settings":{"element":"gva_column"},"col_lg":12,"elements":[{"settings":{"content":"\r\n\r\n \r\n \r\n Initiatives & Programs\r\n Our Areas of Work\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n Ongoing Charity\r\n Water wells, mosque construction\r\n \r\n \r\n \r\n \r\n \r\n \r\n Student Sponsorship\r\n Building the future through education\r\n \r\n \r\n \r\n \r\n \r\n \r\n Humanitarian Cases\r\n Patient treatment, surgeries\r\n \r\n \r\n \r\n \r\n \r\n \r\n Development Projects\r\n Empowering productive families\r\n \r\n \r\n<a>Learn more about our programs and initiatives</a>\r\n \r\n","animate_delay":"0"},"editing":false,"element_name":"gva_text_noeditor"}],"editing":false,"element_name":"gva_column"}],"editing":false,"element_name":"gva_row"},{"settings":{"element":"gva_row","bg_particles":"off","bg_position":"center top","bg_repeat":"no-repeat","bg_attachment":"scroll","bg_size":"cover","style_space":"remove_margin remove_padding remove_padding_col","layout":"container","class":"newsfront"},"columns":[{"settings":{"element":"gva_column"},"col_lg":12,"elements":[{"settings":{"content":"\r\n \r\n \r\n Our News\r\n \r\n \r\n \r\nNews that tells the story of giving \r\n \r\n","animate_delay":"0"},"editing":false,"element_name":"gva_text_noeditor"},{"settings":{"title_admin":"news: news Block -en","block_drupal":"views_block__news_block_3","hidden_title":"on","align_title":"title-align-left","remove_margin":"on","style_text":"text-dark","animate_delay":"0"},"editing":false,"element_name":"gva_drupal_block"}],"editing":false,"element_name":"gva_column"}],"editing":false,"element_name":"gva_row"},{"settings":{"bg_particles":"off","bg_position":"center top","bg_repeat":"no-repeat","bg_attachment":"scroll","bg_size":"cover","style_space":"remove_padding","layout":"container-fw","element":"gva_row","class":"sliderfrontpage"},"columns":[{"settings":{"element":"gva_column","bg_position":"center top","bg_repeat":"no-repeat","bg_attachment":"scroll","bg_size":"cover"},"col_lg":12,"elements":[{"settings":{"title_admin":"news: campigns-en","block_drupal":"views_block__news_block_5","hidden_title":"on","align_title":"title-align-right","remove_margin":"on","style_text":"text-dark","animate_delay":"0"},"editing":false,"element_name":"gva_drupal_block"}],"editing":false,"element_name":"gva_column"}],"editing":false,"element_name":"gva_row"},{"settings":{"element":"gva_row","bg_particles":"off","bg_position":"center top","bg_repeat":"no-repeat","bg_attachment":"scroll","bg_size":"cover","style_space":"remove_margin remove_padding remove_padding_col","layout":"container-fw","class":"partner"},"columns":[{"settings":{"element":"gva_column"},"col_lg":12,"elements":[{"settings":{"content":"\r\n \r\n \r\n \r\n Our Distinguished Projects\r\n \r\n \r\n \r\n At Wejdan Charity, we strive to provide support and assistance to communities in need who are affected by disasters, crises, and wars, with the aim of improving quality of life and promoting sustainable development. Our projects span across several areas:\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n Relief Projects\r\n Emergency response to disasters and wars, providing food and medicine.\r\n \r\n<a> Browse Projects </a>\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n Development Projects\r\n Empowering communities and building capacities.\r\n \r\n<a> Browse Projects </a>\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n Seasonal Projects\r\n Ramadan campaigns, Qurbani, and winter clothing.\r\n \r\n<a> Browse Projects </a>\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n Endowment Projects\r\n An investment for the hereafter—mosques, wells, and charitable endowments.\r\n<a> Browse Projects </a>\r\n \r\n \r\n \r\n \r\n","animate_delay":"0"},"editing":false,"element_name":"gva_text_noeditor"}],"editing":false,"element_name":"gva_column"}],"editing":false,"element_name":"gva_row"},{"settings":{"element":"gva_row","bg_particles":"off","bg_position":"center top","bg_repeat":"no-repeat","bg_attachment":"scroll","bg_size":"cover","style_space":"remove_margin remove_padding remove_padding_col","layout":"container-fw","class":"partner"},"columns":[{"settings":{"element":"gva_column"},"col_lg":12,"elements":[{"settings":{"content":"\r\n \r\n \r\n\r\n \r\n \r\n Our Achievements in Numbers\r\n Your trust makes the difference\r\n \r\n \r\n\r\n \r\n \r\n 0\r\n Beneficiaries worldwide\r\n \r\n \r\n \r\n 0\r\n Projects implemented\r\n \r\n \r\n \r\n 0\r\n Countries we operate in\r\n \r\n \r\n \r\n 0\r\n Volunteers\r\n \r\n \r\n \r\n \r\n\r\n\r\n// Enhanced counter animation for facts section\r\nfunction animateFactsCounters() {\r\n const statNumbers = document.querySelectorAll('.facts-section__stat-number');\r\n \r\n const observer = new IntersectionObserver((entries) => {\r\n entries.forEach(entry => {\r\n if (entry.isIntersecting) {\r\n const counter = entry.target;\r\n const target = parseInt(counter.getAttribute('data-target'));\r\n const duration = 2000;\r\n const increment = target / (duration / 16);\r\n \r\n let current = 0;\r\n const updateCounter = () => {\r\n current += increment;\r\n if (current < target) {\r\n // Format number with K for thousands\r\n let displayNum = Math.ceil(current);\r\n if (displayNum >= 1000) {\r\n counter.textContent = (displayNum / 1000).toFixed(1).replace('.0', '') + 'K';\r\n } else {\r\n counter.textContent = displayNum.toLocaleString();\r\n }\r\n requestAnimationFrame(updateCounter);\r\n } else {\r\n // Final formatting\r\n if (target >= 1000) {\r\n counter.textContent = (target / 1000).toFixed(1).replace('.0', '') + 'K';\r\n counter.classList.add('formatted');\r\n } else {\r\n counter.textContent = target.toLocaleString();\r\n }\r\n counter.classList.add('animated');\r\n setTimeout(() => counter.classList.remove('animated'), 600);\r\n }\r\n };\r\n updateCounter();\r\n observer.unobserve(counter);\r\n }\r\n });\r\n }, { threshold: 0.5, rootMargin: '0px 0px -50px 0px' });\r\n \r\n statNumbers.forEach(counter => observer.observe(counter));\r\n}\r\n\r\n// Call this function when DOM is loaded\r\ndocument.addEventListener('DOMContentLoaded', () => {\r\n animateFactsCounters();\r\n});","animate_delay":"0"},"editing":false,"element_name":"gva_text_noeditor"}],"editing":false,"element_name":"gva_column"}],"editing":false,"element_name":"gva_row"},{"settings":{"element":"gva_row","bg_particles":"off","bg_position":"center top","bg_repeat":"no-repeat","bg_attachment":"scroll","bg_size":"cover","style_space":"remove_margin remove_padding remove_padding_col","layout":"container-fw","class":"zakatcalc"},"columns":[{"settings":{"element":"gva_column"},"col_lg":12,"elements":[{"settings":{"content":"\r\n\r\n \r\n \r\n \r\n \r\nSmart Zakat Calculator\r\n A precise and comprehensive tool\r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n \r\n \r\n Money & Savings\r\n \r\n \r\n \r\n Cash (on hand or at home)\r\n \r\n \r\n $\r\n \r\n \r\n \r\n Bank balances\r\n \r\n \r\n $\r\n \r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n Gold & Silver\r\n \r\n \r\n Refresh Prices\r\n \r\n \r\n \r\n \r\n \r\n Gold weight (grams)\r\n \r\n \r\n \r\n \r\n Current gold price per gram\r\n \r\n Live\r\n \r\n \r\n \r\n \r\n $ / gram\r\n \r\n \r\n \r\n\r\n \r\n \r\n Silver weight (grams)\r\n \r\n \r\n \r\n \r\n Current silver price per gram\r\n \r\n Live\r\n \r\n \r\n \r\n \r\n $ / gram\r\n \r\n \r\n \r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n Zakat Summary\r\n \r\n \r\n Total assets:\r\n 0.00 $\r\n \r\n \r\n Net zakatable assets:\r\n 0.00 $\r\n \r\n \r\n Nisab value (85g gold):\r\n ...\r\n \r\n \r\n Enter data to check eligibility\r\n \r\n \r\n \r\n\r\n \r\n \r\n Zakat due (2.5%)\r\n 0.00 $\r\n \r\n \r\n <a>\r\n \r\n Contact via WhatsApp for consultation and donation\r\n </a>\r\n \r\n \r\n \r\n \r\n\r\n\r\n// Zakat Calculator Logic\r\nlet zakatcalculatorPricesLoaded = false;\r\n\r\n// Initialize calculator when DOM is loaded\r\ndocument.addEventListener('DOMContentLoaded', () => {\r\n zakatcalculatorFetchPrices();\r\n zakatcalculatorCalculate();\r\n \r\n // Add input event listeners for real-time calculation\r\n const inputs = document.querySelectorAll('.zakatcalculator-section__input');\r\n inputs.forEach(input => {\r\n input.addEventListener('input', zakatcalculatorCalculate);\r\n });\r\n \r\n // Format numbers as user types\r\n inputs.forEach(input => {\r\n input.addEventListener('blur', function() {\r\n if (this.value) {\r\n const value = parseFloat(this.value);\r\n if (!isNaN(value)) {\r\n this.value = value.toLocaleString('en-US', {\r\n minimumFractionDigits: 2,\r\n maximumFractionDigits: 2\r\n });\r\n }\r\n }\r\n });\r\n \r\n input.addEventListener('focus', function() {\r\n if (this.value) {\r\n this.value = this.value.replace(/[^\\d.]/g, '');\r\n }\r\n });\r\n });\r\n});\r\n\r\n// Fetch metal prices\r\nasync function zakatcalculatorFetchPrices() {\r\n const goldInput = document.getElementById('goldPrice');\r\n const silverInput = document.getElementById('silverPrice');\r\n const refreshButton = document.querySelector('.zakatcalculator-section__refresh-button');\r\n const refreshIcon = document.querySelector('.zakatcalculator-section__refresh-icon');\r\n \r\n if (!refreshButton || !refreshIcon) return;\r\n \r\n // Show loading state\r\n refreshButton.disabled = true;\r\n refreshIcon.classList.add('zakatcalculator-section__refresh-icon--spinning');\r\n goldInput.classList.add('zakatcalculator-section__input--loading');\r\n silverInput.classList.add('zakatcalculator-section__input--loading');\r\n \r\n try {\r\n // Simulate API call with delay\r\n await new Promise(resolve => setTimeout(resolve, 1500));\r\n \r\n // Mock data (in a real app, you would fetch from an API)\r\n const liveGoldPrice = 76.50;\r\n const liveSilverPrice = 0.95;\r\n \r\n // Update inputs\r\n goldInput.value = liveGoldPrice.toFixed(2);\r\n silverInput.value = liveSilverPrice.toFixed(2);\r\n \r\n // Remove loading state\r\n goldInput.classList.remove('zakatcalculator-section__input--loading');\r\n silverInput.classList.remove('zakatcalculator-section__input--loading');\r\n goldInput.classList.add('zakatcalculator-section__input--valid');\r\n silverInput.classList.add('zakatcalculator-section__input--valid');\r\n \r\n zakatcalculatorPricesLoaded = true;\r\n \r\n // Show success feedback\r\n refreshButton.innerHTML = ' Updated';\r\n refreshButton.style.backgroundColor = '#617f67';\r\n refreshButton.style.color = 'white';\r\n \r\n setTimeout(() => {\r\n refreshButton.innerHTML = ' Refresh Prices';\r\n refreshButton.style.backgroundColor = '';\r\n refreshButton.style.color = '';\r\n }, 2000);\r\n \r\n } catch (error) {\r\n console.error(\"Failed to fetch prices\", error);\r\n \r\n // Fallback values\r\n goldInput.value = 75.00;\r\n silverInput.value = 0.90;\r\n \r\n // Show error state\r\n goldInput.classList.remove('zakatcalculator-section__input--loading');\r\n silverInput.classList.remove('zakatcalculator-section__input--loading');\r\n goldInput.classList.add('zakatcalculator-section__input--invalid');\r\n silverInput.classList.add('zakatcalculator-section__input--invalid');\r\n \r\n refreshButton.innerHTML = ' Update Failed';\r\n refreshButton.style.backgroundColor = '#dc2626';\r\n refreshButton.style.color = 'white';\r\n \r\n setTimeout(() => {\r\n refreshButton.innerHTML = ' Refresh Prices';\r\n refreshButton.style.backgroundColor = '';\r\n refreshButton.style.color = '';\r\n }, 2000);\r\n \r\n } finally {\r\n refreshButton.disabled = false;\r\n refreshIcon.classList.remove('zakatcalculator-section__refresh-icon--spinning');\r\n \r\n // Recalculate zakat\r\n zakatcalculatorCalculate();\r\n }\r\n}\r\n\r\n// Calculate zakat\r\nfunction zakatcalculatorCalculate() {\r\n const cashHand = parseFloat(document.getElementById('cashHand').value) || 0;\r\n const cashBank = parseFloat(document.getElementById('cashBank').value) || 0;\r\n const goldWeight = parseFloat(document.getElementById('goldWeight').value) || 0;\r\n const goldPrice = parseFloat(document.getElementById('goldPrice').value) || 0;\r\n const silverWeight = parseFloat(document.getElementById('silverWeight').value) || 0;\r\n const silverPrice = parseFloat(document.getElementById('silverPrice').value) || 0;\r\n \r\n // Calculate totals\r\n const totalAssets = cashHand + cashBank + (goldWeight * goldPrice) + (silverWeight * silverPrice);\r\n const nisabThreshold = 85 * goldPrice;\r\n \r\n // Update display\r\n document.getElementById('totalAssetsDisplay').textContent = \r\n formatCurrency(totalAssets);\r\n \r\n document.getElementById('netAssetsDisplay').textContent = \r\n formatCurrency(totalAssets);\r\n \r\n if (goldPrice > 0) {\r\n document.getElementById('nisabValueDisplay').textContent = \r\n formatCurrency(nisabThreshold);\r\n } else {\r\n document.getElementById('nisabValueDisplay').textContent = '...';\r\n }\r\n \r\n // Update status and final zakat\r\n const statusBadge = document.getElementById('statusBadge');\r\n const finalDisplay = document.getElementById('finalZakatDisplay');\r\n const payButton = document.querySelector('.zakatcalculator-section__pay-button');\r\n \r\n if (totalAssets >= nisabThreshold && goldPrice > 0 && zakatcalculatorPricesLoaded) {\r\n const zakatAmount = totalAssets * 0.025;\r\n finalDisplay.textContent = formatCurrency(zakatAmount);\r\n \r\n // Update status badge\r\n statusBadge.textContent = '✓ Zakat is due (Nisab reached)';\r\n statusBadge.className = 'zakatcalculator-section__status zakatcalculator-section__status--eligible';\r\n \r\n // Enable pay button\r\n payButton.disabled = false;\r\n payButton.innerHTML = ' Pay Zakat Now';\r\n \r\n } else {\r\n finalDisplay.textContent = '0.00 $';\r\n \r\n // Update status badge\r\n if (!zakatcalculatorPricesLoaded) {\r\n statusBadge.textContent = 'Enter data to check eligibility';\r\n statusBadge.className = 'zakatcalculator-section__status zakatcalculator-section__status--not-eligible';\r\n } else if (totalAssets < nisabThreshold) {\r\n statusBadge.textContent = 'Zakat is not due (Nisab not reached)';\r\n statusBadge.className = 'zakatcalculator-section__status zakatcalculator-section__status--not-eligible';\r\n } else {\r\n statusBadge.textContent = 'Enter data to check eligibility';\r\n statusBadge.className = 'zakatcalculator-section__status zakatcalculator-section__status--not-eligible';\r\n }\r\n \r\n // Disable pay button\r\n payButton.disabled = true;\r\n payButton.innerHTML = ' Pay Zakat Now';\r\n }\r\n}\r\n\r\n// Format currency\r\nfunction formatCurrency(amount) {\r\n return new Intl.NumberFormat('en-US', {\r\n style: 'currency',\r\n currency: 'USD',\r\n minimumFractionDigits: 2,\r\n maximumFractionDigits: 2\r\n }).format(amount);\r\n}\r\n\r\n// Add zakat to cart\r\nfunction zakatcalculatorAddToCart() {\r\n const amountText = document.getElementById('finalZakatDisplay').textContent;\r\n const amount = parseFloat(amountText.replace(/[^0-9.-]+/g, \"\"));\r\n \r\n if (amount > 0 && !isNaN(amount)) {\r\n // Use your existing addToCart function\r\n if (typeof addToCart === 'function') {\r\n addToCart('Calculated Zakat', amount, 'Zakat');\r\n } else {\r\n // Fallback if addToCart is not defined\r\n alert(`Calculated Zakat amount: ${amountText}`);\r\n }\r\n } else {\r\n alert(\"Invalid zakat amount. Please check your inputs.\");\r\n }\r\n}\r\n\r\n// Input validation\r\nfunction validateZakatInput(input) {\r\n const value = parseFloat(input.value);\r\n const min = parseFloat(input.getAttribute('min')) || 0;\r\n \r\n if (isNaN(value) || value < min) {\r\n input.classList.add('zakatcalculator-section__input--invalid');\r\n return false;\r\n } else {\r\n input.classList.remove('zakatcalculator-section__input--invalid');\r\n input.classList.add('zakatcalculator-section__input--valid');\r\n return true;\r\n }\r\n}","animate_delay":"0"},"editing":false,"element_name":"gva_text_noeditor"}],"editing":false,"element_name":"gva_column"}],"editing":false,"element_name":"gva_row"},{"settings":{"element":"gva_row","bg_particles":"off","bg_position":"center top","bg_repeat":"no-repeat","bg_attachment":"scroll","bg_size":"cover","style_space":"remove_margin remove_padding remove_padding_col","layout":"container-fw","class":"partner","margin_top":"30","margin_bottom":"30"},"columns":[{"settings":{"element":"gva_column"},"col_lg":12,"elements":[{"settings":{"content":"\r\n \r\n Strategic Partnerships\r\n Our partners in creating hope\r\n \r\n \r\n ","animate_delay":"0"},"editing":false,"element_name":"gva_text_noeditor"},{"settings":{"title_admin":"Partners: Partners Block - en","block_drupal":"views_block__partners_block_2","hidden_title":"on","align_title":"title-align-right","remove_margin":"on","style_text":"text-dark","animate_delay":"0"},"editing":false,"element_name":"gva_drupal_block"}],"editing":false,"element_name":"gva_column"}],"editing":false,"element_name":"gva_row"}]') (Line: 47)
Drupal\gavias_content_builder\Plugin\Field\FieldFormatter\GaviasContentBuilderFormatter->viewElements(Object, 'en') (Line: 89)
Drupal\Core\Field\FormatterBase->view(Object, 'en') (Line: 263)
Drupal\Core\Entity\Entity\EntityViewDisplay->buildMultiple(Array) (Line: 351)
Drupal\Core\Entity\EntityViewBuilder->buildComponents(Array, Array, Array, 'full') (Line: 24)
Drupal\node\NodeViewBuilder->buildComponents(Array, Array, Array, 'full') (Line: 293)
Drupal\Core\Entity\EntityViewBuilder->buildMultiple(Array) (Line: 250)
Drupal\Core\Entity\EntityViewBuilder->build(Array)
call_user_func_array(Array, Array) (Line: 100)
Drupal\Core\Render\Renderer->doTrustedCallback(Array, Array, 'Render #pre_render callbacks must be methods of a class that implements \Drupal\Core\Security\TrustedCallbackInterface or be an anonymous function. The callback was %s. Support for this callback implementation is deprecated in 8.8.0 and will be removed in Drupal 9.0.0. See https://www.drupal.org/node/2966725', 'silenced_deprecation', 'Drupal\Core\Render\Element\RenderCallbackInterface') (Line: 781)
Drupal\Core\Render\Renderer->doCallback('#pre_render', Array, Array) (Line: 372)
Drupal\Core\Render\Renderer->doRender(Array, ) (Line: 200)
Drupal\Core\Render\Renderer->render(Array, ) (Line: 226)
Drupal\Core\Render\MainContent\HtmlRenderer->Drupal\Core\Render\MainContent\{closure}() (Line: 573)
Drupal\Core\Render\Renderer->executeInRenderContext(Object, Object) (Line: 227)
Drupal\Core\Render\MainContent\HtmlRenderer->prepare(Array, Object, Object) (Line: 117)
Drupal\Core\Render\MainContent\HtmlRenderer->renderResponse(Array, Object, Object) (Line: 90)
Drupal\Core\EventSubscriber\MainContentViewSubscriber->onViewRenderArray(Object, 'kernel.view', Object)
call_user_func(Array, Object, 'kernel.view', Object) (Line: 111)
Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher->dispatch('kernel.view', Object) (Line: 156)
Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object, 1) (Line: 68)
Symfony\Component\HttpKernel\HttpKernel->handle(Object, 1, 1) (Line: 57)
Drupal\Core\StackMiddleware\Session->handle(Object, 1, 1) (Line: 47)
Drupal\Core\StackMiddleware\KernelPreHandle->handle(Object, 1, 1) (Line: 191)
Drupal\page_cache\StackMiddleware\PageCache->fetch(Object, 1, 1) (Line: 128)
Drupal\page_cache\StackMiddleware\PageCache->lookup(Object, 1, 1) (Line: 82)
Drupal\page_cache\StackMiddleware\PageCache->handle(Object, 1, 1) (Line: 47)
Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle(Object, 1, 1) (Line: 52)
Drupal\Core\StackMiddleware\NegotiationMiddleware->handle(Object, 1, 1) (Line: 23)
Stack\StackedHttpKernel->handle(Object, 1, 1) (Line: 708)
Drupal\Core\DrupalKernel->handle(Object) (Line: 19)
- Deprecated function: implode(): Passing glue string after array is deprecated. Swap the parameters in element_gva_row->render_content() (line 317 of themes/gavias_kunco/gva_content_builder/gva_row.php).
element_gva_row->render_content(Array, '
Our Achievements in Numbers
Your trust makes the difference
0
Beneficiaries worldwide
0
Projects implemented
0
Countries we operate in
0
Volunteers
// Enhanced counter animation for facts section
function animateFactsCounters() {
const statNumbers = document.querySelectorAll('.facts-section__stat-number');
const observer = new IntersectionObserver((entries) => {
entries.forEach(entry => {
if (entry.isIntersecting) {
const counter = entry.target;
const target = parseInt(counter.getAttribute('data-target'));
const duration = 2000;
const increment = target / (duration / 16);
let current = 0;
const updateCounter = () => {
current += increment;
if (current < target) {
// Format number with K for thousands
let displayNum = Math.ceil(current);
if (displayNum >= 1000) {
counter.textContent = (displayNum / 1000).toFixed(1).replace('.0', '') + 'K';
} else {
counter.textContent = displayNum.toLocaleString();
}
requestAnimationFrame(updateCounter);
} else {
// Final formatting
if (target >= 1000) {
counter.textContent = (target / 1000).toFixed(1).replace('.0', '') + 'K';
counter.classList.add('formatted');
} else {
counter.textContent = target.toLocaleString();
}
counter.classList.add('animated');
setTimeout(() => counter.classList.remove('animated'), 600);
}
};
updateCounter();
observer.unobserve(counter);
}
});
}, { threshold: 0.5, rootMargin: '0px 0px -50px 0px' });
statNumbers.forEach(counter => observer.observe(counter));
}
// Call this function when DOM is loaded
document.addEventListener('DOMContentLoaded', () => {
animateFactsCounters();
});
') (Line: 110)
gavias_content_builder_render_element('gva_row', Array, '
Our Achievements in Numbers
Your trust makes the difference
0
Beneficiaries worldwide
0
Projects implemented
0
Countries we operate in
0
Volunteers
// Enhanced counter animation for facts section
function animateFactsCounters() {
const statNumbers = document.querySelectorAll('.facts-section__stat-number');
const observer = new IntersectionObserver((entries) => {
entries.forEach(entry => {
if (entry.isIntersecting) {
const counter = entry.target;
const target = parseInt(counter.getAttribute('data-target'));
const duration = 2000;
const increment = target / (duration / 16);
let current = 0;
const updateCounter = () => {
current += increment;
if (current < target) {
// Format number with K for thousands
let displayNum = Math.ceil(current);
if (displayNum >= 1000) {
counter.textContent = (displayNum / 1000).toFixed(1).replace('.0', '') + 'K';
} else {
counter.textContent = displayNum.toLocaleString();
}
requestAnimationFrame(updateCounter);
} else {
// Final formatting
if (target >= 1000) {
counter.textContent = (target / 1000).toFixed(1).replace('.0', '') + 'K';
counter.classList.add('formatted');
} else {
counter.textContent = target.toLocaleString();
}
counter.classList.add('animated');
setTimeout(() => counter.classList.remove('animated'), 600);
}
};
updateCounter();
observer.unobserve(counter);
}
});
}, { threshold: 0.5, rootMargin: '0px 0px -50px 0px' });
statNumbers.forEach(counter => observer.observe(counter));
}
// Call this function when DOM is loaded
document.addEventListener('DOMContentLoaded', () => {
animateFactsCounters();
});
') (Line: 62)
gavias_content_builder_render_el(Array) (Line: 22)
gavias_content_builder_frontend('[{"settings":{"bg_particles":"off","bg_position":"center top","bg_repeat":"no-repeat","bg_attachment":"scroll","bg_size":"cover","style_space":"remove_padding","layout":"container-fw"},"columns":[{"settings":{"element":"gva_column","bg_position":"center top","bg_repeat":"no-repeat","bg_attachment":"scroll","bg_size":"cover","el_class":"front"},"col_lg":12,"elements":[{"settings":{"content":"\r\n \r\n \r\n \r\n \r\n Urgent Appeal\r\n \r\n Be a helping hand for them in\r\n times of crisis\r\n \r\n \r\n At \"Wejdan Charity\", we work with full transparency to deliver your donations to those in need in conflict and poverty-stricken areas.\r\n \r\n \r\n <a>\r\n Charity Donations \r\n </a>\r\n <a>\r\n Our Projects \r\n </a>\r\n \r\n \r\n \r\n \r\n","animate_delay":"0"},"editing":false,"element_name":"gva_text_noeditor"}],"editing":false,"element_name":"gva_column"}],"editing":false,"element_name":"gva_row"},{"settings":{"element":"gva_row","bg_particles":"off","bg_position":"center top","bg_repeat":"no-repeat","bg_attachment":"scroll","bg_size":"cover","style_space":"remove_padding","layout":"container","class":"before-help-region"},"columns":[{"settings":{"element":"gva_column"},"col_lg":12,"elements":[{"settings":{"title":"Take action for animals now","link":"#","button_title":"Donation Now","button_align":"button-right-v2","style_text":"text-light","style_button":"btn-theme","donorbox":"off","target":"off","el_class":"margin","animate":"fade-up","animate_delay":"0"},"editing":false,"element_name":"gva_call_to_action"}],"editing":false,"element_name":"gva_column"}],"editing":false,"element_name":"gva_row"},{"settings":{"element":"gva_row","bg_particles":"off","bg_position":"center top","bg_repeat":"no-repeat","bg_attachment":"scroll","bg_size":"cover","style_space":"remove_padding","layout":"container-fw","bg_color":"#f9fafb"},"columns":[{"settings":{"element":"gva_column","bg_position":"center top","bg_repeat":"no-repeat","bg_attachment":"scroll","bg_size":"cover","el_class":"about"},"col_lg":12,"elements":[{"settings":{"content":"\r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n \r\n \r\n Who We Are\r\n \r\n \r\n We plant hope.. \r\n and build people and the future\r\n \r\n \r\n Wejdan Charity is a leading humanitarian organization, founded with an ambitious vision to be a bridge of الخير between donors and those in need.\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n Development Stages\r\n A continuous journey of growth\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n Areas of Work\r\n We reach where the need is\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \"We work with passion to bring smiles\"\r\n \r\n \r\n \r\n \r\n \r\n","animate_delay":"0"},"editing":false,"element_name":"gva_text_noeditor"}],"editing":false,"element_name":"gva_column"}],"editing":false,"element_name":"gva_row"},{"settings":{"element":"gva_row","bg_particles":"off","bg_position":"center top","bg_repeat":"no-repeat","bg_attachment":"scroll","bg_size":"cover","style_space":"remove_margin remove_padding remove_padding_col","layout":"container-fw","class":"partner","margin_top":"30","margin_bottom":"30"},"columns":[{"settings":{"element":"gva_column"},"col_lg":12,"elements":[{"settings":{"content":"\r\n\r\n \r\n \r\n Initiatives & Programs\r\n Our Areas of Work\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n Ongoing Charity\r\n Water wells, mosque construction\r\n \r\n \r\n \r\n \r\n \r\n \r\n Student Sponsorship\r\n Building the future through education\r\n \r\n \r\n \r\n \r\n \r\n \r\n Humanitarian Cases\r\n Patient treatment, surgeries\r\n \r\n \r\n \r\n \r\n \r\n \r\n Development Projects\r\n Empowering productive families\r\n \r\n \r\n<a>Learn more about our programs and initiatives</a>\r\n \r\n","animate_delay":"0"},"editing":false,"element_name":"gva_text_noeditor"}],"editing":false,"element_name":"gva_column"}],"editing":false,"element_name":"gva_row"},{"settings":{"element":"gva_row","bg_particles":"off","bg_position":"center top","bg_repeat":"no-repeat","bg_attachment":"scroll","bg_size":"cover","style_space":"remove_margin remove_padding remove_padding_col","layout":"container","class":"newsfront"},"columns":[{"settings":{"element":"gva_column"},"col_lg":12,"elements":[{"settings":{"content":"\r\n \r\n \r\n Our News\r\n \r\n \r\n \r\nNews that tells the story of giving \r\n \r\n","animate_delay":"0"},"editing":false,"element_name":"gva_text_noeditor"},{"settings":{"title_admin":"news: news Block -en","block_drupal":"views_block__news_block_3","hidden_title":"on","align_title":"title-align-left","remove_margin":"on","style_text":"text-dark","animate_delay":"0"},"editing":false,"element_name":"gva_drupal_block"}],"editing":false,"element_name":"gva_column"}],"editing":false,"element_name":"gva_row"},{"settings":{"bg_particles":"off","bg_position":"center top","bg_repeat":"no-repeat","bg_attachment":"scroll","bg_size":"cover","style_space":"remove_padding","layout":"container-fw","element":"gva_row","class":"sliderfrontpage"},"columns":[{"settings":{"element":"gva_column","bg_position":"center top","bg_repeat":"no-repeat","bg_attachment":"scroll","bg_size":"cover"},"col_lg":12,"elements":[{"settings":{"title_admin":"news: campigns-en","block_drupal":"views_block__news_block_5","hidden_title":"on","align_title":"title-align-right","remove_margin":"on","style_text":"text-dark","animate_delay":"0"},"editing":false,"element_name":"gva_drupal_block"}],"editing":false,"element_name":"gva_column"}],"editing":false,"element_name":"gva_row"},{"settings":{"element":"gva_row","bg_particles":"off","bg_position":"center top","bg_repeat":"no-repeat","bg_attachment":"scroll","bg_size":"cover","style_space":"remove_margin remove_padding remove_padding_col","layout":"container-fw","class":"partner"},"columns":[{"settings":{"element":"gva_column"},"col_lg":12,"elements":[{"settings":{"content":"\r\n \r\n \r\n \r\n Our Distinguished Projects\r\n \r\n \r\n \r\n At Wejdan Charity, we strive to provide support and assistance to communities in need who are affected by disasters, crises, and wars, with the aim of improving quality of life and promoting sustainable development. Our projects span across several areas:\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n Relief Projects\r\n Emergency response to disasters and wars, providing food and medicine.\r\n \r\n<a> Browse Projects </a>\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n Development Projects\r\n Empowering communities and building capacities.\r\n \r\n<a> Browse Projects </a>\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n Seasonal Projects\r\n Ramadan campaigns, Qurbani, and winter clothing.\r\n \r\n<a> Browse Projects </a>\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n Endowment Projects\r\n An investment for the hereafter—mosques, wells, and charitable endowments.\r\n<a> Browse Projects </a>\r\n \r\n \r\n \r\n \r\n","animate_delay":"0"},"editing":false,"element_name":"gva_text_noeditor"}],"editing":false,"element_name":"gva_column"}],"editing":false,"element_name":"gva_row"},{"settings":{"element":"gva_row","bg_particles":"off","bg_position":"center top","bg_repeat":"no-repeat","bg_attachment":"scroll","bg_size":"cover","style_space":"remove_margin remove_padding remove_padding_col","layout":"container-fw","class":"partner"},"columns":[{"settings":{"element":"gva_column"},"col_lg":12,"elements":[{"settings":{"content":"\r\n \r\n \r\n\r\n \r\n \r\n Our Achievements in Numbers\r\n Your trust makes the difference\r\n \r\n \r\n\r\n \r\n \r\n 0\r\n Beneficiaries worldwide\r\n \r\n \r\n \r\n 0\r\n Projects implemented\r\n \r\n \r\n \r\n 0\r\n Countries we operate in\r\n \r\n \r\n \r\n 0\r\n Volunteers\r\n \r\n \r\n \r\n \r\n\r\n\r\n// Enhanced counter animation for facts section\r\nfunction animateFactsCounters() {\r\n const statNumbers = document.querySelectorAll('.facts-section__stat-number');\r\n \r\n const observer = new IntersectionObserver((entries) => {\r\n entries.forEach(entry => {\r\n if (entry.isIntersecting) {\r\n const counter = entry.target;\r\n const target = parseInt(counter.getAttribute('data-target'));\r\n const duration = 2000;\r\n const increment = target / (duration / 16);\r\n \r\n let current = 0;\r\n const updateCounter = () => {\r\n current += increment;\r\n if (current < target) {\r\n // Format number with K for thousands\r\n let displayNum = Math.ceil(current);\r\n if (displayNum >= 1000) {\r\n counter.textContent = (displayNum / 1000).toFixed(1).replace('.0', '') + 'K';\r\n } else {\r\n counter.textContent = displayNum.toLocaleString();\r\n }\r\n requestAnimationFrame(updateCounter);\r\n } else {\r\n // Final formatting\r\n if (target >= 1000) {\r\n counter.textContent = (target / 1000).toFixed(1).replace('.0', '') + 'K';\r\n counter.classList.add('formatted');\r\n } else {\r\n counter.textContent = target.toLocaleString();\r\n }\r\n counter.classList.add('animated');\r\n setTimeout(() => counter.classList.remove('animated'), 600);\r\n }\r\n };\r\n updateCounter();\r\n observer.unobserve(counter);\r\n }\r\n });\r\n }, { threshold: 0.5, rootMargin: '0px 0px -50px 0px' });\r\n \r\n statNumbers.forEach(counter => observer.observe(counter));\r\n}\r\n\r\n// Call this function when DOM is loaded\r\ndocument.addEventListener('DOMContentLoaded', () => {\r\n animateFactsCounters();\r\n});","animate_delay":"0"},"editing":false,"element_name":"gva_text_noeditor"}],"editing":false,"element_name":"gva_column"}],"editing":false,"element_name":"gva_row"},{"settings":{"element":"gva_row","bg_particles":"off","bg_position":"center top","bg_repeat":"no-repeat","bg_attachment":"scroll","bg_size":"cover","style_space":"remove_margin remove_padding remove_padding_col","layout":"container-fw","class":"zakatcalc"},"columns":[{"settings":{"element":"gva_column"},"col_lg":12,"elements":[{"settings":{"content":"\r\n\r\n \r\n \r\n \r\n \r\nSmart Zakat Calculator\r\n A precise and comprehensive tool\r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n \r\n \r\n Money & Savings\r\n \r\n \r\n \r\n Cash (on hand or at home)\r\n \r\n \r\n $\r\n \r\n \r\n \r\n Bank balances\r\n \r\n \r\n $\r\n \r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n Gold & Silver\r\n \r\n \r\n Refresh Prices\r\n \r\n \r\n \r\n \r\n \r\n Gold weight (grams)\r\n \r\n \r\n \r\n \r\n Current gold price per gram\r\n \r\n Live\r\n \r\n \r\n \r\n \r\n $ / gram\r\n \r\n \r\n \r\n\r\n \r\n \r\n Silver weight (grams)\r\n \r\n \r\n \r\n \r\n Current silver price per gram\r\n \r\n Live\r\n \r\n \r\n \r\n \r\n $ / gram\r\n \r\n \r\n \r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n Zakat Summary\r\n \r\n \r\n Total assets:\r\n 0.00 $\r\n \r\n \r\n Net zakatable assets:\r\n 0.00 $\r\n \r\n \r\n Nisab value (85g gold):\r\n ...\r\n \r\n \r\n Enter data to check eligibility\r\n \r\n \r\n \r\n\r\n \r\n \r\n Zakat due (2.5%)\r\n 0.00 $\r\n \r\n \r\n <a>\r\n \r\n Contact via WhatsApp for consultation and donation\r\n </a>\r\n \r\n \r\n \r\n \r\n\r\n\r\n// Zakat Calculator Logic\r\nlet zakatcalculatorPricesLoaded = false;\r\n\r\n// Initialize calculator when DOM is loaded\r\ndocument.addEventListener('DOMContentLoaded', () => {\r\n zakatcalculatorFetchPrices();\r\n zakatcalculatorCalculate();\r\n \r\n // Add input event listeners for real-time calculation\r\n const inputs = document.querySelectorAll('.zakatcalculator-section__input');\r\n inputs.forEach(input => {\r\n input.addEventListener('input', zakatcalculatorCalculate);\r\n });\r\n \r\n // Format numbers as user types\r\n inputs.forEach(input => {\r\n input.addEventListener('blur', function() {\r\n if (this.value) {\r\n const value = parseFloat(this.value);\r\n if (!isNaN(value)) {\r\n this.value = value.toLocaleString('en-US', {\r\n minimumFractionDigits: 2,\r\n maximumFractionDigits: 2\r\n });\r\n }\r\n }\r\n });\r\n \r\n input.addEventListener('focus', function() {\r\n if (this.value) {\r\n this.value = this.value.replace(/[^\\d.]/g, '');\r\n }\r\n });\r\n });\r\n});\r\n\r\n// Fetch metal prices\r\nasync function zakatcalculatorFetchPrices() {\r\n const goldInput = document.getElementById('goldPrice');\r\n const silverInput = document.getElementById('silverPrice');\r\n const refreshButton = document.querySelector('.zakatcalculator-section__refresh-button');\r\n const refreshIcon = document.querySelector('.zakatcalculator-section__refresh-icon');\r\n \r\n if (!refreshButton || !refreshIcon) return;\r\n \r\n // Show loading state\r\n refreshButton.disabled = true;\r\n refreshIcon.classList.add('zakatcalculator-section__refresh-icon--spinning');\r\n goldInput.classList.add('zakatcalculator-section__input--loading');\r\n silverInput.classList.add('zakatcalculator-section__input--loading');\r\n \r\n try {\r\n // Simulate API call with delay\r\n await new Promise(resolve => setTimeout(resolve, 1500));\r\n \r\n // Mock data (in a real app, you would fetch from an API)\r\n const liveGoldPrice = 76.50;\r\n const liveSilverPrice = 0.95;\r\n \r\n // Update inputs\r\n goldInput.value = liveGoldPrice.toFixed(2);\r\n silverInput.value = liveSilverPrice.toFixed(2);\r\n \r\n // Remove loading state\r\n goldInput.classList.remove('zakatcalculator-section__input--loading');\r\n silverInput.classList.remove('zakatcalculator-section__input--loading');\r\n goldInput.classList.add('zakatcalculator-section__input--valid');\r\n silverInput.classList.add('zakatcalculator-section__input--valid');\r\n \r\n zakatcalculatorPricesLoaded = true;\r\n \r\n // Show success feedback\r\n refreshButton.innerHTML = ' Updated';\r\n refreshButton.style.backgroundColor = '#617f67';\r\n refreshButton.style.color = 'white';\r\n \r\n setTimeout(() => {\r\n refreshButton.innerHTML = ' Refresh Prices';\r\n refreshButton.style.backgroundColor = '';\r\n refreshButton.style.color = '';\r\n }, 2000);\r\n \r\n } catch (error) {\r\n console.error(\"Failed to fetch prices\", error);\r\n \r\n // Fallback values\r\n goldInput.value = 75.00;\r\n silverInput.value = 0.90;\r\n \r\n // Show error state\r\n goldInput.classList.remove('zakatcalculator-section__input--loading');\r\n silverInput.classList.remove('zakatcalculator-section__input--loading');\r\n goldInput.classList.add('zakatcalculator-section__input--invalid');\r\n silverInput.classList.add('zakatcalculator-section__input--invalid');\r\n \r\n refreshButton.innerHTML = ' Update Failed';\r\n refreshButton.style.backgroundColor = '#dc2626';\r\n refreshButton.style.color = 'white';\r\n \r\n setTimeout(() => {\r\n refreshButton.innerHTML = ' Refresh Prices';\r\n refreshButton.style.backgroundColor = '';\r\n refreshButton.style.color = '';\r\n }, 2000);\r\n \r\n } finally {\r\n refreshButton.disabled = false;\r\n refreshIcon.classList.remove('zakatcalculator-section__refresh-icon--spinning');\r\n \r\n // Recalculate zakat\r\n zakatcalculatorCalculate();\r\n }\r\n}\r\n\r\n// Calculate zakat\r\nfunction zakatcalculatorCalculate() {\r\n const cashHand = parseFloat(document.getElementById('cashHand').value) || 0;\r\n const cashBank = parseFloat(document.getElementById('cashBank').value) || 0;\r\n const goldWeight = parseFloat(document.getElementById('goldWeight').value) || 0;\r\n const goldPrice = parseFloat(document.getElementById('goldPrice').value) || 0;\r\n const silverWeight = parseFloat(document.getElementById('silverWeight').value) || 0;\r\n const silverPrice = parseFloat(document.getElementById('silverPrice').value) || 0;\r\n \r\n // Calculate totals\r\n const totalAssets = cashHand + cashBank + (goldWeight * goldPrice) + (silverWeight * silverPrice);\r\n const nisabThreshold = 85 * goldPrice;\r\n \r\n // Update display\r\n document.getElementById('totalAssetsDisplay').textContent = \r\n formatCurrency(totalAssets);\r\n \r\n document.getElementById('netAssetsDisplay').textContent = \r\n formatCurrency(totalAssets);\r\n \r\n if (goldPrice > 0) {\r\n document.getElementById('nisabValueDisplay').textContent = \r\n formatCurrency(nisabThreshold);\r\n } else {\r\n document.getElementById('nisabValueDisplay').textContent = '...';\r\n }\r\n \r\n // Update status and final zakat\r\n const statusBadge = document.getElementById('statusBadge');\r\n const finalDisplay = document.getElementById('finalZakatDisplay');\r\n const payButton = document.querySelector('.zakatcalculator-section__pay-button');\r\n \r\n if (totalAssets >= nisabThreshold && goldPrice > 0 && zakatcalculatorPricesLoaded) {\r\n const zakatAmount = totalAssets * 0.025;\r\n finalDisplay.textContent = formatCurrency(zakatAmount);\r\n \r\n // Update status badge\r\n statusBadge.textContent = '✓ Zakat is due (Nisab reached)';\r\n statusBadge.className = 'zakatcalculator-section__status zakatcalculator-section__status--eligible';\r\n \r\n // Enable pay button\r\n payButton.disabled = false;\r\n payButton.innerHTML = ' Pay Zakat Now';\r\n \r\n } else {\r\n finalDisplay.textContent = '0.00 $';\r\n \r\n // Update status badge\r\n if (!zakatcalculatorPricesLoaded) {\r\n statusBadge.textContent = 'Enter data to check eligibility';\r\n statusBadge.className = 'zakatcalculator-section__status zakatcalculator-section__status--not-eligible';\r\n } else if (totalAssets < nisabThreshold) {\r\n statusBadge.textContent = 'Zakat is not due (Nisab not reached)';\r\n statusBadge.className = 'zakatcalculator-section__status zakatcalculator-section__status--not-eligible';\r\n } else {\r\n statusBadge.textContent = 'Enter data to check eligibility';\r\n statusBadge.className = 'zakatcalculator-section__status zakatcalculator-section__status--not-eligible';\r\n }\r\n \r\n // Disable pay button\r\n payButton.disabled = true;\r\n payButton.innerHTML = ' Pay Zakat Now';\r\n }\r\n}\r\n\r\n// Format currency\r\nfunction formatCurrency(amount) {\r\n return new Intl.NumberFormat('en-US', {\r\n style: 'currency',\r\n currency: 'USD',\r\n minimumFractionDigits: 2,\r\n maximumFractionDigits: 2\r\n }).format(amount);\r\n}\r\n\r\n// Add zakat to cart\r\nfunction zakatcalculatorAddToCart() {\r\n const amountText = document.getElementById('finalZakatDisplay').textContent;\r\n const amount = parseFloat(amountText.replace(/[^0-9.-]+/g, \"\"));\r\n \r\n if (amount > 0 && !isNaN(amount)) {\r\n // Use your existing addToCart function\r\n if (typeof addToCart === 'function') {\r\n addToCart('Calculated Zakat', amount, 'Zakat');\r\n } else {\r\n // Fallback if addToCart is not defined\r\n alert(`Calculated Zakat amount: ${amountText}`);\r\n }\r\n } else {\r\n alert(\"Invalid zakat amount. Please check your inputs.\");\r\n }\r\n}\r\n\r\n// Input validation\r\nfunction validateZakatInput(input) {\r\n const value = parseFloat(input.value);\r\n const min = parseFloat(input.getAttribute('min')) || 0;\r\n \r\n if (isNaN(value) || value < min) {\r\n input.classList.add('zakatcalculator-section__input--invalid');\r\n return false;\r\n } else {\r\n input.classList.remove('zakatcalculator-section__input--invalid');\r\n input.classList.add('zakatcalculator-section__input--valid');\r\n return true;\r\n }\r\n}","animate_delay":"0"},"editing":false,"element_name":"gva_text_noeditor"}],"editing":false,"element_name":"gva_column"}],"editing":false,"element_name":"gva_row"},{"settings":{"element":"gva_row","bg_particles":"off","bg_position":"center top","bg_repeat":"no-repeat","bg_attachment":"scroll","bg_size":"cover","style_space":"remove_margin remove_padding remove_padding_col","layout":"container-fw","class":"partner","margin_top":"30","margin_bottom":"30"},"columns":[{"settings":{"element":"gva_column"},"col_lg":12,"elements":[{"settings":{"content":"\r\n \r\n Strategic Partnerships\r\n Our partners in creating hope\r\n \r\n \r\n ","animate_delay":"0"},"editing":false,"element_name":"gva_text_noeditor"},{"settings":{"title_admin":"Partners: Partners Block - en","block_drupal":"views_block__partners_block_2","hidden_title":"on","align_title":"title-align-right","remove_margin":"on","style_text":"text-dark","animate_delay":"0"},"editing":false,"element_name":"gva_drupal_block"}],"editing":false,"element_name":"gva_column"}],"editing":false,"element_name":"gva_row"}]') (Line: 47)
Drupal\gavias_content_builder\Plugin\Field\FieldFormatter\GaviasContentBuilderFormatter->viewElements(Object, 'en') (Line: 89)
Drupal\Core\Field\FormatterBase->view(Object, 'en') (Line: 263)
Drupal\Core\Entity\Entity\EntityViewDisplay->buildMultiple(Array) (Line: 351)
Drupal\Core\Entity\EntityViewBuilder->buildComponents(Array, Array, Array, 'full') (Line: 24)
Drupal\node\NodeViewBuilder->buildComponents(Array, Array, Array, 'full') (Line: 293)
Drupal\Core\Entity\EntityViewBuilder->buildMultiple(Array) (Line: 250)
Drupal\Core\Entity\EntityViewBuilder->build(Array)
call_user_func_array(Array, Array) (Line: 100)
Drupal\Core\Render\Renderer->doTrustedCallback(Array, Array, 'Render #pre_render callbacks must be methods of a class that implements \Drupal\Core\Security\TrustedCallbackInterface or be an anonymous function. The callback was %s. Support for this callback implementation is deprecated in 8.8.0 and will be removed in Drupal 9.0.0. See https://www.drupal.org/node/2966725', 'silenced_deprecation', 'Drupal\Core\Render\Element\RenderCallbackInterface') (Line: 781)
Drupal\Core\Render\Renderer->doCallback('#pre_render', Array, Array) (Line: 372)
Drupal\Core\Render\Renderer->doRender(Array, ) (Line: 200)
Drupal\Core\Render\Renderer->render(Array, ) (Line: 226)
Drupal\Core\Render\MainContent\HtmlRenderer->Drupal\Core\Render\MainContent\{closure}() (Line: 573)
Drupal\Core\Render\Renderer->executeInRenderContext(Object, Object) (Line: 227)
Drupal\Core\Render\MainContent\HtmlRenderer->prepare(Array, Object, Object) (Line: 117)
Drupal\Core\Render\MainContent\HtmlRenderer->renderResponse(Array, Object, Object) (Line: 90)
Drupal\Core\EventSubscriber\MainContentViewSubscriber->onViewRenderArray(Object, 'kernel.view', Object)
call_user_func(Array, Object, 'kernel.view', Object) (Line: 111)
Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher->dispatch('kernel.view', Object) (Line: 156)
Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object, 1) (Line: 68)
Symfony\Component\HttpKernel\HttpKernel->handle(Object, 1, 1) (Line: 57)
Drupal\Core\StackMiddleware\Session->handle(Object, 1, 1) (Line: 47)
Drupal\Core\StackMiddleware\KernelPreHandle->handle(Object, 1, 1) (Line: 191)
Drupal\page_cache\StackMiddleware\PageCache->fetch(Object, 1, 1) (Line: 128)
Drupal\page_cache\StackMiddleware\PageCache->lookup(Object, 1, 1) (Line: 82)
Drupal\page_cache\StackMiddleware\PageCache->handle(Object, 1, 1) (Line: 47)
Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle(Object, 1, 1) (Line: 52)
Drupal\Core\StackMiddleware\NegotiationMiddleware->handle(Object, 1, 1) (Line: 23)
Stack\StackedHttpKernel->handle(Object, 1, 1) (Line: 708)
Drupal\Core\DrupalKernel->handle(Object) (Line: 19)
- Deprecated function: implode(): Passing glue string after array is deprecated. Swap the parameters in element_gva_column->render_content() (line 462 of themes/gavias_kunco/gva_content_builder/gva_column.php).
element_gva_column->render_content(Array, '
Smart Zakat Calculator
A precise and comprehensive tool
Money & Savings
Cash (on hand or at home)
$
Bank balances
$
Gold & Silver
Refresh Prices
Gold weight (grams)
Current gold price per gram
Live
$ / gram
Silver weight (grams)
Current silver price per gram
Live
$ / gram
Zakat Summary
Total assets:
0.00 $
Net zakatable assets:
0.00 $
Nisab value (85g gold):
...
Enter data to check eligibility
Zakat due (2.5%)
0.00 $
<a href="https://wa.me/905057763103" class="sponsorships-btn-secondary sponsorships-btn-full mt-4" target="_blank">
Contact via WhatsApp for consultation and donation
</a>
// Zakat Calculator Logic
let zakatcalculatorPricesLoaded = false;
// Initialize calculator when DOM is loaded
document.addEventListener('DOMContentLoaded', () => {
zakatcalculatorFetchPrices();
zakatcalculatorCalculate();
// Add input event listeners for real-time calculation
const inputs = document.querySelectorAll('.zakatcalculator-section__input');
inputs.forEach(input => {
input.addEventListener('input', zakatcalculatorCalculate);
});
// Format numbers as user types
inputs.forEach(input => {
input.addEventListener('blur', function() {
if (this.value) {
const value = parseFloat(this.value);
if (!isNaN(value)) {
this.value = value.toLocaleString('en-US', {
minimumFractionDigits: 2,
maximumFractionDigits: 2
});
}
}
});
input.addEventListener('focus', function() {
if (this.value) {
this.value = this.value.replace(/[^\d.]/g, '');
}
});
});
});
// Fetch metal prices
async function zakatcalculatorFetchPrices() {
const goldInput = document.getElementById('goldPrice');
const silverInput = document.getElementById('silverPrice');
const refreshButton = document.querySelector('.zakatcalculator-section__refresh-button');
const refreshIcon = document.querySelector('.zakatcalculator-section__refresh-icon');
if (!refreshButton || !refreshIcon) return;
// Show loading state
refreshButton.disabled = true;
refreshIcon.classList.add('zakatcalculator-section__refresh-icon--spinning');
goldInput.classList.add('zakatcalculator-section__input--loading');
silverInput.classList.add('zakatcalculator-section__input--loading');
try {
// Simulate API call with delay
await new Promise(resolve => setTimeout(resolve, 1500));
// Mock data (in a real app, you would fetch from an API)
const liveGoldPrice = 76.50;
const liveSilverPrice = 0.95;
// Update inputs
goldInput.value = liveGoldPrice.toFixed(2);
silverInput.value = liveSilverPrice.toFixed(2);
// Remove loading state
goldInput.classList.remove('zakatcalculator-section__input--loading');
silverInput.classList.remove('zakatcalculator-section__input--loading');
goldInput.classList.add('zakatcalculator-section__input--valid');
silverInput.classList.add('zakatcalculator-section__input--valid');
zakatcalculatorPricesLoaded = true;
// Show success feedback
refreshButton.innerHTML = ' Updated';
refreshButton.style.backgroundColor = '#617f67';
refreshButton.style.color = 'white';
setTimeout(() => {
refreshButton.innerHTML = ' Refresh Prices';
refreshButton.style.backgroundColor = '';
refreshButton.style.color = '';
}, 2000);
} catch (error) {
console.error("Failed to fetch prices", error);
// Fallback values
goldInput.value = 75.00;
silverInput.value = 0.90;
// Show error state
goldInput.classList.remove('zakatcalculator-section__input--loading');
silverInput.classList.remove('zakatcalculator-section__input--loading');
goldInput.classList.add('zakatcalculator-section__input--invalid');
silverInput.classList.add('zakatcalculator-section__input--invalid');
refreshButton.innerHTML = ' Update Failed';
refreshButton.style.backgroundColor = '#dc2626';
refreshButton.style.color = 'white';
setTimeout(() => {
refreshButton.innerHTML = ' Refresh Prices';
refreshButton.style.backgroundColor = '';
refreshButton.style.color = '';
}, 2000);
} finally {
refreshButton.disabled = false;
refreshIcon.classList.remove('zakatcalculator-section__refresh-icon--spinning');
// Recalculate zakat
zakatcalculatorCalculate();
}
}
// Calculate zakat
function zakatcalculatorCalculate() {
const cashHand = parseFloat(document.getElementById('cashHand').value) || 0;
const cashBank = parseFloat(document.getElementById('cashBank').value) || 0;
const goldWeight = parseFloat(document.getElementById('goldWeight').value) || 0;
const goldPrice = parseFloat(document.getElementById('goldPrice').value) || 0;
const silverWeight = parseFloat(document.getElementById('silverWeight').value) || 0;
const silverPrice = parseFloat(document.getElementById('silverPrice').value) || 0;
// Calculate totals
const totalAssets = cashHand + cashBank + (goldWeight * goldPrice) + (silverWeight * silverPrice);
const nisabThreshold = 85 * goldPrice;
// Update display
document.getElementById('totalAssetsDisplay').textContent =
formatCurrency(totalAssets);
document.getElementById('netAssetsDisplay').textContent =
formatCurrency(totalAssets);
if (goldPrice > 0) {
document.getElementById('nisabValueDisplay').textContent =
formatCurrency(nisabThreshold);
} else {
document.getElementById('nisabValueDisplay').textContent = '...';
}
// Update status and final zakat
const statusBadge = document.getElementById('statusBadge');
const finalDisplay = document.getElementById('finalZakatDisplay');
const payButton = document.querySelector('.zakatcalculator-section__pay-button');
if (totalAssets >= nisabThreshold && goldPrice > 0 && zakatcalculatorPricesLoaded) {
const zakatAmount = totalAssets * 0.025;
finalDisplay.textContent = formatCurrency(zakatAmount);
// Update status badge
statusBadge.textContent = '✓ Zakat is due (Nisab reached)';
statusBadge.className = 'zakatcalculator-section__status zakatcalculator-section__status--eligible';
// Enable pay button
payButton.disabled = false;
payButton.innerHTML = ' Pay Zakat Now';
} else {
finalDisplay.textContent = '0.00 $';
// Update status badge
if (!zakatcalculatorPricesLoaded) {
statusBadge.textContent = 'Enter data to check eligibility';
statusBadge.className = 'zakatcalculator-section__status zakatcalculator-section__status--not-eligible';
} else if (totalAssets < nisabThreshold) {
statusBadge.textContent = 'Zakat is not due (Nisab not reached)';
statusBadge.className = 'zakatcalculator-section__status zakatcalculator-section__status--not-eligible';
} else {
statusBadge.textContent = 'Enter data to check eligibility';
statusBadge.className = 'zakatcalculator-section__status zakatcalculator-section__status--not-eligible';
}
// Disable pay button
payButton.disabled = true;
payButton.innerHTML = ' Pay Zakat Now';
}
}
// Format currency
function formatCurrency(amount) {
return new Intl.NumberFormat('en-US', {
style: 'currency',
currency: 'USD',
minimumFractionDigits: 2,
maximumFractionDigits: 2
}).format(amount);
}
// Add zakat to cart
function zakatcalculatorAddToCart() {
const amountText = document.getElementById('finalZakatDisplay').textContent;
const amount = parseFloat(amountText.replace(/[^0-9.-]+/g, ""));
if (amount > 0 && !isNaN(amount)) {
// Use your existing addToCart function
if (typeof addToCart === 'function') {
addToCart('Calculated Zakat', amount, 'Zakat');
} else {
// Fallback if addToCart is not defined
alert(`Calculated Zakat amount: ${amountText}`);
}
} else {
alert("Invalid zakat amount. Please check your inputs.");
}
}
// Input validation
function validateZakatInput(input) {
const value = parseFloat(input.value);
const min = parseFloat(input.getAttribute('min')) || 0;
if (isNaN(value) || value < min) {
input.classList.add('zakatcalculator-section__input--invalid');
return false;
} else {
input.classList.remove('zakatcalculator-section__input--invalid');
input.classList.add('zakatcalculator-section__input--valid');
return true;
}
}') (Line: 110)
gavias_content_builder_render_element('gva_column', Array, '
Smart Zakat Calculator
A precise and comprehensive tool
Money & Savings
Cash (on hand or at home)
$
Bank balances
$
Gold & Silver
Refresh Prices
Gold weight (grams)
Current gold price per gram
Live
$ / gram
Silver weight (grams)
Current silver price per gram
Live
$ / gram
Zakat Summary
Total assets:
0.00 $
Net zakatable assets:
0.00 $
Nisab value (85g gold):
...
Enter data to check eligibility
Zakat due (2.5%)
0.00 $
<a href="https://wa.me/905057763103" class="sponsorships-btn-secondary sponsorships-btn-full mt-4" target="_blank">
Contact via WhatsApp for consultation and donation
</a>
// Zakat Calculator Logic
let zakatcalculatorPricesLoaded = false;
// Initialize calculator when DOM is loaded
document.addEventListener('DOMContentLoaded', () => {
zakatcalculatorFetchPrices();
zakatcalculatorCalculate();
// Add input event listeners for real-time calculation
const inputs = document.querySelectorAll('.zakatcalculator-section__input');
inputs.forEach(input => {
input.addEventListener('input', zakatcalculatorCalculate);
});
// Format numbers as user types
inputs.forEach(input => {
input.addEventListener('blur', function() {
if (this.value) {
const value = parseFloat(this.value);
if (!isNaN(value)) {
this.value = value.toLocaleString('en-US', {
minimumFractionDigits: 2,
maximumFractionDigits: 2
});
}
}
});
input.addEventListener('focus', function() {
if (this.value) {
this.value = this.value.replace(/[^\d.]/g, '');
}
});
});
});
// Fetch metal prices
async function zakatcalculatorFetchPrices() {
const goldInput = document.getElementById('goldPrice');
const silverInput = document.getElementById('silverPrice');
const refreshButton = document.querySelector('.zakatcalculator-section__refresh-button');
const refreshIcon = document.querySelector('.zakatcalculator-section__refresh-icon');
if (!refreshButton || !refreshIcon) return;
// Show loading state
refreshButton.disabled = true;
refreshIcon.classList.add('zakatcalculator-section__refresh-icon--spinning');
goldInput.classList.add('zakatcalculator-section__input--loading');
silverInput.classList.add('zakatcalculator-section__input--loading');
try {
// Simulate API call with delay
await new Promise(resolve => setTimeout(resolve, 1500));
// Mock data (in a real app, you would fetch from an API)
const liveGoldPrice = 76.50;
const liveSilverPrice = 0.95;
// Update inputs
goldInput.value = liveGoldPrice.toFixed(2);
silverInput.value = liveSilverPrice.toFixed(2);
// Remove loading state
goldInput.classList.remove('zakatcalculator-section__input--loading');
silverInput.classList.remove('zakatcalculator-section__input--loading');
goldInput.classList.add('zakatcalculator-section__input--valid');
silverInput.classList.add('zakatcalculator-section__input--valid');
zakatcalculatorPricesLoaded = true;
// Show success feedback
refreshButton.innerHTML = ' Updated';
refreshButton.style.backgroundColor = '#617f67';
refreshButton.style.color = 'white';
setTimeout(() => {
refreshButton.innerHTML = ' Refresh Prices';
refreshButton.style.backgroundColor = '';
refreshButton.style.color = '';
}, 2000);
} catch (error) {
console.error("Failed to fetch prices", error);
// Fallback values
goldInput.value = 75.00;
silverInput.value = 0.90;
// Show error state
goldInput.classList.remove('zakatcalculator-section__input--loading');
silverInput.classList.remove('zakatcalculator-section__input--loading');
goldInput.classList.add('zakatcalculator-section__input--invalid');
silverInput.classList.add('zakatcalculator-section__input--invalid');
refreshButton.innerHTML = ' Update Failed';
refreshButton.style.backgroundColor = '#dc2626';
refreshButton.style.color = 'white';
setTimeout(() => {
refreshButton.innerHTML = ' Refresh Prices';
refreshButton.style.backgroundColor = '';
refreshButton.style.color = '';
}, 2000);
} finally {
refreshButton.disabled = false;
refreshIcon.classList.remove('zakatcalculator-section__refresh-icon--spinning');
// Recalculate zakat
zakatcalculatorCalculate();
}
}
// Calculate zakat
function zakatcalculatorCalculate() {
const cashHand = parseFloat(document.getElementById('cashHand').value) || 0;
const cashBank = parseFloat(document.getElementById('cashBank').value) || 0;
const goldWeight = parseFloat(document.getElementById('goldWeight').value) || 0;
const goldPrice = parseFloat(document.getElementById('goldPrice').value) || 0;
const silverWeight = parseFloat(document.getElementById('silverWeight').value) || 0;
const silverPrice = parseFloat(document.getElementById('silverPrice').value) || 0;
// Calculate totals
const totalAssets = cashHand + cashBank + (goldWeight * goldPrice) + (silverWeight * silverPrice);
const nisabThreshold = 85 * goldPrice;
// Update display
document.getElementById('totalAssetsDisplay').textContent =
formatCurrency(totalAssets);
document.getElementById('netAssetsDisplay').textContent =
formatCurrency(totalAssets);
if (goldPrice > 0) {
document.getElementById('nisabValueDisplay').textContent =
formatCurrency(nisabThreshold);
} else {
document.getElementById('nisabValueDisplay').textContent = '...';
}
// Update status and final zakat
const statusBadge = document.getElementById('statusBadge');
const finalDisplay = document.getElementById('finalZakatDisplay');
const payButton = document.querySelector('.zakatcalculator-section__pay-button');
if (totalAssets >= nisabThreshold && goldPrice > 0 && zakatcalculatorPricesLoaded) {
const zakatAmount = totalAssets * 0.025;
finalDisplay.textContent = formatCurrency(zakatAmount);
// Update status badge
statusBadge.textContent = '✓ Zakat is due (Nisab reached)';
statusBadge.className = 'zakatcalculator-section__status zakatcalculator-section__status--eligible';
// Enable pay button
payButton.disabled = false;
payButton.innerHTML = ' Pay Zakat Now';
} else {
finalDisplay.textContent = '0.00 $';
// Update status badge
if (!zakatcalculatorPricesLoaded) {
statusBadge.textContent = 'Enter data to check eligibility';
statusBadge.className = 'zakatcalculator-section__status zakatcalculator-section__status--not-eligible';
} else if (totalAssets < nisabThreshold) {
statusBadge.textContent = 'Zakat is not due (Nisab not reached)';
statusBadge.className = 'zakatcalculator-section__status zakatcalculator-section__status--not-eligible';
} else {
statusBadge.textContent = 'Enter data to check eligibility';
statusBadge.className = 'zakatcalculator-section__status zakatcalculator-section__status--not-eligible';
}
// Disable pay button
payButton.disabled = true;
payButton.innerHTML = ' Pay Zakat Now';
}
}
// Format currency
function formatCurrency(amount) {
return new Intl.NumberFormat('en-US', {
style: 'currency',
currency: 'USD',
minimumFractionDigits: 2,
maximumFractionDigits: 2
}).format(amount);
}
// Add zakat to cart
function zakatcalculatorAddToCart() {
const amountText = document.getElementById('finalZakatDisplay').textContent;
const amount = parseFloat(amountText.replace(/[^0-9.-]+/g, ""));
if (amount > 0 && !isNaN(amount)) {
// Use your existing addToCart function
if (typeof addToCart === 'function') {
addToCart('Calculated Zakat', amount, 'Zakat');
} else {
// Fallback if addToCart is not defined
alert(`Calculated Zakat amount: ${amountText}`);
}
} else {
alert("Invalid zakat amount. Please check your inputs.");
}
}
// Input validation
function validateZakatInput(input) {
const value = parseFloat(input.value);
const min = parseFloat(input.getAttribute('min')) || 0;
if (isNaN(value) || value < min) {
input.classList.add('zakatcalculator-section__input--invalid');
return false;
} else {
input.classList.remove('zakatcalculator-section__input--invalid');
input.classList.add('zakatcalculator-section__input--valid');
return true;
}
}') (Line: 58)
gavias_content_builder_render_el(Array) (Line: 22)
gavias_content_builder_frontend('[{"settings":{"bg_particles":"off","bg_position":"center top","bg_repeat":"no-repeat","bg_attachment":"scroll","bg_size":"cover","style_space":"remove_padding","layout":"container-fw"},"columns":[{"settings":{"element":"gva_column","bg_position":"center top","bg_repeat":"no-repeat","bg_attachment":"scroll","bg_size":"cover","el_class":"front"},"col_lg":12,"elements":[{"settings":{"content":"\r\n \r\n \r\n \r\n \r\n Urgent Appeal\r\n \r\n Be a helping hand for them in\r\n times of crisis\r\n \r\n \r\n At \"Wejdan Charity\", we work with full transparency to deliver your donations to those in need in conflict and poverty-stricken areas.\r\n \r\n \r\n <a>\r\n Charity Donations \r\n </a>\r\n <a>\r\n Our Projects \r\n </a>\r\n \r\n \r\n \r\n \r\n","animate_delay":"0"},"editing":false,"element_name":"gva_text_noeditor"}],"editing":false,"element_name":"gva_column"}],"editing":false,"element_name":"gva_row"},{"settings":{"element":"gva_row","bg_particles":"off","bg_position":"center top","bg_repeat":"no-repeat","bg_attachment":"scroll","bg_size":"cover","style_space":"remove_padding","layout":"container","class":"before-help-region"},"columns":[{"settings":{"element":"gva_column"},"col_lg":12,"elements":[{"settings":{"title":"Take action for animals now","link":"#","button_title":"Donation Now","button_align":"button-right-v2","style_text":"text-light","style_button":"btn-theme","donorbox":"off","target":"off","el_class":"margin","animate":"fade-up","animate_delay":"0"},"editing":false,"element_name":"gva_call_to_action"}],"editing":false,"element_name":"gva_column"}],"editing":false,"element_name":"gva_row"},{"settings":{"element":"gva_row","bg_particles":"off","bg_position":"center top","bg_repeat":"no-repeat","bg_attachment":"scroll","bg_size":"cover","style_space":"remove_padding","layout":"container-fw","bg_color":"#f9fafb"},"columns":[{"settings":{"element":"gva_column","bg_position":"center top","bg_repeat":"no-repeat","bg_attachment":"scroll","bg_size":"cover","el_class":"about"},"col_lg":12,"elements":[{"settings":{"content":"\r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n \r\n \r\n Who We Are\r\n \r\n \r\n We plant hope.. \r\n and build people and the future\r\n \r\n \r\n Wejdan Charity is a leading humanitarian organization, founded with an ambitious vision to be a bridge of الخير between donors and those in need.\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n Development Stages\r\n A continuous journey of growth\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n Areas of Work\r\n We reach where the need is\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \"We work with passion to bring smiles\"\r\n \r\n \r\n \r\n \r\n \r\n","animate_delay":"0"},"editing":false,"element_name":"gva_text_noeditor"}],"editing":false,"element_name":"gva_column"}],"editing":false,"element_name":"gva_row"},{"settings":{"element":"gva_row","bg_particles":"off","bg_position":"center top","bg_repeat":"no-repeat","bg_attachment":"scroll","bg_size":"cover","style_space":"remove_margin remove_padding remove_padding_col","layout":"container-fw","class":"partner","margin_top":"30","margin_bottom":"30"},"columns":[{"settings":{"element":"gva_column"},"col_lg":12,"elements":[{"settings":{"content":"\r\n\r\n \r\n \r\n Initiatives & Programs\r\n Our Areas of Work\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n Ongoing Charity\r\n Water wells, mosque construction\r\n \r\n \r\n \r\n \r\n \r\n \r\n Student Sponsorship\r\n Building the future through education\r\n \r\n \r\n \r\n \r\n \r\n \r\n Humanitarian Cases\r\n Patient treatment, surgeries\r\n \r\n \r\n \r\n \r\n \r\n \r\n Development Projects\r\n Empowering productive families\r\n \r\n \r\n<a>Learn more about our programs and initiatives</a>\r\n \r\n","animate_delay":"0"},"editing":false,"element_name":"gva_text_noeditor"}],"editing":false,"element_name":"gva_column"}],"editing":false,"element_name":"gva_row"},{"settings":{"element":"gva_row","bg_particles":"off","bg_position":"center top","bg_repeat":"no-repeat","bg_attachment":"scroll","bg_size":"cover","style_space":"remove_margin remove_padding remove_padding_col","layout":"container","class":"newsfront"},"columns":[{"settings":{"element":"gva_column"},"col_lg":12,"elements":[{"settings":{"content":"\r\n \r\n \r\n Our News\r\n \r\n \r\n \r\nNews that tells the story of giving \r\n \r\n","animate_delay":"0"},"editing":false,"element_name":"gva_text_noeditor"},{"settings":{"title_admin":"news: news Block -en","block_drupal":"views_block__news_block_3","hidden_title":"on","align_title":"title-align-left","remove_margin":"on","style_text":"text-dark","animate_delay":"0"},"editing":false,"element_name":"gva_drupal_block"}],"editing":false,"element_name":"gva_column"}],"editing":false,"element_name":"gva_row"},{"settings":{"bg_particles":"off","bg_position":"center top","bg_repeat":"no-repeat","bg_attachment":"scroll","bg_size":"cover","style_space":"remove_padding","layout":"container-fw","element":"gva_row","class":"sliderfrontpage"},"columns":[{"settings":{"element":"gva_column","bg_position":"center top","bg_repeat":"no-repeat","bg_attachment":"scroll","bg_size":"cover"},"col_lg":12,"elements":[{"settings":{"title_admin":"news: campigns-en","block_drupal":"views_block__news_block_5","hidden_title":"on","align_title":"title-align-right","remove_margin":"on","style_text":"text-dark","animate_delay":"0"},"editing":false,"element_name":"gva_drupal_block"}],"editing":false,"element_name":"gva_column"}],"editing":false,"element_name":"gva_row"},{"settings":{"element":"gva_row","bg_particles":"off","bg_position":"center top","bg_repeat":"no-repeat","bg_attachment":"scroll","bg_size":"cover","style_space":"remove_margin remove_padding remove_padding_col","layout":"container-fw","class":"partner"},"columns":[{"settings":{"element":"gva_column"},"col_lg":12,"elements":[{"settings":{"content":"\r\n \r\n \r\n \r\n Our Distinguished Projects\r\n \r\n \r\n \r\n At Wejdan Charity, we strive to provide support and assistance to communities in need who are affected by disasters, crises, and wars, with the aim of improving quality of life and promoting sustainable development. Our projects span across several areas:\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n Relief Projects\r\n Emergency response to disasters and wars, providing food and medicine.\r\n \r\n<a> Browse Projects </a>\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n Development Projects\r\n Empowering communities and building capacities.\r\n \r\n<a> Browse Projects </a>\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n Seasonal Projects\r\n Ramadan campaigns, Qurbani, and winter clothing.\r\n \r\n<a> Browse Projects </a>\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n Endowment Projects\r\n An investment for the hereafter—mosques, wells, and charitable endowments.\r\n<a> Browse Projects </a>\r\n \r\n \r\n \r\n \r\n","animate_delay":"0"},"editing":false,"element_name":"gva_text_noeditor"}],"editing":false,"element_name":"gva_column"}],"editing":false,"element_name":"gva_row"},{"settings":{"element":"gva_row","bg_particles":"off","bg_position":"center top","bg_repeat":"no-repeat","bg_attachment":"scroll","bg_size":"cover","style_space":"remove_margin remove_padding remove_padding_col","layout":"container-fw","class":"partner"},"columns":[{"settings":{"element":"gva_column"},"col_lg":12,"elements":[{"settings":{"content":"\r\n \r\n \r\n\r\n \r\n \r\n Our Achievements in Numbers\r\n Your trust makes the difference\r\n \r\n \r\n\r\n \r\n \r\n 0\r\n Beneficiaries worldwide\r\n \r\n \r\n \r\n 0\r\n Projects implemented\r\n \r\n \r\n \r\n 0\r\n Countries we operate in\r\n \r\n \r\n \r\n 0\r\n Volunteers\r\n \r\n \r\n \r\n \r\n\r\n\r\n// Enhanced counter animation for facts section\r\nfunction animateFactsCounters() {\r\n const statNumbers = document.querySelectorAll('.facts-section__stat-number');\r\n \r\n const observer = new IntersectionObserver((entries) => {\r\n entries.forEach(entry => {\r\n if (entry.isIntersecting) {\r\n const counter = entry.target;\r\n const target = parseInt(counter.getAttribute('data-target'));\r\n const duration = 2000;\r\n const increment = target / (duration / 16);\r\n \r\n let current = 0;\r\n const updateCounter = () => {\r\n current += increment;\r\n if (current < target) {\r\n // Format number with K for thousands\r\n let displayNum = Math.ceil(current);\r\n if (displayNum >= 1000) {\r\n counter.textContent = (displayNum / 1000).toFixed(1).replace('.0', '') + 'K';\r\n } else {\r\n counter.textContent = displayNum.toLocaleString();\r\n }\r\n requestAnimationFrame(updateCounter);\r\n } else {\r\n // Final formatting\r\n if (target >= 1000) {\r\n counter.textContent = (target / 1000).toFixed(1).replace('.0', '') + 'K';\r\n counter.classList.add('formatted');\r\n } else {\r\n counter.textContent = target.toLocaleString();\r\n }\r\n counter.classList.add('animated');\r\n setTimeout(() => counter.classList.remove('animated'), 600);\r\n }\r\n };\r\n updateCounter();\r\n observer.unobserve(counter);\r\n }\r\n });\r\n }, { threshold: 0.5, rootMargin: '0px 0px -50px 0px' });\r\n \r\n statNumbers.forEach(counter => observer.observe(counter));\r\n}\r\n\r\n// Call this function when DOM is loaded\r\ndocument.addEventListener('DOMContentLoaded', () => {\r\n animateFactsCounters();\r\n});","animate_delay":"0"},"editing":false,"element_name":"gva_text_noeditor"}],"editing":false,"element_name":"gva_column"}],"editing":false,"element_name":"gva_row"},{"settings":{"element":"gva_row","bg_particles":"off","bg_position":"center top","bg_repeat":"no-repeat","bg_attachment":"scroll","bg_size":"cover","style_space":"remove_margin remove_padding remove_padding_col","layout":"container-fw","class":"zakatcalc"},"columns":[{"settings":{"element":"gva_column"},"col_lg":12,"elements":[{"settings":{"content":"\r\n\r\n \r\n \r\n \r\n \r\nSmart Zakat Calculator\r\n A precise and comprehensive tool\r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n \r\n \r\n Money & Savings\r\n \r\n \r\n \r\n Cash (on hand or at home)\r\n \r\n \r\n $\r\n \r\n \r\n \r\n Bank balances\r\n \r\n \r\n $\r\n \r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n Gold & Silver\r\n \r\n \r\n Refresh Prices\r\n \r\n \r\n \r\n \r\n \r\n Gold weight (grams)\r\n \r\n \r\n \r\n \r\n Current gold price per gram\r\n \r\n Live\r\n \r\n \r\n \r\n \r\n $ / gram\r\n \r\n \r\n \r\n\r\n \r\n \r\n Silver weight (grams)\r\n \r\n \r\n \r\n \r\n Current silver price per gram\r\n \r\n Live\r\n \r\n \r\n \r\n \r\n $ / gram\r\n \r\n \r\n \r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n Zakat Summary\r\n \r\n \r\n Total assets:\r\n 0.00 $\r\n \r\n \r\n Net zakatable assets:\r\n 0.00 $\r\n \r\n \r\n Nisab value (85g gold):\r\n ...\r\n \r\n \r\n Enter data to check eligibility\r\n \r\n \r\n \r\n\r\n \r\n \r\n Zakat due (2.5%)\r\n 0.00 $\r\n \r\n \r\n <a>\r\n \r\n Contact via WhatsApp for consultation and donation\r\n </a>\r\n \r\n \r\n \r\n \r\n\r\n\r\n// Zakat Calculator Logic\r\nlet zakatcalculatorPricesLoaded = false;\r\n\r\n// Initialize calculator when DOM is loaded\r\ndocument.addEventListener('DOMContentLoaded', () => {\r\n zakatcalculatorFetchPrices();\r\n zakatcalculatorCalculate();\r\n \r\n // Add input event listeners for real-time calculation\r\n const inputs = document.querySelectorAll('.zakatcalculator-section__input');\r\n inputs.forEach(input => {\r\n input.addEventListener('input', zakatcalculatorCalculate);\r\n });\r\n \r\n // Format numbers as user types\r\n inputs.forEach(input => {\r\n input.addEventListener('blur', function() {\r\n if (this.value) {\r\n const value = parseFloat(this.value);\r\n if (!isNaN(value)) {\r\n this.value = value.toLocaleString('en-US', {\r\n minimumFractionDigits: 2,\r\n maximumFractionDigits: 2\r\n });\r\n }\r\n }\r\n });\r\n \r\n input.addEventListener('focus', function() {\r\n if (this.value) {\r\n this.value = this.value.replace(/[^\\d.]/g, '');\r\n }\r\n });\r\n });\r\n});\r\n\r\n// Fetch metal prices\r\nasync function zakatcalculatorFetchPrices() {\r\n const goldInput = document.getElementById('goldPrice');\r\n const silverInput = document.getElementById('silverPrice');\r\n const refreshButton = document.querySelector('.zakatcalculator-section__refresh-button');\r\n const refreshIcon = document.querySelector('.zakatcalculator-section__refresh-icon');\r\n \r\n if (!refreshButton || !refreshIcon) return;\r\n \r\n // Show loading state\r\n refreshButton.disabled = true;\r\n refreshIcon.classList.add('zakatcalculator-section__refresh-icon--spinning');\r\n goldInput.classList.add('zakatcalculator-section__input--loading');\r\n silverInput.classList.add('zakatcalculator-section__input--loading');\r\n \r\n try {\r\n // Simulate API call with delay\r\n await new Promise(resolve => setTimeout(resolve, 1500));\r\n \r\n // Mock data (in a real app, you would fetch from an API)\r\n const liveGoldPrice = 76.50;\r\n const liveSilverPrice = 0.95;\r\n \r\n // Update inputs\r\n goldInput.value = liveGoldPrice.toFixed(2);\r\n silverInput.value = liveSilverPrice.toFixed(2);\r\n \r\n // Remove loading state\r\n goldInput.classList.remove('zakatcalculator-section__input--loading');\r\n silverInput.classList.remove('zakatcalculator-section__input--loading');\r\n goldInput.classList.add('zakatcalculator-section__input--valid');\r\n silverInput.classList.add('zakatcalculator-section__input--valid');\r\n \r\n zakatcalculatorPricesLoaded = true;\r\n \r\n // Show success feedback\r\n refreshButton.innerHTML = ' Updated';\r\n refreshButton.style.backgroundColor = '#617f67';\r\n refreshButton.style.color = 'white';\r\n \r\n setTimeout(() => {\r\n refreshButton.innerHTML = ' Refresh Prices';\r\n refreshButton.style.backgroundColor = '';\r\n refreshButton.style.color = '';\r\n }, 2000);\r\n \r\n } catch (error) {\r\n console.error(\"Failed to fetch prices\", error);\r\n \r\n // Fallback values\r\n goldInput.value = 75.00;\r\n silverInput.value = 0.90;\r\n \r\n // Show error state\r\n goldInput.classList.remove('zakatcalculator-section__input--loading');\r\n silverInput.classList.remove('zakatcalculator-section__input--loading');\r\n goldInput.classList.add('zakatcalculator-section__input--invalid');\r\n silverInput.classList.add('zakatcalculator-section__input--invalid');\r\n \r\n refreshButton.innerHTML = ' Update Failed';\r\n refreshButton.style.backgroundColor = '#dc2626';\r\n refreshButton.style.color = 'white';\r\n \r\n setTimeout(() => {\r\n refreshButton.innerHTML = ' Refresh Prices';\r\n refreshButton.style.backgroundColor = '';\r\n refreshButton.style.color = '';\r\n }, 2000);\r\n \r\n } finally {\r\n refreshButton.disabled = false;\r\n refreshIcon.classList.remove('zakatcalculator-section__refresh-icon--spinning');\r\n \r\n // Recalculate zakat\r\n zakatcalculatorCalculate();\r\n }\r\n}\r\n\r\n// Calculate zakat\r\nfunction zakatcalculatorCalculate() {\r\n const cashHand = parseFloat(document.getElementById('cashHand').value) || 0;\r\n const cashBank = parseFloat(document.getElementById('cashBank').value) || 0;\r\n const goldWeight = parseFloat(document.getElementById('goldWeight').value) || 0;\r\n const goldPrice = parseFloat(document.getElementById('goldPrice').value) || 0;\r\n const silverWeight = parseFloat(document.getElementById('silverWeight').value) || 0;\r\n const silverPrice = parseFloat(document.getElementById('silverPrice').value) || 0;\r\n \r\n // Calculate totals\r\n const totalAssets = cashHand + cashBank + (goldWeight * goldPrice) + (silverWeight * silverPrice);\r\n const nisabThreshold = 85 * goldPrice;\r\n \r\n // Update display\r\n document.getElementById('totalAssetsDisplay').textContent = \r\n formatCurrency(totalAssets);\r\n \r\n document.getElementById('netAssetsDisplay').textContent = \r\n formatCurrency(totalAssets);\r\n \r\n if (goldPrice > 0) {\r\n document.getElementById('nisabValueDisplay').textContent = \r\n formatCurrency(nisabThreshold);\r\n } else {\r\n document.getElementById('nisabValueDisplay').textContent = '...';\r\n }\r\n \r\n // Update status and final zakat\r\n const statusBadge = document.getElementById('statusBadge');\r\n const finalDisplay = document.getElementById('finalZakatDisplay');\r\n const payButton = document.querySelector('.zakatcalculator-section__pay-button');\r\n \r\n if (totalAssets >= nisabThreshold && goldPrice > 0 && zakatcalculatorPricesLoaded) {\r\n const zakatAmount = totalAssets * 0.025;\r\n finalDisplay.textContent = formatCurrency(zakatAmount);\r\n \r\n // Update status badge\r\n statusBadge.textContent = '✓ Zakat is due (Nisab reached)';\r\n statusBadge.className = 'zakatcalculator-section__status zakatcalculator-section__status--eligible';\r\n \r\n // Enable pay button\r\n payButton.disabled = false;\r\n payButton.innerHTML = ' Pay Zakat Now';\r\n \r\n } else {\r\n finalDisplay.textContent = '0.00 $';\r\n \r\n // Update status badge\r\n if (!zakatcalculatorPricesLoaded) {\r\n statusBadge.textContent = 'Enter data to check eligibility';\r\n statusBadge.className = 'zakatcalculator-section__status zakatcalculator-section__status--not-eligible';\r\n } else if (totalAssets < nisabThreshold) {\r\n statusBadge.textContent = 'Zakat is not due (Nisab not reached)';\r\n statusBadge.className = 'zakatcalculator-section__status zakatcalculator-section__status--not-eligible';\r\n } else {\r\n statusBadge.textContent = 'Enter data to check eligibility';\r\n statusBadge.className = 'zakatcalculator-section__status zakatcalculator-section__status--not-eligible';\r\n }\r\n \r\n // Disable pay button\r\n payButton.disabled = true;\r\n payButton.innerHTML = ' Pay Zakat Now';\r\n }\r\n}\r\n\r\n// Format currency\r\nfunction formatCurrency(amount) {\r\n return new Intl.NumberFormat('en-US', {\r\n style: 'currency',\r\n currency: 'USD',\r\n minimumFractionDigits: 2,\r\n maximumFractionDigits: 2\r\n }).format(amount);\r\n}\r\n\r\n// Add zakat to cart\r\nfunction zakatcalculatorAddToCart() {\r\n const amountText = document.getElementById('finalZakatDisplay').textContent;\r\n const amount = parseFloat(amountText.replace(/[^0-9.-]+/g, \"\"));\r\n \r\n if (amount > 0 && !isNaN(amount)) {\r\n // Use your existing addToCart function\r\n if (typeof addToCart === 'function') {\r\n addToCart('Calculated Zakat', amount, 'Zakat');\r\n } else {\r\n // Fallback if addToCart is not defined\r\n alert(`Calculated Zakat amount: ${amountText}`);\r\n }\r\n } else {\r\n alert(\"Invalid zakat amount. Please check your inputs.\");\r\n }\r\n}\r\n\r\n// Input validation\r\nfunction validateZakatInput(input) {\r\n const value = parseFloat(input.value);\r\n const min = parseFloat(input.getAttribute('min')) || 0;\r\n \r\n if (isNaN(value) || value < min) {\r\n input.classList.add('zakatcalculator-section__input--invalid');\r\n return false;\r\n } else {\r\n input.classList.remove('zakatcalculator-section__input--invalid');\r\n input.classList.add('zakatcalculator-section__input--valid');\r\n return true;\r\n }\r\n}","animate_delay":"0"},"editing":false,"element_name":"gva_text_noeditor"}],"editing":false,"element_name":"gva_column"}],"editing":false,"element_name":"gva_row"},{"settings":{"element":"gva_row","bg_particles":"off","bg_position":"center top","bg_repeat":"no-repeat","bg_attachment":"scroll","bg_size":"cover","style_space":"remove_margin remove_padding remove_padding_col","layout":"container-fw","class":"partner","margin_top":"30","margin_bottom":"30"},"columns":[{"settings":{"element":"gva_column"},"col_lg":12,"elements":[{"settings":{"content":"\r\n \r\n Strategic Partnerships\r\n Our partners in creating hope\r\n \r\n \r\n ","animate_delay":"0"},"editing":false,"element_name":"gva_text_noeditor"},{"settings":{"title_admin":"Partners: Partners Block - en","block_drupal":"views_block__partners_block_2","hidden_title":"on","align_title":"title-align-right","remove_margin":"on","style_text":"text-dark","animate_delay":"0"},"editing":false,"element_name":"gva_drupal_block"}],"editing":false,"element_name":"gva_column"}],"editing":false,"element_name":"gva_row"}]') (Line: 47)
Drupal\gavias_content_builder\Plugin\Field\FieldFormatter\GaviasContentBuilderFormatter->viewElements(Object, 'en') (Line: 89)
Drupal\Core\Field\FormatterBase->view(Object, 'en') (Line: 263)
Drupal\Core\Entity\Entity\EntityViewDisplay->buildMultiple(Array) (Line: 351)
Drupal\Core\Entity\EntityViewBuilder->buildComponents(Array, Array, Array, 'full') (Line: 24)
Drupal\node\NodeViewBuilder->buildComponents(Array, Array, Array, 'full') (Line: 293)
Drupal\Core\Entity\EntityViewBuilder->buildMultiple(Array) (Line: 250)
Drupal\Core\Entity\EntityViewBuilder->build(Array)
call_user_func_array(Array, Array) (Line: 100)
Drupal\Core\Render\Renderer->doTrustedCallback(Array, Array, 'Render #pre_render callbacks must be methods of a class that implements \Drupal\Core\Security\TrustedCallbackInterface or be an anonymous function. The callback was %s. Support for this callback implementation is deprecated in 8.8.0 and will be removed in Drupal 9.0.0. See https://www.drupal.org/node/2966725', 'silenced_deprecation', 'Drupal\Core\Render\Element\RenderCallbackInterface') (Line: 781)
Drupal\Core\Render\Renderer->doCallback('#pre_render', Array, Array) (Line: 372)
Drupal\Core\Render\Renderer->doRender(Array, ) (Line: 200)
Drupal\Core\Render\Renderer->render(Array, ) (Line: 226)
Drupal\Core\Render\MainContent\HtmlRenderer->Drupal\Core\Render\MainContent\{closure}() (Line: 573)
Drupal\Core\Render\Renderer->executeInRenderContext(Object, Object) (Line: 227)
Drupal\Core\Render\MainContent\HtmlRenderer->prepare(Array, Object, Object) (Line: 117)
Drupal\Core\Render\MainContent\HtmlRenderer->renderResponse(Array, Object, Object) (Line: 90)
Drupal\Core\EventSubscriber\MainContentViewSubscriber->onViewRenderArray(Object, 'kernel.view', Object)
call_user_func(Array, Object, 'kernel.view', Object) (Line: 111)
Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher->dispatch('kernel.view', Object) (Line: 156)
Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object, 1) (Line: 68)
Symfony\Component\HttpKernel\HttpKernel->handle(Object, 1, 1) (Line: 57)
Drupal\Core\StackMiddleware\Session->handle(Object, 1, 1) (Line: 47)
Drupal\Core\StackMiddleware\KernelPreHandle->handle(Object, 1, 1) (Line: 191)
Drupal\page_cache\StackMiddleware\PageCache->fetch(Object, 1, 1) (Line: 128)
Drupal\page_cache\StackMiddleware\PageCache->lookup(Object, 1, 1) (Line: 82)
Drupal\page_cache\StackMiddleware\PageCache->handle(Object, 1, 1) (Line: 47)
Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle(Object, 1, 1) (Line: 52)
Drupal\Core\StackMiddleware\NegotiationMiddleware->handle(Object, 1, 1) (Line: 23)
Stack\StackedHttpKernel->handle(Object, 1, 1) (Line: 708)
Drupal\Core\DrupalKernel->handle(Object) (Line: 19)
- Deprecated function: implode(): Passing glue string after array is deprecated. Swap the parameters in element_gva_column->render_content() (line 463 of themes/gavias_kunco/gva_content_builder/gva_column.php).
element_gva_column->render_content(Array, '
Smart Zakat Calculator
A precise and comprehensive tool
Money & Savings
Cash (on hand or at home)
$
Bank balances
$
Gold & Silver
Refresh Prices
Gold weight (grams)
Current gold price per gram
Live
$ / gram
Silver weight (grams)
Current silver price per gram
Live
$ / gram
Zakat Summary
Total assets:
0.00 $
Net zakatable assets:
0.00 $
Nisab value (85g gold):
...
Enter data to check eligibility
Zakat due (2.5%)
0.00 $
<a href="https://wa.me/905057763103" class="sponsorships-btn-secondary sponsorships-btn-full mt-4" target="_blank">
Contact via WhatsApp for consultation and donation
</a>
// Zakat Calculator Logic
let zakatcalculatorPricesLoaded = false;
// Initialize calculator when DOM is loaded
document.addEventListener('DOMContentLoaded', () => {
zakatcalculatorFetchPrices();
zakatcalculatorCalculate();
// Add input event listeners for real-time calculation
const inputs = document.querySelectorAll('.zakatcalculator-section__input');
inputs.forEach(input => {
input.addEventListener('input', zakatcalculatorCalculate);
});
// Format numbers as user types
inputs.forEach(input => {
input.addEventListener('blur', function() {
if (this.value) {
const value = parseFloat(this.value);
if (!isNaN(value)) {
this.value = value.toLocaleString('en-US', {
minimumFractionDigits: 2,
maximumFractionDigits: 2
});
}
}
});
input.addEventListener('focus', function() {
if (this.value) {
this.value = this.value.replace(/[^\d.]/g, '');
}
});
});
});
// Fetch metal prices
async function zakatcalculatorFetchPrices() {
const goldInput = document.getElementById('goldPrice');
const silverInput = document.getElementById('silverPrice');
const refreshButton = document.querySelector('.zakatcalculator-section__refresh-button');
const refreshIcon = document.querySelector('.zakatcalculator-section__refresh-icon');
if (!refreshButton || !refreshIcon) return;
// Show loading state
refreshButton.disabled = true;
refreshIcon.classList.add('zakatcalculator-section__refresh-icon--spinning');
goldInput.classList.add('zakatcalculator-section__input--loading');
silverInput.classList.add('zakatcalculator-section__input--loading');
try {
// Simulate API call with delay
await new Promise(resolve => setTimeout(resolve, 1500));
// Mock data (in a real app, you would fetch from an API)
const liveGoldPrice = 76.50;
const liveSilverPrice = 0.95;
// Update inputs
goldInput.value = liveGoldPrice.toFixed(2);
silverInput.value = liveSilverPrice.toFixed(2);
// Remove loading state
goldInput.classList.remove('zakatcalculator-section__input--loading');
silverInput.classList.remove('zakatcalculator-section__input--loading');
goldInput.classList.add('zakatcalculator-section__input--valid');
silverInput.classList.add('zakatcalculator-section__input--valid');
zakatcalculatorPricesLoaded = true;
// Show success feedback
refreshButton.innerHTML = ' Updated';
refreshButton.style.backgroundColor = '#617f67';
refreshButton.style.color = 'white';
setTimeout(() => {
refreshButton.innerHTML = ' Refresh Prices';
refreshButton.style.backgroundColor = '';
refreshButton.style.color = '';
}, 2000);
} catch (error) {
console.error("Failed to fetch prices", error);
// Fallback values
goldInput.value = 75.00;
silverInput.value = 0.90;
// Show error state
goldInput.classList.remove('zakatcalculator-section__input--loading');
silverInput.classList.remove('zakatcalculator-section__input--loading');
goldInput.classList.add('zakatcalculator-section__input--invalid');
silverInput.classList.add('zakatcalculator-section__input--invalid');
refreshButton.innerHTML = ' Update Failed';
refreshButton.style.backgroundColor = '#dc2626';
refreshButton.style.color = 'white';
setTimeout(() => {
refreshButton.innerHTML = ' Refresh Prices';
refreshButton.style.backgroundColor = '';
refreshButton.style.color = '';
}, 2000);
} finally {
refreshButton.disabled = false;
refreshIcon.classList.remove('zakatcalculator-section__refresh-icon--spinning');
// Recalculate zakat
zakatcalculatorCalculate();
}
}
// Calculate zakat
function zakatcalculatorCalculate() {
const cashHand = parseFloat(document.getElementById('cashHand').value) || 0;
const cashBank = parseFloat(document.getElementById('cashBank').value) || 0;
const goldWeight = parseFloat(document.getElementById('goldWeight').value) || 0;
const goldPrice = parseFloat(document.getElementById('goldPrice').value) || 0;
const silverWeight = parseFloat(document.getElementById('silverWeight').value) || 0;
const silverPrice = parseFloat(document.getElementById('silverPrice').value) || 0;
// Calculate totals
const totalAssets = cashHand + cashBank + (goldWeight * goldPrice) + (silverWeight * silverPrice);
const nisabThreshold = 85 * goldPrice;
// Update display
document.getElementById('totalAssetsDisplay').textContent =
formatCurrency(totalAssets);
document.getElementById('netAssetsDisplay').textContent =
formatCurrency(totalAssets);
if (goldPrice > 0) {
document.getElementById('nisabValueDisplay').textContent =
formatCurrency(nisabThreshold);
} else {
document.getElementById('nisabValueDisplay').textContent = '...';
}
// Update status and final zakat
const statusBadge = document.getElementById('statusBadge');
const finalDisplay = document.getElementById('finalZakatDisplay');
const payButton = document.querySelector('.zakatcalculator-section__pay-button');
if (totalAssets >= nisabThreshold && goldPrice > 0 && zakatcalculatorPricesLoaded) {
const zakatAmount = totalAssets * 0.025;
finalDisplay.textContent = formatCurrency(zakatAmount);
// Update status badge
statusBadge.textContent = '✓ Zakat is due (Nisab reached)';
statusBadge.className = 'zakatcalculator-section__status zakatcalculator-section__status--eligible';
// Enable pay button
payButton.disabled = false;
payButton.innerHTML = ' Pay Zakat Now';
} else {
finalDisplay.textContent = '0.00 $';
// Update status badge
if (!zakatcalculatorPricesLoaded) {
statusBadge.textContent = 'Enter data to check eligibility';
statusBadge.className = 'zakatcalculator-section__status zakatcalculator-section__status--not-eligible';
} else if (totalAssets < nisabThreshold) {
statusBadge.textContent = 'Zakat is not due (Nisab not reached)';
statusBadge.className = 'zakatcalculator-section__status zakatcalculator-section__status--not-eligible';
} else {
statusBadge.textContent = 'Enter data to check eligibility';
statusBadge.className = 'zakatcalculator-section__status zakatcalculator-section__status--not-eligible';
}
// Disable pay button
payButton.disabled = true;
payButton.innerHTML = ' Pay Zakat Now';
}
}
// Format currency
function formatCurrency(amount) {
return new Intl.NumberFormat('en-US', {
style: 'currency',
currency: 'USD',
minimumFractionDigits: 2,
maximumFractionDigits: 2
}).format(amount);
}
// Add zakat to cart
function zakatcalculatorAddToCart() {
const amountText = document.getElementById('finalZakatDisplay').textContent;
const amount = parseFloat(amountText.replace(/[^0-9.-]+/g, ""));
if (amount > 0 && !isNaN(amount)) {
// Use your existing addToCart function
if (typeof addToCart === 'function') {
addToCart('Calculated Zakat', amount, 'Zakat');
} else {
// Fallback if addToCart is not defined
alert(`Calculated Zakat amount: ${amountText}`);
}
} else {
alert("Invalid zakat amount. Please check your inputs.");
}
}
// Input validation
function validateZakatInput(input) {
const value = parseFloat(input.value);
const min = parseFloat(input.getAttribute('min')) || 0;
if (isNaN(value) || value < min) {
input.classList.add('zakatcalculator-section__input--invalid');
return false;
} else {
input.classList.remove('zakatcalculator-section__input--invalid');
input.classList.add('zakatcalculator-section__input--valid');
return true;
}
}') (Line: 110)
gavias_content_builder_render_element('gva_column', Array, '
Smart Zakat Calculator
A precise and comprehensive tool
Money & Savings
Cash (on hand or at home)
$
Bank balances
$
Gold & Silver
Refresh Prices
Gold weight (grams)
Current gold price per gram
Live
$ / gram
Silver weight (grams)
Current silver price per gram
Live
$ / gram
Zakat Summary
Total assets:
0.00 $
Net zakatable assets:
0.00 $
Nisab value (85g gold):
...
Enter data to check eligibility
Zakat due (2.5%)
0.00 $
<a href="https://wa.me/905057763103" class="sponsorships-btn-secondary sponsorships-btn-full mt-4" target="_blank">
Contact via WhatsApp for consultation and donation
</a>
// Zakat Calculator Logic
let zakatcalculatorPricesLoaded = false;
// Initialize calculator when DOM is loaded
document.addEventListener('DOMContentLoaded', () => {
zakatcalculatorFetchPrices();
zakatcalculatorCalculate();
// Add input event listeners for real-time calculation
const inputs = document.querySelectorAll('.zakatcalculator-section__input');
inputs.forEach(input => {
input.addEventListener('input', zakatcalculatorCalculate);
});
// Format numbers as user types
inputs.forEach(input => {
input.addEventListener('blur', function() {
if (this.value) {
const value = parseFloat(this.value);
if (!isNaN(value)) {
this.value = value.toLocaleString('en-US', {
minimumFractionDigits: 2,
maximumFractionDigits: 2
});
}
}
});
input.addEventListener('focus', function() {
if (this.value) {
this.value = this.value.replace(/[^\d.]/g, '');
}
});
});
});
// Fetch metal prices
async function zakatcalculatorFetchPrices() {
const goldInput = document.getElementById('goldPrice');
const silverInput = document.getElementById('silverPrice');
const refreshButton = document.querySelector('.zakatcalculator-section__refresh-button');
const refreshIcon = document.querySelector('.zakatcalculator-section__refresh-icon');
if (!refreshButton || !refreshIcon) return;
// Show loading state
refreshButton.disabled = true;
refreshIcon.classList.add('zakatcalculator-section__refresh-icon--spinning');
goldInput.classList.add('zakatcalculator-section__input--loading');
silverInput.classList.add('zakatcalculator-section__input--loading');
try {
// Simulate API call with delay
await new Promise(resolve => setTimeout(resolve, 1500));
// Mock data (in a real app, you would fetch from an API)
const liveGoldPrice = 76.50;
const liveSilverPrice = 0.95;
// Update inputs
goldInput.value = liveGoldPrice.toFixed(2);
silverInput.value = liveSilverPrice.toFixed(2);
// Remove loading state
goldInput.classList.remove('zakatcalculator-section__input--loading');
silverInput.classList.remove('zakatcalculator-section__input--loading');
goldInput.classList.add('zakatcalculator-section__input--valid');
silverInput.classList.add('zakatcalculator-section__input--valid');
zakatcalculatorPricesLoaded = true;
// Show success feedback
refreshButton.innerHTML = ' Updated';
refreshButton.style.backgroundColor = '#617f67';
refreshButton.style.color = 'white';
setTimeout(() => {
refreshButton.innerHTML = ' Refresh Prices';
refreshButton.style.backgroundColor = '';
refreshButton.style.color = '';
}, 2000);
} catch (error) {
console.error("Failed to fetch prices", error);
// Fallback values
goldInput.value = 75.00;
silverInput.value = 0.90;
// Show error state
goldInput.classList.remove('zakatcalculator-section__input--loading');
silverInput.classList.remove('zakatcalculator-section__input--loading');
goldInput.classList.add('zakatcalculator-section__input--invalid');
silverInput.classList.add('zakatcalculator-section__input--invalid');
refreshButton.innerHTML = ' Update Failed';
refreshButton.style.backgroundColor = '#dc2626';
refreshButton.style.color = 'white';
setTimeout(() => {
refreshButton.innerHTML = ' Refresh Prices';
refreshButton.style.backgroundColor = '';
refreshButton.style.color = '';
}, 2000);
} finally {
refreshButton.disabled = false;
refreshIcon.classList.remove('zakatcalculator-section__refresh-icon--spinning');
// Recalculate zakat
zakatcalculatorCalculate();
}
}
// Calculate zakat
function zakatcalculatorCalculate() {
const cashHand = parseFloat(document.getElementById('cashHand').value) || 0;
const cashBank = parseFloat(document.getElementById('cashBank').value) || 0;
const goldWeight = parseFloat(document.getElementById('goldWeight').value) || 0;
const goldPrice = parseFloat(document.getElementById('goldPrice').value) || 0;
const silverWeight = parseFloat(document.getElementById('silverWeight').value) || 0;
const silverPrice = parseFloat(document.getElementById('silverPrice').value) || 0;
// Calculate totals
const totalAssets = cashHand + cashBank + (goldWeight * goldPrice) + (silverWeight * silverPrice);
const nisabThreshold = 85 * goldPrice;
// Update display
document.getElementById('totalAssetsDisplay').textContent =
formatCurrency(totalAssets);
document.getElementById('netAssetsDisplay').textContent =
formatCurrency(totalAssets);
if (goldPrice > 0) {
document.getElementById('nisabValueDisplay').textContent =
formatCurrency(nisabThreshold);
} else {
document.getElementById('nisabValueDisplay').textContent = '...';
}
// Update status and final zakat
const statusBadge = document.getElementById('statusBadge');
const finalDisplay = document.getElementById('finalZakatDisplay');
const payButton = document.querySelector('.zakatcalculator-section__pay-button');
if (totalAssets >= nisabThreshold && goldPrice > 0 && zakatcalculatorPricesLoaded) {
const zakatAmount = totalAssets * 0.025;
finalDisplay.textContent = formatCurrency(zakatAmount);
// Update status badge
statusBadge.textContent = '✓ Zakat is due (Nisab reached)';
statusBadge.className = 'zakatcalculator-section__status zakatcalculator-section__status--eligible';
// Enable pay button
payButton.disabled = false;
payButton.innerHTML = ' Pay Zakat Now';
} else {
finalDisplay.textContent = '0.00 $';
// Update status badge
if (!zakatcalculatorPricesLoaded) {
statusBadge.textContent = 'Enter data to check eligibility';
statusBadge.className = 'zakatcalculator-section__status zakatcalculator-section__status--not-eligible';
} else if (totalAssets < nisabThreshold) {
statusBadge.textContent = 'Zakat is not due (Nisab not reached)';
statusBadge.className = 'zakatcalculator-section__status zakatcalculator-section__status--not-eligible';
} else {
statusBadge.textContent = 'Enter data to check eligibility';
statusBadge.className = 'zakatcalculator-section__status zakatcalculator-section__status--not-eligible';
}
// Disable pay button
payButton.disabled = true;
payButton.innerHTML = ' Pay Zakat Now';
}
}
// Format currency
function formatCurrency(amount) {
return new Intl.NumberFormat('en-US', {
style: 'currency',
currency: 'USD',
minimumFractionDigits: 2,
maximumFractionDigits: 2
}).format(amount);
}
// Add zakat to cart
function zakatcalculatorAddToCart() {
const amountText = document.getElementById('finalZakatDisplay').textContent;
const amount = parseFloat(amountText.replace(/[^0-9.-]+/g, ""));
if (amount > 0 && !isNaN(amount)) {
// Use your existing addToCart function
if (typeof addToCart === 'function') {
addToCart('Calculated Zakat', amount, 'Zakat');
} else {
// Fallback if addToCart is not defined
alert(`Calculated Zakat amount: ${amountText}`);
}
} else {
alert("Invalid zakat amount. Please check your inputs.");
}
}
// Input validation
function validateZakatInput(input) {
const value = parseFloat(input.value);
const min = parseFloat(input.getAttribute('min')) || 0;
if (isNaN(value) || value < min) {
input.classList.add('zakatcalculator-section__input--invalid');
return false;
} else {
input.classList.remove('zakatcalculator-section__input--invalid');
input.classList.add('zakatcalculator-section__input--valid');
return true;
}
}') (Line: 58)
gavias_content_builder_render_el(Array) (Line: 22)
gavias_content_builder_frontend('[{"settings":{"bg_particles":"off","bg_position":"center top","bg_repeat":"no-repeat","bg_attachment":"scroll","bg_size":"cover","style_space":"remove_padding","layout":"container-fw"},"columns":[{"settings":{"element":"gva_column","bg_position":"center top","bg_repeat":"no-repeat","bg_attachment":"scroll","bg_size":"cover","el_class":"front"},"col_lg":12,"elements":[{"settings":{"content":"\r\n \r\n \r\n \r\n \r\n Urgent Appeal\r\n \r\n Be a helping hand for them in\r\n times of crisis\r\n \r\n \r\n At \"Wejdan Charity\", we work with full transparency to deliver your donations to those in need in conflict and poverty-stricken areas.\r\n \r\n \r\n <a>\r\n Charity Donations \r\n </a>\r\n <a>\r\n Our Projects \r\n </a>\r\n \r\n \r\n \r\n \r\n","animate_delay":"0"},"editing":false,"element_name":"gva_text_noeditor"}],"editing":false,"element_name":"gva_column"}],"editing":false,"element_name":"gva_row"},{"settings":{"element":"gva_row","bg_particles":"off","bg_position":"center top","bg_repeat":"no-repeat","bg_attachment":"scroll","bg_size":"cover","style_space":"remove_padding","layout":"container","class":"before-help-region"},"columns":[{"settings":{"element":"gva_column"},"col_lg":12,"elements":[{"settings":{"title":"Take action for animals now","link":"#","button_title":"Donation Now","button_align":"button-right-v2","style_text":"text-light","style_button":"btn-theme","donorbox":"off","target":"off","el_class":"margin","animate":"fade-up","animate_delay":"0"},"editing":false,"element_name":"gva_call_to_action"}],"editing":false,"element_name":"gva_column"}],"editing":false,"element_name":"gva_row"},{"settings":{"element":"gva_row","bg_particles":"off","bg_position":"center top","bg_repeat":"no-repeat","bg_attachment":"scroll","bg_size":"cover","style_space":"remove_padding","layout":"container-fw","bg_color":"#f9fafb"},"columns":[{"settings":{"element":"gva_column","bg_position":"center top","bg_repeat":"no-repeat","bg_attachment":"scroll","bg_size":"cover","el_class":"about"},"col_lg":12,"elements":[{"settings":{"content":"\r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n \r\n \r\n Who We Are\r\n \r\n \r\n We plant hope.. \r\n and build people and the future\r\n \r\n \r\n Wejdan Charity is a leading humanitarian organization, founded with an ambitious vision to be a bridge of الخير between donors and those in need.\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n Development Stages\r\n A continuous journey of growth\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n Areas of Work\r\n We reach where the need is\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \"We work with passion to bring smiles\"\r\n \r\n \r\n \r\n \r\n \r\n","animate_delay":"0"},"editing":false,"element_name":"gva_text_noeditor"}],"editing":false,"element_name":"gva_column"}],"editing":false,"element_name":"gva_row"},{"settings":{"element":"gva_row","bg_particles":"off","bg_position":"center top","bg_repeat":"no-repeat","bg_attachment":"scroll","bg_size":"cover","style_space":"remove_margin remove_padding remove_padding_col","layout":"container-fw","class":"partner","margin_top":"30","margin_bottom":"30"},"columns":[{"settings":{"element":"gva_column"},"col_lg":12,"elements":[{"settings":{"content":"\r\n\r\n \r\n \r\n Initiatives & Programs\r\n Our Areas of Work\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n Ongoing Charity\r\n Water wells, mosque construction\r\n \r\n \r\n \r\n \r\n \r\n \r\n Student Sponsorship\r\n Building the future through education\r\n \r\n \r\n \r\n \r\n \r\n \r\n Humanitarian Cases\r\n Patient treatment, surgeries\r\n \r\n \r\n \r\n \r\n \r\n \r\n Development Projects\r\n Empowering productive families\r\n \r\n \r\n<a>Learn more about our programs and initiatives</a>\r\n \r\n","animate_delay":"0"},"editing":false,"element_name":"gva_text_noeditor"}],"editing":false,"element_name":"gva_column"}],"editing":false,"element_name":"gva_row"},{"settings":{"element":"gva_row","bg_particles":"off","bg_position":"center top","bg_repeat":"no-repeat","bg_attachment":"scroll","bg_size":"cover","style_space":"remove_margin remove_padding remove_padding_col","layout":"container","class":"newsfront"},"columns":[{"settings":{"element":"gva_column"},"col_lg":12,"elements":[{"settings":{"content":"\r\n \r\n \r\n Our News\r\n \r\n \r\n \r\nNews that tells the story of giving \r\n \r\n","animate_delay":"0"},"editing":false,"element_name":"gva_text_noeditor"},{"settings":{"title_admin":"news: news Block -en","block_drupal":"views_block__news_block_3","hidden_title":"on","align_title":"title-align-left","remove_margin":"on","style_text":"text-dark","animate_delay":"0"},"editing":false,"element_name":"gva_drupal_block"}],"editing":false,"element_name":"gva_column"}],"editing":false,"element_name":"gva_row"},{"settings":{"bg_particles":"off","bg_position":"center top","bg_repeat":"no-repeat","bg_attachment":"scroll","bg_size":"cover","style_space":"remove_padding","layout":"container-fw","element":"gva_row","class":"sliderfrontpage"},"columns":[{"settings":{"element":"gva_column","bg_position":"center top","bg_repeat":"no-repeat","bg_attachment":"scroll","bg_size":"cover"},"col_lg":12,"elements":[{"settings":{"title_admin":"news: campigns-en","block_drupal":"views_block__news_block_5","hidden_title":"on","align_title":"title-align-right","remove_margin":"on","style_text":"text-dark","animate_delay":"0"},"editing":false,"element_name":"gva_drupal_block"}],"editing":false,"element_name":"gva_column"}],"editing":false,"element_name":"gva_row"},{"settings":{"element":"gva_row","bg_particles":"off","bg_position":"center top","bg_repeat":"no-repeat","bg_attachment":"scroll","bg_size":"cover","style_space":"remove_margin remove_padding remove_padding_col","layout":"container-fw","class":"partner"},"columns":[{"settings":{"element":"gva_column"},"col_lg":12,"elements":[{"settings":{"content":"\r\n \r\n \r\n \r\n Our Distinguished Projects\r\n \r\n \r\n \r\n At Wejdan Charity, we strive to provide support and assistance to communities in need who are affected by disasters, crises, and wars, with the aim of improving quality of life and promoting sustainable development. Our projects span across several areas:\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n Relief Projects\r\n Emergency response to disasters and wars, providing food and medicine.\r\n \r\n<a> Browse Projects </a>\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n Development Projects\r\n Empowering communities and building capacities.\r\n \r\n<a> Browse Projects </a>\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n Seasonal Projects\r\n Ramadan campaigns, Qurbani, and winter clothing.\r\n \r\n<a> Browse Projects </a>\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n Endowment Projects\r\n An investment for the hereafter—mosques, wells, and charitable endowments.\r\n<a> Browse Projects </a>\r\n \r\n \r\n \r\n \r\n","animate_delay":"0"},"editing":false,"element_name":"gva_text_noeditor"}],"editing":false,"element_name":"gva_column"}],"editing":false,"element_name":"gva_row"},{"settings":{"element":"gva_row","bg_particles":"off","bg_position":"center top","bg_repeat":"no-repeat","bg_attachment":"scroll","bg_size":"cover","style_space":"remove_margin remove_padding remove_padding_col","layout":"container-fw","class":"partner"},"columns":[{"settings":{"element":"gva_column"},"col_lg":12,"elements":[{"settings":{"content":"\r\n \r\n \r\n\r\n \r\n \r\n Our Achievements in Numbers\r\n Your trust makes the difference\r\n \r\n \r\n\r\n \r\n \r\n 0\r\n Beneficiaries worldwide\r\n \r\n \r\n \r\n 0\r\n Projects implemented\r\n \r\n \r\n \r\n 0\r\n Countries we operate in\r\n \r\n \r\n \r\n 0\r\n Volunteers\r\n \r\n \r\n \r\n \r\n\r\n\r\n// Enhanced counter animation for facts section\r\nfunction animateFactsCounters() {\r\n const statNumbers = document.querySelectorAll('.facts-section__stat-number');\r\n \r\n const observer = new IntersectionObserver((entries) => {\r\n entries.forEach(entry => {\r\n if (entry.isIntersecting) {\r\n const counter = entry.target;\r\n const target = parseInt(counter.getAttribute('data-target'));\r\n const duration = 2000;\r\n const increment = target / (duration / 16);\r\n \r\n let current = 0;\r\n const updateCounter = () => {\r\n current += increment;\r\n if (current < target) {\r\n // Format number with K for thousands\r\n let displayNum = Math.ceil(current);\r\n if (displayNum >= 1000) {\r\n counter.textContent = (displayNum / 1000).toFixed(1).replace('.0', '') + 'K';\r\n } else {\r\n counter.textContent = displayNum.toLocaleString();\r\n }\r\n requestAnimationFrame(updateCounter);\r\n } else {\r\n // Final formatting\r\n if (target >= 1000) {\r\n counter.textContent = (target / 1000).toFixed(1).replace('.0', '') + 'K';\r\n counter.classList.add('formatted');\r\n } else {\r\n counter.textContent = target.toLocaleString();\r\n }\r\n counter.classList.add('animated');\r\n setTimeout(() => counter.classList.remove('animated'), 600);\r\n }\r\n };\r\n updateCounter();\r\n observer.unobserve(counter);\r\n }\r\n });\r\n }, { threshold: 0.5, rootMargin: '0px 0px -50px 0px' });\r\n \r\n statNumbers.forEach(counter => observer.observe(counter));\r\n}\r\n\r\n// Call this function when DOM is loaded\r\ndocument.addEventListener('DOMContentLoaded', () => {\r\n animateFactsCounters();\r\n});","animate_delay":"0"},"editing":false,"element_name":"gva_text_noeditor"}],"editing":false,"element_name":"gva_column"}],"editing":false,"element_name":"gva_row"},{"settings":{"element":"gva_row","bg_particles":"off","bg_position":"center top","bg_repeat":"no-repeat","bg_attachment":"scroll","bg_size":"cover","style_space":"remove_margin remove_padding remove_padding_col","layout":"container-fw","class":"zakatcalc"},"columns":[{"settings":{"element":"gva_column"},"col_lg":12,"elements":[{"settings":{"content":"\r\n\r\n \r\n \r\n \r\n \r\nSmart Zakat Calculator\r\n A precise and comprehensive tool\r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n \r\n \r\n Money & Savings\r\n \r\n \r\n \r\n Cash (on hand or at home)\r\n \r\n \r\n $\r\n \r\n \r\n \r\n Bank balances\r\n \r\n \r\n $\r\n \r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n Gold & Silver\r\n \r\n \r\n Refresh Prices\r\n \r\n \r\n \r\n \r\n \r\n Gold weight (grams)\r\n \r\n \r\n \r\n \r\n Current gold price per gram\r\n \r\n Live\r\n \r\n \r\n \r\n \r\n $ / gram\r\n \r\n \r\n \r\n\r\n \r\n \r\n Silver weight (grams)\r\n \r\n \r\n \r\n \r\n Current silver price per gram\r\n \r\n Live\r\n \r\n \r\n \r\n \r\n $ / gram\r\n \r\n \r\n \r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n Zakat Summary\r\n \r\n \r\n Total assets:\r\n 0.00 $\r\n \r\n \r\n Net zakatable assets:\r\n 0.00 $\r\n \r\n \r\n Nisab value (85g gold):\r\n ...\r\n \r\n \r\n Enter data to check eligibility\r\n \r\n \r\n \r\n\r\n \r\n \r\n Zakat due (2.5%)\r\n 0.00 $\r\n \r\n \r\n <a>\r\n \r\n Contact via WhatsApp for consultation and donation\r\n </a>\r\n \r\n \r\n \r\n \r\n\r\n\r\n// Zakat Calculator Logic\r\nlet zakatcalculatorPricesLoaded = false;\r\n\r\n// Initialize calculator when DOM is loaded\r\ndocument.addEventListener('DOMContentLoaded', () => {\r\n zakatcalculatorFetchPrices();\r\n zakatcalculatorCalculate();\r\n \r\n // Add input event listeners for real-time calculation\r\n const inputs = document.querySelectorAll('.zakatcalculator-section__input');\r\n inputs.forEach(input => {\r\n input.addEventListener('input', zakatcalculatorCalculate);\r\n });\r\n \r\n // Format numbers as user types\r\n inputs.forEach(input => {\r\n input.addEventListener('blur', function() {\r\n if (this.value) {\r\n const value = parseFloat(this.value);\r\n if (!isNaN(value)) {\r\n this.value = value.toLocaleString('en-US', {\r\n minimumFractionDigits: 2,\r\n maximumFractionDigits: 2\r\n });\r\n }\r\n }\r\n });\r\n \r\n input.addEventListener('focus', function() {\r\n if (this.value) {\r\n this.value = this.value.replace(/[^\\d.]/g, '');\r\n }\r\n });\r\n });\r\n});\r\n\r\n// Fetch metal prices\r\nasync function zakatcalculatorFetchPrices() {\r\n const goldInput = document.getElementById('goldPrice');\r\n const silverInput = document.getElementById('silverPrice');\r\n const refreshButton = document.querySelector('.zakatcalculator-section__refresh-button');\r\n const refreshIcon = document.querySelector('.zakatcalculator-section__refresh-icon');\r\n \r\n if (!refreshButton || !refreshIcon) return;\r\n \r\n // Show loading state\r\n refreshButton.disabled = true;\r\n refreshIcon.classList.add('zakatcalculator-section__refresh-icon--spinning');\r\n goldInput.classList.add('zakatcalculator-section__input--loading');\r\n silverInput.classList.add('zakatcalculator-section__input--loading');\r\n \r\n try {\r\n // Simulate API call with delay\r\n await new Promise(resolve => setTimeout(resolve, 1500));\r\n \r\n // Mock data (in a real app, you would fetch from an API)\r\n const liveGoldPrice = 76.50;\r\n const liveSilverPrice = 0.95;\r\n \r\n // Update inputs\r\n goldInput.value = liveGoldPrice.toFixed(2);\r\n silverInput.value = liveSilverPrice.toFixed(2);\r\n \r\n // Remove loading state\r\n goldInput.classList.remove('zakatcalculator-section__input--loading');\r\n silverInput.classList.remove('zakatcalculator-section__input--loading');\r\n goldInput.classList.add('zakatcalculator-section__input--valid');\r\n silverInput.classList.add('zakatcalculator-section__input--valid');\r\n \r\n zakatcalculatorPricesLoaded = true;\r\n \r\n // Show success feedback\r\n refreshButton.innerHTML = ' Updated';\r\n refreshButton.style.backgroundColor = '#617f67';\r\n refreshButton.style.color = 'white';\r\n \r\n setTimeout(() => {\r\n refreshButton.innerHTML = ' Refresh Prices';\r\n refreshButton.style.backgroundColor = '';\r\n refreshButton.style.color = '';\r\n }, 2000);\r\n \r\n } catch (error) {\r\n console.error(\"Failed to fetch prices\", error);\r\n \r\n // Fallback values\r\n goldInput.value = 75.00;\r\n silverInput.value = 0.90;\r\n \r\n // Show error state\r\n goldInput.classList.remove('zakatcalculator-section__input--loading');\r\n silverInput.classList.remove('zakatcalculator-section__input--loading');\r\n goldInput.classList.add('zakatcalculator-section__input--invalid');\r\n silverInput.classList.add('zakatcalculator-section__input--invalid');\r\n \r\n refreshButton.innerHTML = ' Update Failed';\r\n refreshButton.style.backgroundColor = '#dc2626';\r\n refreshButton.style.color = 'white';\r\n \r\n setTimeout(() => {\r\n refreshButton.innerHTML = ' Refresh Prices';\r\n refreshButton.style.backgroundColor = '';\r\n refreshButton.style.color = '';\r\n }, 2000);\r\n \r\n } finally {\r\n refreshButton.disabled = false;\r\n refreshIcon.classList.remove('zakatcalculator-section__refresh-icon--spinning');\r\n \r\n // Recalculate zakat\r\n zakatcalculatorCalculate();\r\n }\r\n}\r\n\r\n// Calculate zakat\r\nfunction zakatcalculatorCalculate() {\r\n const cashHand = parseFloat(document.getElementById('cashHand').value) || 0;\r\n const cashBank = parseFloat(document.getElementById('cashBank').value) || 0;\r\n const goldWeight = parseFloat(document.getElementById('goldWeight').value) || 0;\r\n const goldPrice = parseFloat(document.getElementById('goldPrice').value) || 0;\r\n const silverWeight = parseFloat(document.getElementById('silverWeight').value) || 0;\r\n const silverPrice = parseFloat(document.getElementById('silverPrice').value) || 0;\r\n \r\n // Calculate totals\r\n const totalAssets = cashHand + cashBank + (goldWeight * goldPrice) + (silverWeight * silverPrice);\r\n const nisabThreshold = 85 * goldPrice;\r\n \r\n // Update display\r\n document.getElementById('totalAssetsDisplay').textContent = \r\n formatCurrency(totalAssets);\r\n \r\n document.getElementById('netAssetsDisplay').textContent = \r\n formatCurrency(totalAssets);\r\n \r\n if (goldPrice > 0) {\r\n document.getElementById('nisabValueDisplay').textContent = \r\n formatCurrency(nisabThreshold);\r\n } else {\r\n document.getElementById('nisabValueDisplay').textContent = '...';\r\n }\r\n \r\n // Update status and final zakat\r\n const statusBadge = document.getElementById('statusBadge');\r\n const finalDisplay = document.getElementById('finalZakatDisplay');\r\n const payButton = document.querySelector('.zakatcalculator-section__pay-button');\r\n \r\n if (totalAssets >= nisabThreshold && goldPrice > 0 && zakatcalculatorPricesLoaded) {\r\n const zakatAmount = totalAssets * 0.025;\r\n finalDisplay.textContent = formatCurrency(zakatAmount);\r\n \r\n // Update status badge\r\n statusBadge.textContent = '✓ Zakat is due (Nisab reached)';\r\n statusBadge.className = 'zakatcalculator-section__status zakatcalculator-section__status--eligible';\r\n \r\n // Enable pay button\r\n payButton.disabled = false;\r\n payButton.innerHTML = ' Pay Zakat Now';\r\n \r\n } else {\r\n finalDisplay.textContent = '0.00 $';\r\n \r\n // Update status badge\r\n if (!zakatcalculatorPricesLoaded) {\r\n statusBadge.textContent = 'Enter data to check eligibility';\r\n statusBadge.className = 'zakatcalculator-section__status zakatcalculator-section__status--not-eligible';\r\n } else if (totalAssets < nisabThreshold) {\r\n statusBadge.textContent = 'Zakat is not due (Nisab not reached)';\r\n statusBadge.className = 'zakatcalculator-section__status zakatcalculator-section__status--not-eligible';\r\n } else {\r\n statusBadge.textContent = 'Enter data to check eligibility';\r\n statusBadge.className = 'zakatcalculator-section__status zakatcalculator-section__status--not-eligible';\r\n }\r\n \r\n // Disable pay button\r\n payButton.disabled = true;\r\n payButton.innerHTML = ' Pay Zakat Now';\r\n }\r\n}\r\n\r\n// Format currency\r\nfunction formatCurrency(amount) {\r\n return new Intl.NumberFormat('en-US', {\r\n style: 'currency',\r\n currency: 'USD',\r\n minimumFractionDigits: 2,\r\n maximumFractionDigits: 2\r\n }).format(amount);\r\n}\r\n\r\n// Add zakat to cart\r\nfunction zakatcalculatorAddToCart() {\r\n const amountText = document.getElementById('finalZakatDisplay').textContent;\r\n const amount = parseFloat(amountText.replace(/[^0-9.-]+/g, \"\"));\r\n \r\n if (amount > 0 && !isNaN(amount)) {\r\n // Use your existing addToCart function\r\n if (typeof addToCart === 'function') {\r\n addToCart('Calculated Zakat', amount, 'Zakat');\r\n } else {\r\n // Fallback if addToCart is not defined\r\n alert(`Calculated Zakat amount: ${amountText}`);\r\n }\r\n } else {\r\n alert(\"Invalid zakat amount. Please check your inputs.\");\r\n }\r\n}\r\n\r\n// Input validation\r\nfunction validateZakatInput(input) {\r\n const value = parseFloat(input.value);\r\n const min = parseFloat(input.getAttribute('min')) || 0;\r\n \r\n if (isNaN(value) || value < min) {\r\n input.classList.add('zakatcalculator-section__input--invalid');\r\n return false;\r\n } else {\r\n input.classList.remove('zakatcalculator-section__input--invalid');\r\n input.classList.add('zakatcalculator-section__input--valid');\r\n return true;\r\n }\r\n}","animate_delay":"0"},"editing":false,"element_name":"gva_text_noeditor"}],"editing":false,"element_name":"gva_column"}],"editing":false,"element_name":"gva_row"},{"settings":{"element":"gva_row","bg_particles":"off","bg_position":"center top","bg_repeat":"no-repeat","bg_attachment":"scroll","bg_size":"cover","style_space":"remove_margin remove_padding remove_padding_col","layout":"container-fw","class":"partner","margin_top":"30","margin_bottom":"30"},"columns":[{"settings":{"element":"gva_column"},"col_lg":12,"elements":[{"settings":{"content":"\r\n \r\n Strategic Partnerships\r\n Our partners in creating hope\r\n \r\n \r\n ","animate_delay":"0"},"editing":false,"element_name":"gva_text_noeditor"},{"settings":{"title_admin":"Partners: Partners Block - en","block_drupal":"views_block__partners_block_2","hidden_title":"on","align_title":"title-align-right","remove_margin":"on","style_text":"text-dark","animate_delay":"0"},"editing":false,"element_name":"gva_drupal_block"}],"editing":false,"element_name":"gva_column"}],"editing":false,"element_name":"gva_row"}]') (Line: 47)
Drupal\gavias_content_builder\Plugin\Field\FieldFormatter\GaviasContentBuilderFormatter->viewElements(Object, 'en') (Line: 89)
Drupal\Core\Field\FormatterBase->view(Object, 'en') (Line: 263)
Drupal\Core\Entity\Entity\EntityViewDisplay->buildMultiple(Array) (Line: 351)
Drupal\Core\Entity\EntityViewBuilder->buildComponents(Array, Array, Array, 'full') (Line: 24)
Drupal\node\NodeViewBuilder->buildComponents(Array, Array, Array, 'full') (Line: 293)
Drupal\Core\Entity\EntityViewBuilder->buildMultiple(Array) (Line: 250)
Drupal\Core\Entity\EntityViewBuilder->build(Array)
call_user_func_array(Array, Array) (Line: 100)
Drupal\Core\Render\Renderer->doTrustedCallback(Array, Array, 'Render #pre_render callbacks must be methods of a class that implements \Drupal\Core\Security\TrustedCallbackInterface or be an anonymous function. The callback was %s. Support for this callback implementation is deprecated in 8.8.0 and will be removed in Drupal 9.0.0. See https://www.drupal.org/node/2966725', 'silenced_deprecation', 'Drupal\Core\Render\Element\RenderCallbackInterface') (Line: 781)
Drupal\Core\Render\Renderer->doCallback('#pre_render', Array, Array) (Line: 372)
Drupal\Core\Render\Renderer->doRender(Array, ) (Line: 200)
Drupal\Core\Render\Renderer->render(Array, ) (Line: 226)
Drupal\Core\Render\MainContent\HtmlRenderer->Drupal\Core\Render\MainContent\{closure}() (Line: 573)
Drupal\Core\Render\Renderer->executeInRenderContext(Object, Object) (Line: 227)
Drupal\Core\Render\MainContent\HtmlRenderer->prepare(Array, Object, Object) (Line: 117)
Drupal\Core\Render\MainContent\HtmlRenderer->renderResponse(Array, Object, Object) (Line: 90)
Drupal\Core\EventSubscriber\MainContentViewSubscriber->onViewRenderArray(Object, 'kernel.view', Object)
call_user_func(Array, Object, 'kernel.view', Object) (Line: 111)
Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher->dispatch('kernel.view', Object) (Line: 156)
Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object, 1) (Line: 68)
Symfony\Component\HttpKernel\HttpKernel->handle(Object, 1, 1) (Line: 57)
Drupal\Core\StackMiddleware\Session->handle(Object, 1, 1) (Line: 47)
Drupal\Core\StackMiddleware\KernelPreHandle->handle(Object, 1, 1) (Line: 191)
Drupal\page_cache\StackMiddleware\PageCache->fetch(Object, 1, 1) (Line: 128)
Drupal\page_cache\StackMiddleware\PageCache->lookup(Object, 1, 1) (Line: 82)
Drupal\page_cache\StackMiddleware\PageCache->handle(Object, 1, 1) (Line: 47)
Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle(Object, 1, 1) (Line: 52)
Drupal\Core\StackMiddleware\NegotiationMiddleware->handle(Object, 1, 1) (Line: 23)
Stack\StackedHttpKernel->handle(Object, 1, 1) (Line: 708)
Drupal\Core\DrupalKernel->handle(Object) (Line: 19)
- Deprecated function: implode(): Passing glue string after array is deprecated. Swap the parameters in element_gva_row->render_content() (line 317 of themes/gavias_kunco/gva_content_builder/gva_row.php).
element_gva_row->render_content(Array, '
Smart Zakat Calculator
A precise and comprehensive tool
Money & Savings
Cash (on hand or at home)
$
Bank balances
$
Gold & Silver
Refresh Prices
Gold weight (grams)
Current gold price per gram
Live
$ / gram
Silver weight (grams)
Current silver price per gram
Live
$ / gram
Zakat Summary
Total assets:
0.00 $
Net zakatable assets:
0.00 $
Nisab value (85g gold):
...
Enter data to check eligibility
Zakat due (2.5%)
0.00 $
<a href="https://wa.me/905057763103" class="sponsorships-btn-secondary sponsorships-btn-full mt-4" target="_blank">
Contact via WhatsApp for consultation and donation
</a>
// Zakat Calculator Logic
let zakatcalculatorPricesLoaded = false;
// Initialize calculator when DOM is loaded
document.addEventListener('DOMContentLoaded', () => {
zakatcalculatorFetchPrices();
zakatcalculatorCalculate();
// Add input event listeners for real-time calculation
const inputs = document.querySelectorAll('.zakatcalculator-section__input');
inputs.forEach(input => {
input.addEventListener('input', zakatcalculatorCalculate);
});
// Format numbers as user types
inputs.forEach(input => {
input.addEventListener('blur', function() {
if (this.value) {
const value = parseFloat(this.value);
if (!isNaN(value)) {
this.value = value.toLocaleString('en-US', {
minimumFractionDigits: 2,
maximumFractionDigits: 2
});
}
}
});
input.addEventListener('focus', function() {
if (this.value) {
this.value = this.value.replace(/[^\d.]/g, '');
}
});
});
});
// Fetch metal prices
async function zakatcalculatorFetchPrices() {
const goldInput = document.getElementById('goldPrice');
const silverInput = document.getElementById('silverPrice');
const refreshButton = document.querySelector('.zakatcalculator-section__refresh-button');
const refreshIcon = document.querySelector('.zakatcalculator-section__refresh-icon');
if (!refreshButton || !refreshIcon) return;
// Show loading state
refreshButton.disabled = true;
refreshIcon.classList.add('zakatcalculator-section__refresh-icon--spinning');
goldInput.classList.add('zakatcalculator-section__input--loading');
silverInput.classList.add('zakatcalculator-section__input--loading');
try {
// Simulate API call with delay
await new Promise(resolve => setTimeout(resolve, 1500));
// Mock data (in a real app, you would fetch from an API)
const liveGoldPrice = 76.50;
const liveSilverPrice = 0.95;
// Update inputs
goldInput.value = liveGoldPrice.toFixed(2);
silverInput.value = liveSilverPrice.toFixed(2);
// Remove loading state
goldInput.classList.remove('zakatcalculator-section__input--loading');
silverInput.classList.remove('zakatcalculator-section__input--loading');
goldInput.classList.add('zakatcalculator-section__input--valid');
silverInput.classList.add('zakatcalculator-section__input--valid');
zakatcalculatorPricesLoaded = true;
// Show success feedback
refreshButton.innerHTML = ' Updated';
refreshButton.style.backgroundColor = '#617f67';
refreshButton.style.color = 'white';
setTimeout(() => {
refreshButton.innerHTML = ' Refresh Prices';
refreshButton.style.backgroundColor = '';
refreshButton.style.color = '';
}, 2000);
} catch (error) {
console.error("Failed to fetch prices", error);
// Fallback values
goldInput.value = 75.00;
silverInput.value = 0.90;
// Show error state
goldInput.classList.remove('zakatcalculator-section__input--loading');
silverInput.classList.remove('zakatcalculator-section__input--loading');
goldInput.classList.add('zakatcalculator-section__input--invalid');
silverInput.classList.add('zakatcalculator-section__input--invalid');
refreshButton.innerHTML = ' Update Failed';
refreshButton.style.backgroundColor = '#dc2626';
refreshButton.style.color = 'white';
setTimeout(() => {
refreshButton.innerHTML = ' Refresh Prices';
refreshButton.style.backgroundColor = '';
refreshButton.style.color = '';
}, 2000);
} finally {
refreshButton.disabled = false;
refreshIcon.classList.remove('zakatcalculator-section__refresh-icon--spinning');
// Recalculate zakat
zakatcalculatorCalculate();
}
}
// Calculate zakat
function zakatcalculatorCalculate() {
const cashHand = parseFloat(document.getElementById('cashHand').value) || 0;
const cashBank = parseFloat(document.getElementById('cashBank').value) || 0;
const goldWeight = parseFloat(document.getElementById('goldWeight').value) || 0;
const goldPrice = parseFloat(document.getElementById('goldPrice').value) || 0;
const silverWeight = parseFloat(document.getElementById('silverWeight').value) || 0;
const silverPrice = parseFloat(document.getElementById('silverPrice').value) || 0;
// Calculate totals
const totalAssets = cashHand + cashBank + (goldWeight * goldPrice) + (silverWeight * silverPrice);
const nisabThreshold = 85 * goldPrice;
// Update display
document.getElementById('totalAssetsDisplay').textContent =
formatCurrency(totalAssets);
document.getElementById('netAssetsDisplay').textContent =
formatCurrency(totalAssets);
if (goldPrice > 0) {
document.getElementById('nisabValueDisplay').textContent =
formatCurrency(nisabThreshold);
} else {
document.getElementById('nisabValueDisplay').textContent = '...';
}
// Update status and final zakat
const statusBadge = document.getElementById('statusBadge');
const finalDisplay = document.getElementById('finalZakatDisplay');
const payButton = document.querySelector('.zakatcalculator-section__pay-button');
if (totalAssets >= nisabThreshold && goldPrice > 0 && zakatcalculatorPricesLoaded) {
const zakatAmount = totalAssets * 0.025;
finalDisplay.textContent = formatCurrency(zakatAmount);
// Update status badge
statusBadge.textContent = '✓ Zakat is due (Nisab reached)';
statusBadge.className = 'zakatcalculator-section__status zakatcalculator-section__status--eligible';
// Enable pay button
payButton.disabled = false;
payButton.innerHTML = ' Pay Zakat Now';
} else {
finalDisplay.textContent = '0.00 $';
// Update status badge
if (!zakatcalculatorPricesLoaded) {
statusBadge.textContent = 'Enter data to check eligibility';
statusBadge.className = 'zakatcalculator-section__status zakatcalculator-section__status--not-eligible';
} else if (totalAssets < nisabThreshold) {
statusBadge.textContent = 'Zakat is not due (Nisab not reached)';
statusBadge.className = 'zakatcalculator-section__status zakatcalculator-section__status--not-eligible';
} else {
statusBadge.textContent = 'Enter data to check eligibility';
statusBadge.className = 'zakatcalculator-section__status zakatcalculator-section__status--not-eligible';
}
// Disable pay button
payButton.disabled = true;
payButton.innerHTML = ' Pay Zakat Now';
}
}
// Format currency
function formatCurrency(amount) {
return new Intl.NumberFormat('en-US', {
style: 'currency',
currency: 'USD',
minimumFractionDigits: 2,
maximumFractionDigits: 2
}).format(amount);
}
// Add zakat to cart
function zakatcalculatorAddToCart() {
const amountText = document.getElementById('finalZakatDisplay').textContent;
const amount = parseFloat(amountText.replace(/[^0-9.-]+/g, ""));
if (amount > 0 && !isNaN(amount)) {
// Use your existing addToCart function
if (typeof addToCart === 'function') {
addToCart('Calculated Zakat', amount, 'Zakat');
} else {
// Fallback if addToCart is not defined
alert(`Calculated Zakat amount: ${amountText}`);
}
} else {
alert("Invalid zakat amount. Please check your inputs.");
}
}
// Input validation
function validateZakatInput(input) {
const value = parseFloat(input.value);
const min = parseFloat(input.getAttribute('min')) || 0;
if (isNaN(value) || value < min) {
input.classList.add('zakatcalculator-section__input--invalid');
return false;
} else {
input.classList.remove('zakatcalculator-section__input--invalid');
input.classList.add('zakatcalculator-section__input--valid');
return true;
}
}
') (Line: 110)
gavias_content_builder_render_element('gva_row', Array, '
Smart Zakat Calculator
A precise and comprehensive tool
Money & Savings
Cash (on hand or at home)
$
Bank balances
$
Gold & Silver
Refresh Prices
Gold weight (grams)
Current gold price per gram
Live
$ / gram
Silver weight (grams)
Current silver price per gram
Live
$ / gram
Zakat Summary
Total assets:
0.00 $
Net zakatable assets:
0.00 $
Nisab value (85g gold):
...
Enter data to check eligibility
Zakat due (2.5%)
0.00 $
<a href="https://wa.me/905057763103" class="sponsorships-btn-secondary sponsorships-btn-full mt-4" target="_blank">
Contact via WhatsApp for consultation and donation
</a>
// Zakat Calculator Logic
let zakatcalculatorPricesLoaded = false;
// Initialize calculator when DOM is loaded
document.addEventListener('DOMContentLoaded', () => {
zakatcalculatorFetchPrices();
zakatcalculatorCalculate();
// Add input event listeners for real-time calculation
const inputs = document.querySelectorAll('.zakatcalculator-section__input');
inputs.forEach(input => {
input.addEventListener('input', zakatcalculatorCalculate);
});
// Format numbers as user types
inputs.forEach(input => {
input.addEventListener('blur', function() {
if (this.value) {
const value = parseFloat(this.value);
if (!isNaN(value)) {
this.value = value.toLocaleString('en-US', {
minimumFractionDigits: 2,
maximumFractionDigits: 2
});
}
}
});
input.addEventListener('focus', function() {
if (this.value) {
this.value = this.value.replace(/[^\d.]/g, '');
}
});
});
});
// Fetch metal prices
async function zakatcalculatorFetchPrices() {
const goldInput = document.getElementById('goldPrice');
const silverInput = document.getElementById('silverPrice');
const refreshButton = document.querySelector('.zakatcalculator-section__refresh-button');
const refreshIcon = document.querySelector('.zakatcalculator-section__refresh-icon');
if (!refreshButton || !refreshIcon) return;
// Show loading state
refreshButton.disabled = true;
refreshIcon.classList.add('zakatcalculator-section__refresh-icon--spinning');
goldInput.classList.add('zakatcalculator-section__input--loading');
silverInput.classList.add('zakatcalculator-section__input--loading');
try {
// Simulate API call with delay
await new Promise(resolve => setTimeout(resolve, 1500));
// Mock data (in a real app, you would fetch from an API)
const liveGoldPrice = 76.50;
const liveSilverPrice = 0.95;
// Update inputs
goldInput.value = liveGoldPrice.toFixed(2);
silverInput.value = liveSilverPrice.toFixed(2);
// Remove loading state
goldInput.classList.remove('zakatcalculator-section__input--loading');
silverInput.classList.remove('zakatcalculator-section__input--loading');
goldInput.classList.add('zakatcalculator-section__input--valid');
silverInput.classList.add('zakatcalculator-section__input--valid');
zakatcalculatorPricesLoaded = true;
// Show success feedback
refreshButton.innerHTML = ' Updated';
refreshButton.style.backgroundColor = '#617f67';
refreshButton.style.color = 'white';
setTimeout(() => {
refreshButton.innerHTML = ' Refresh Prices';
refreshButton.style.backgroundColor = '';
refreshButton.style.color = '';
}, 2000);
} catch (error) {
console.error("Failed to fetch prices", error);
// Fallback values
goldInput.value = 75.00;
silverInput.value = 0.90;
// Show error state
goldInput.classList.remove('zakatcalculator-section__input--loading');
silverInput.classList.remove('zakatcalculator-section__input--loading');
goldInput.classList.add('zakatcalculator-section__input--invalid');
silverInput.classList.add('zakatcalculator-section__input--invalid');
refreshButton.innerHTML = ' Update Failed';
refreshButton.style.backgroundColor = '#dc2626';
refreshButton.style.color = 'white';
setTimeout(() => {
refreshButton.innerHTML = ' Refresh Prices';
refreshButton.style.backgroundColor = '';
refreshButton.style.color = '';
}, 2000);
} finally {
refreshButton.disabled = false;
refreshIcon.classList.remove('zakatcalculator-section__refresh-icon--spinning');
// Recalculate zakat
zakatcalculatorCalculate();
}
}
// Calculate zakat
function zakatcalculatorCalculate() {
const cashHand = parseFloat(document.getElementById('cashHand').value) || 0;
const cashBank = parseFloat(document.getElementById('cashBank').value) || 0;
const goldWeight = parseFloat(document.getElementById('goldWeight').value) || 0;
const goldPrice = parseFloat(document.getElementById('goldPrice').value) || 0;
const silverWeight = parseFloat(document.getElementById('silverWeight').value) || 0;
const silverPrice = parseFloat(document.getElementById('silverPrice').value) || 0;
// Calculate totals
const totalAssets = cashHand + cashBank + (goldWeight * goldPrice) + (silverWeight * silverPrice);
const nisabThreshold = 85 * goldPrice;
// Update display
document.getElementById('totalAssetsDisplay').textContent =
formatCurrency(totalAssets);
document.getElementById('netAssetsDisplay').textContent =
formatCurrency(totalAssets);
if (goldPrice > 0) {
document.getElementById('nisabValueDisplay').textContent =
formatCurrency(nisabThreshold);
} else {
document.getElementById('nisabValueDisplay').textContent = '...';
}
// Update status and final zakat
const statusBadge = document.getElementById('statusBadge');
const finalDisplay = document.getElementById('finalZakatDisplay');
const payButton = document.querySelector('.zakatcalculator-section__pay-button');
if (totalAssets >= nisabThreshold && goldPrice > 0 && zakatcalculatorPricesLoaded) {
const zakatAmount = totalAssets * 0.025;
finalDisplay.textContent = formatCurrency(zakatAmount);
// Update status badge
statusBadge.textContent = '✓ Zakat is due (Nisab reached)';
statusBadge.className = 'zakatcalculator-section__status zakatcalculator-section__status--eligible';
// Enable pay button
payButton.disabled = false;
payButton.innerHTML = ' Pay Zakat Now';
} else {
finalDisplay.textContent = '0.00 $';
// Update status badge
if (!zakatcalculatorPricesLoaded) {
statusBadge.textContent = 'Enter data to check eligibility';
statusBadge.className = 'zakatcalculator-section__status zakatcalculator-section__status--not-eligible';
} else if (totalAssets < nisabThreshold) {
statusBadge.textContent = 'Zakat is not due (Nisab not reached)';
statusBadge.className = 'zakatcalculator-section__status zakatcalculator-section__status--not-eligible';
} else {
statusBadge.textContent = 'Enter data to check eligibility';
statusBadge.className = 'zakatcalculator-section__status zakatcalculator-section__status--not-eligible';
}
// Disable pay button
payButton.disabled = true;
payButton.innerHTML = ' Pay Zakat Now';
}
}
// Format currency
function formatCurrency(amount) {
return new Intl.NumberFormat('en-US', {
style: 'currency',
currency: 'USD',
minimumFractionDigits: 2,
maximumFractionDigits: 2
}).format(amount);
}
// Add zakat to cart
function zakatcalculatorAddToCart() {
const amountText = document.getElementById('finalZakatDisplay').textContent;
const amount = parseFloat(amountText.replace(/[^0-9.-]+/g, ""));
if (amount > 0 && !isNaN(amount)) {
// Use your existing addToCart function
if (typeof addToCart === 'function') {
addToCart('Calculated Zakat', amount, 'Zakat');
} else {
// Fallback if addToCart is not defined
alert(`Calculated Zakat amount: ${amountText}`);
}
} else {
alert("Invalid zakat amount. Please check your inputs.");
}
}
// Input validation
function validateZakatInput(input) {
const value = parseFloat(input.value);
const min = parseFloat(input.getAttribute('min')) || 0;
if (isNaN(value) || value < min) {
input.classList.add('zakatcalculator-section__input--invalid');
return false;
} else {
input.classList.remove('zakatcalculator-section__input--invalid');
input.classList.add('zakatcalculator-section__input--valid');
return true;
}
}
') (Line: 62)
gavias_content_builder_render_el(Array) (Line: 22)
gavias_content_builder_frontend('[{"settings":{"bg_particles":"off","bg_position":"center top","bg_repeat":"no-repeat","bg_attachment":"scroll","bg_size":"cover","style_space":"remove_padding","layout":"container-fw"},"columns":[{"settings":{"element":"gva_column","bg_position":"center top","bg_repeat":"no-repeat","bg_attachment":"scroll","bg_size":"cover","el_class":"front"},"col_lg":12,"elements":[{"settings":{"content":"\r\n \r\n \r\n \r\n \r\n Urgent Appeal\r\n \r\n Be a helping hand for them in\r\n times of crisis\r\n \r\n \r\n At \"Wejdan Charity\", we work with full transparency to deliver your donations to those in need in conflict and poverty-stricken areas.\r\n \r\n \r\n <a>\r\n Charity Donations \r\n </a>\r\n <a>\r\n Our Projects \r\n </a>\r\n \r\n \r\n \r\n \r\n","animate_delay":"0"},"editing":false,"element_name":"gva_text_noeditor"}],"editing":false,"element_name":"gva_column"}],"editing":false,"element_name":"gva_row"},{"settings":{"element":"gva_row","bg_particles":"off","bg_position":"center top","bg_repeat":"no-repeat","bg_attachment":"scroll","bg_size":"cover","style_space":"remove_padding","layout":"container","class":"before-help-region"},"columns":[{"settings":{"element":"gva_column"},"col_lg":12,"elements":[{"settings":{"title":"Take action for animals now","link":"#","button_title":"Donation Now","button_align":"button-right-v2","style_text":"text-light","style_button":"btn-theme","donorbox":"off","target":"off","el_class":"margin","animate":"fade-up","animate_delay":"0"},"editing":false,"element_name":"gva_call_to_action"}],"editing":false,"element_name":"gva_column"}],"editing":false,"element_name":"gva_row"},{"settings":{"element":"gva_row","bg_particles":"off","bg_position":"center top","bg_repeat":"no-repeat","bg_attachment":"scroll","bg_size":"cover","style_space":"remove_padding","layout":"container-fw","bg_color":"#f9fafb"},"columns":[{"settings":{"element":"gva_column","bg_position":"center top","bg_repeat":"no-repeat","bg_attachment":"scroll","bg_size":"cover","el_class":"about"},"col_lg":12,"elements":[{"settings":{"content":"\r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n \r\n \r\n Who We Are\r\n \r\n \r\n We plant hope.. \r\n and build people and the future\r\n \r\n \r\n Wejdan Charity is a leading humanitarian organization, founded with an ambitious vision to be a bridge of الخير between donors and those in need.\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n Development Stages\r\n A continuous journey of growth\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n Areas of Work\r\n We reach where the need is\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \"We work with passion to bring smiles\"\r\n \r\n \r\n \r\n \r\n \r\n","animate_delay":"0"},"editing":false,"element_name":"gva_text_noeditor"}],"editing":false,"element_name":"gva_column"}],"editing":false,"element_name":"gva_row"},{"settings":{"element":"gva_row","bg_particles":"off","bg_position":"center top","bg_repeat":"no-repeat","bg_attachment":"scroll","bg_size":"cover","style_space":"remove_margin remove_padding remove_padding_col","layout":"container-fw","class":"partner","margin_top":"30","margin_bottom":"30"},"columns":[{"settings":{"element":"gva_column"},"col_lg":12,"elements":[{"settings":{"content":"\r\n\r\n \r\n \r\n Initiatives & Programs\r\n Our Areas of Work\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n Ongoing Charity\r\n Water wells, mosque construction\r\n \r\n \r\n \r\n \r\n \r\n \r\n Student Sponsorship\r\n Building the future through education\r\n \r\n \r\n \r\n \r\n \r\n \r\n Humanitarian Cases\r\n Patient treatment, surgeries\r\n \r\n \r\n \r\n \r\n \r\n \r\n Development Projects\r\n Empowering productive families\r\n \r\n \r\n<a>Learn more about our programs and initiatives</a>\r\n \r\n","animate_delay":"0"},"editing":false,"element_name":"gva_text_noeditor"}],"editing":false,"element_name":"gva_column"}],"editing":false,"element_name":"gva_row"},{"settings":{"element":"gva_row","bg_particles":"off","bg_position":"center top","bg_repeat":"no-repeat","bg_attachment":"scroll","bg_size":"cover","style_space":"remove_margin remove_padding remove_padding_col","layout":"container","class":"newsfront"},"columns":[{"settings":{"element":"gva_column"},"col_lg":12,"elements":[{"settings":{"content":"\r\n \r\n \r\n Our News\r\n \r\n \r\n \r\nNews that tells the story of giving \r\n \r\n","animate_delay":"0"},"editing":false,"element_name":"gva_text_noeditor"},{"settings":{"title_admin":"news: news Block -en","block_drupal":"views_block__news_block_3","hidden_title":"on","align_title":"title-align-left","remove_margin":"on","style_text":"text-dark","animate_delay":"0"},"editing":false,"element_name":"gva_drupal_block"}],"editing":false,"element_name":"gva_column"}],"editing":false,"element_name":"gva_row"},{"settings":{"bg_particles":"off","bg_position":"center top","bg_repeat":"no-repeat","bg_attachment":"scroll","bg_size":"cover","style_space":"remove_padding","layout":"container-fw","element":"gva_row","class":"sliderfrontpage"},"columns":[{"settings":{"element":"gva_column","bg_position":"center top","bg_repeat":"no-repeat","bg_attachment":"scroll","bg_size":"cover"},"col_lg":12,"elements":[{"settings":{"title_admin":"news: campigns-en","block_drupal":"views_block__news_block_5","hidden_title":"on","align_title":"title-align-right","remove_margin":"on","style_text":"text-dark","animate_delay":"0"},"editing":false,"element_name":"gva_drupal_block"}],"editing":false,"element_name":"gva_column"}],"editing":false,"element_name":"gva_row"},{"settings":{"element":"gva_row","bg_particles":"off","bg_position":"center top","bg_repeat":"no-repeat","bg_attachment":"scroll","bg_size":"cover","style_space":"remove_margin remove_padding remove_padding_col","layout":"container-fw","class":"partner"},"columns":[{"settings":{"element":"gva_column"},"col_lg":12,"elements":[{"settings":{"content":"\r\n \r\n \r\n \r\n Our Distinguished Projects\r\n \r\n \r\n \r\n At Wejdan Charity, we strive to provide support and assistance to communities in need who are affected by disasters, crises, and wars, with the aim of improving quality of life and promoting sustainable development. Our projects span across several areas:\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n Relief Projects\r\n Emergency response to disasters and wars, providing food and medicine.\r\n \r\n<a> Browse Projects </a>\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n Development Projects\r\n Empowering communities and building capacities.\r\n \r\n<a> Browse Projects </a>\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n Seasonal Projects\r\n Ramadan campaigns, Qurbani, and winter clothing.\r\n \r\n<a> Browse Projects </a>\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n Endowment Projects\r\n An investment for the hereafter—mosques, wells, and charitable endowments.\r\n<a> Browse Projects </a>\r\n \r\n \r\n \r\n \r\n","animate_delay":"0"},"editing":false,"element_name":"gva_text_noeditor"}],"editing":false,"element_name":"gva_column"}],"editing":false,"element_name":"gva_row"},{"settings":{"element":"gva_row","bg_particles":"off","bg_position":"center top","bg_repeat":"no-repeat","bg_attachment":"scroll","bg_size":"cover","style_space":"remove_margin remove_padding remove_padding_col","layout":"container-fw","class":"partner"},"columns":[{"settings":{"element":"gva_column"},"col_lg":12,"elements":[{"settings":{"content":"\r\n \r\n \r\n\r\n \r\n \r\n Our Achievements in Numbers\r\n Your trust makes the difference\r\n \r\n \r\n\r\n \r\n \r\n 0\r\n Beneficiaries worldwide\r\n \r\n \r\n \r\n 0\r\n Projects implemented\r\n \r\n \r\n \r\n 0\r\n Countries we operate in\r\n \r\n \r\n \r\n 0\r\n Volunteers\r\n \r\n \r\n \r\n \r\n\r\n\r\n// Enhanced counter animation for facts section\r\nfunction animateFactsCounters() {\r\n const statNumbers = document.querySelectorAll('.facts-section__stat-number');\r\n \r\n const observer = new IntersectionObserver((entries) => {\r\n entries.forEach(entry => {\r\n if (entry.isIntersecting) {\r\n const counter = entry.target;\r\n const target = parseInt(counter.getAttribute('data-target'));\r\n const duration = 2000;\r\n const increment = target / (duration / 16);\r\n \r\n let current = 0;\r\n const updateCounter = () => {\r\n current += increment;\r\n if (current < target) {\r\n // Format number with K for thousands\r\n let displayNum = Math.ceil(current);\r\n if (displayNum >= 1000) {\r\n counter.textContent = (displayNum / 1000).toFixed(1).replace('.0', '') + 'K';\r\n } else {\r\n counter.textContent = displayNum.toLocaleString();\r\n }\r\n requestAnimationFrame(updateCounter);\r\n } else {\r\n // Final formatting\r\n if (target >= 1000) {\r\n counter.textContent = (target / 1000).toFixed(1).replace('.0', '') + 'K';\r\n counter.classList.add('formatted');\r\n } else {\r\n counter.textContent = target.toLocaleString();\r\n }\r\n counter.classList.add('animated');\r\n setTimeout(() => counter.classList.remove('animated'), 600);\r\n }\r\n };\r\n updateCounter();\r\n observer.unobserve(counter);\r\n }\r\n });\r\n }, { threshold: 0.5, rootMargin: '0px 0px -50px 0px' });\r\n \r\n statNumbers.forEach(counter => observer.observe(counter));\r\n}\r\n\r\n// Call this function when DOM is loaded\r\ndocument.addEventListener('DOMContentLoaded', () => {\r\n animateFactsCounters();\r\n});","animate_delay":"0"},"editing":false,"element_name":"gva_text_noeditor"}],"editing":false,"element_name":"gva_column"}],"editing":false,"element_name":"gva_row"},{"settings":{"element":"gva_row","bg_particles":"off","bg_position":"center top","bg_repeat":"no-repeat","bg_attachment":"scroll","bg_size":"cover","style_space":"remove_margin remove_padding remove_padding_col","layout":"container-fw","class":"zakatcalc"},"columns":[{"settings":{"element":"gva_column"},"col_lg":12,"elements":[{"settings":{"content":"\r\n\r\n \r\n \r\n \r\n \r\nSmart Zakat Calculator\r\n A precise and comprehensive tool\r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n \r\n \r\n Money & Savings\r\n \r\n \r\n \r\n Cash (on hand or at home)\r\n \r\n \r\n $\r\n \r\n \r\n \r\n Bank balances\r\n \r\n \r\n $\r\n \r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n Gold & Silver\r\n \r\n \r\n Refresh Prices\r\n \r\n \r\n \r\n \r\n \r\n Gold weight (grams)\r\n \r\n \r\n \r\n \r\n Current gold price per gram\r\n \r\n Live\r\n \r\n \r\n \r\n \r\n $ / gram\r\n \r\n \r\n \r\n\r\n \r\n \r\n Silver weight (grams)\r\n \r\n \r\n \r\n \r\n Current silver price per gram\r\n \r\n Live\r\n \r\n \r\n \r\n \r\n $ / gram\r\n \r\n \r\n \r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n Zakat Summary\r\n \r\n \r\n Total assets:\r\n 0.00 $\r\n \r\n \r\n Net zakatable assets:\r\n 0.00 $\r\n \r\n \r\n Nisab value (85g gold):\r\n ...\r\n \r\n \r\n Enter data to check eligibility\r\n \r\n \r\n \r\n\r\n \r\n \r\n Zakat due (2.5%)\r\n 0.00 $\r\n \r\n \r\n <a>\r\n \r\n Contact via WhatsApp for consultation and donation\r\n </a>\r\n \r\n \r\n \r\n \r\n\r\n\r\n// Zakat Calculator Logic\r\nlet zakatcalculatorPricesLoaded = false;\r\n\r\n// Initialize calculator when DOM is loaded\r\ndocument.addEventListener('DOMContentLoaded', () => {\r\n zakatcalculatorFetchPrices();\r\n zakatcalculatorCalculate();\r\n \r\n // Add input event listeners for real-time calculation\r\n const inputs = document.querySelectorAll('.zakatcalculator-section__input');\r\n inputs.forEach(input => {\r\n input.addEventListener('input', zakatcalculatorCalculate);\r\n });\r\n \r\n // Format numbers as user types\r\n inputs.forEach(input => {\r\n input.addEventListener('blur', function() {\r\n if (this.value) {\r\n const value = parseFloat(this.value);\r\n if (!isNaN(value)) {\r\n this.value = value.toLocaleString('en-US', {\r\n minimumFractionDigits: 2,\r\n maximumFractionDigits: 2\r\n });\r\n }\r\n }\r\n });\r\n \r\n input.addEventListener('focus', function() {\r\n if (this.value) {\r\n this.value = this.value.replace(/[^\\d.]/g, '');\r\n }\r\n });\r\n });\r\n});\r\n\r\n// Fetch metal prices\r\nasync function zakatcalculatorFetchPrices() {\r\n const goldInput = document.getElementById('goldPrice');\r\n const silverInput = document.getElementById('silverPrice');\r\n const refreshButton = document.querySelector('.zakatcalculator-section__refresh-button');\r\n const refreshIcon = document.querySelector('.zakatcalculator-section__refresh-icon');\r\n \r\n if (!refreshButton || !refreshIcon) return;\r\n \r\n // Show loading state\r\n refreshButton.disabled = true;\r\n refreshIcon.classList.add('zakatcalculator-section__refresh-icon--spinning');\r\n goldInput.classList.add('zakatcalculator-section__input--loading');\r\n silverInput.classList.add('zakatcalculator-section__input--loading');\r\n \r\n try {\r\n // Simulate API call with delay\r\n await new Promise(resolve => setTimeout(resolve, 1500));\r\n \r\n // Mock data (in a real app, you would fetch from an API)\r\n const liveGoldPrice = 76.50;\r\n const liveSilverPrice = 0.95;\r\n \r\n // Update inputs\r\n goldInput.value = liveGoldPrice.toFixed(2);\r\n silverInput.value = liveSilverPrice.toFixed(2);\r\n \r\n // Remove loading state\r\n goldInput.classList.remove('zakatcalculator-section__input--loading');\r\n silverInput.classList.remove('zakatcalculator-section__input--loading');\r\n goldInput.classList.add('zakatcalculator-section__input--valid');\r\n silverInput.classList.add('zakatcalculator-section__input--valid');\r\n \r\n zakatcalculatorPricesLoaded = true;\r\n \r\n // Show success feedback\r\n refreshButton.innerHTML = ' Updated';\r\n refreshButton.style.backgroundColor = '#617f67';\r\n refreshButton.style.color = 'white';\r\n \r\n setTimeout(() => {\r\n refreshButton.innerHTML = ' Refresh Prices';\r\n refreshButton.style.backgroundColor = '';\r\n refreshButton.style.color = '';\r\n }, 2000);\r\n \r\n } catch (error) {\r\n console.error(\"Failed to fetch prices\", error);\r\n \r\n // Fallback values\r\n goldInput.value = 75.00;\r\n silverInput.value = 0.90;\r\n \r\n // Show error state\r\n goldInput.classList.remove('zakatcalculator-section__input--loading');\r\n silverInput.classList.remove('zakatcalculator-section__input--loading');\r\n goldInput.classList.add('zakatcalculator-section__input--invalid');\r\n silverInput.classList.add('zakatcalculator-section__input--invalid');\r\n \r\n refreshButton.innerHTML = ' Update Failed';\r\n refreshButton.style.backgroundColor = '#dc2626';\r\n refreshButton.style.color = 'white';\r\n \r\n setTimeout(() => {\r\n refreshButton.innerHTML = ' Refresh Prices';\r\n refreshButton.style.backgroundColor = '';\r\n refreshButton.style.color = '';\r\n }, 2000);\r\n \r\n } finally {\r\n refreshButton.disabled = false;\r\n refreshIcon.classList.remove('zakatcalculator-section__refresh-icon--spinning');\r\n \r\n // Recalculate zakat\r\n zakatcalculatorCalculate();\r\n }\r\n}\r\n\r\n// Calculate zakat\r\nfunction zakatcalculatorCalculate() {\r\n const cashHand = parseFloat(document.getElementById('cashHand').value) || 0;\r\n const cashBank = parseFloat(document.getElementById('cashBank').value) || 0;\r\n const goldWeight = parseFloat(document.getElementById('goldWeight').value) || 0;\r\n const goldPrice = parseFloat(document.getElementById('goldPrice').value) || 0;\r\n const silverWeight = parseFloat(document.getElementById('silverWeight').value) || 0;\r\n const silverPrice = parseFloat(document.getElementById('silverPrice').value) || 0;\r\n \r\n // Calculate totals\r\n const totalAssets = cashHand + cashBank + (goldWeight * goldPrice) + (silverWeight * silverPrice);\r\n const nisabThreshold = 85 * goldPrice;\r\n \r\n // Update display\r\n document.getElementById('totalAssetsDisplay').textContent = \r\n formatCurrency(totalAssets);\r\n \r\n document.getElementById('netAssetsDisplay').textContent = \r\n formatCurrency(totalAssets);\r\n \r\n if (goldPrice > 0) {\r\n document.getElementById('nisabValueDisplay').textContent = \r\n formatCurrency(nisabThreshold);\r\n } else {\r\n document.getElementById('nisabValueDisplay').textContent = '...';\r\n }\r\n \r\n // Update status and final zakat\r\n const statusBadge = document.getElementById('statusBadge');\r\n const finalDisplay = document.getElementById('finalZakatDisplay');\r\n const payButton = document.querySelector('.zakatcalculator-section__pay-button');\r\n \r\n if (totalAssets >= nisabThreshold && goldPrice > 0 && zakatcalculatorPricesLoaded) {\r\n const zakatAmount = totalAssets * 0.025;\r\n finalDisplay.textContent = formatCurrency(zakatAmount);\r\n \r\n // Update status badge\r\n statusBadge.textContent = '✓ Zakat is due (Nisab reached)';\r\n statusBadge.className = 'zakatcalculator-section__status zakatcalculator-section__status--eligible';\r\n \r\n // Enable pay button\r\n payButton.disabled = false;\r\n payButton.innerHTML = ' Pay Zakat Now';\r\n \r\n } else {\r\n finalDisplay.textContent = '0.00 $';\r\n \r\n // Update status badge\r\n if (!zakatcalculatorPricesLoaded) {\r\n statusBadge.textContent = 'Enter data to check eligibility';\r\n statusBadge.className = 'zakatcalculator-section__status zakatcalculator-section__status--not-eligible';\r\n } else if (totalAssets < nisabThreshold) {\r\n statusBadge.textContent = 'Zakat is not due (Nisab not reached)';\r\n statusBadge.className = 'zakatcalculator-section__status zakatcalculator-section__status--not-eligible';\r\n } else {\r\n statusBadge.textContent = 'Enter data to check eligibility';\r\n statusBadge.className = 'zakatcalculator-section__status zakatcalculator-section__status--not-eligible';\r\n }\r\n \r\n // Disable pay button\r\n payButton.disabled = true;\r\n payButton.innerHTML = ' Pay Zakat Now';\r\n }\r\n}\r\n\r\n// Format currency\r\nfunction formatCurrency(amount) {\r\n return new Intl.NumberFormat('en-US', {\r\n style: 'currency',\r\n currency: 'USD',\r\n minimumFractionDigits: 2,\r\n maximumFractionDigits: 2\r\n }).format(amount);\r\n}\r\n\r\n// Add zakat to cart\r\nfunction zakatcalculatorAddToCart() {\r\n const amountText = document.getElementById('finalZakatDisplay').textContent;\r\n const amount = parseFloat(amountText.replace(/[^0-9.-]+/g, \"\"));\r\n \r\n if (amount > 0 && !isNaN(amount)) {\r\n // Use your existing addToCart function\r\n if (typeof addToCart === 'function') {\r\n addToCart('Calculated Zakat', amount, 'Zakat');\r\n } else {\r\n // Fallback if addToCart is not defined\r\n alert(`Calculated Zakat amount: ${amountText}`);\r\n }\r\n } else {\r\n alert(\"Invalid zakat amount. Please check your inputs.\");\r\n }\r\n}\r\n\r\n// Input validation\r\nfunction validateZakatInput(input) {\r\n const value = parseFloat(input.value);\r\n const min = parseFloat(input.getAttribute('min')) || 0;\r\n \r\n if (isNaN(value) || value < min) {\r\n input.classList.add('zakatcalculator-section__input--invalid');\r\n return false;\r\n } else {\r\n input.classList.remove('zakatcalculator-section__input--invalid');\r\n input.classList.add('zakatcalculator-section__input--valid');\r\n return true;\r\n }\r\n}","animate_delay":"0"},"editing":false,"element_name":"gva_text_noeditor"}],"editing":false,"element_name":"gva_column"}],"editing":false,"element_name":"gva_row"},{"settings":{"element":"gva_row","bg_particles":"off","bg_position":"center top","bg_repeat":"no-repeat","bg_attachment":"scroll","bg_size":"cover","style_space":"remove_margin remove_padding remove_padding_col","layout":"container-fw","class":"partner","margin_top":"30","margin_bottom":"30"},"columns":[{"settings":{"element":"gva_column"},"col_lg":12,"elements":[{"settings":{"content":"\r\n \r\n Strategic Partnerships\r\n Our partners in creating hope\r\n \r\n \r\n ","animate_delay":"0"},"editing":false,"element_name":"gva_text_noeditor"},{"settings":{"title_admin":"Partners: Partners Block - en","block_drupal":"views_block__partners_block_2","hidden_title":"on","align_title":"title-align-right","remove_margin":"on","style_text":"text-dark","animate_delay":"0"},"editing":false,"element_name":"gva_drupal_block"}],"editing":false,"element_name":"gva_column"}],"editing":false,"element_name":"gva_row"}]') (Line: 47)
Drupal\gavias_content_builder\Plugin\Field\FieldFormatter\GaviasContentBuilderFormatter->viewElements(Object, 'en') (Line: 89)
Drupal\Core\Field\FormatterBase->view(Object, 'en') (Line: 263)
Drupal\Core\Entity\Entity\EntityViewDisplay->buildMultiple(Array) (Line: 351)
Drupal\Core\Entity\EntityViewBuilder->buildComponents(Array, Array, Array, 'full') (Line: 24)
Drupal\node\NodeViewBuilder->buildComponents(Array, Array, Array, 'full') (Line: 293)
Drupal\Core\Entity\EntityViewBuilder->buildMultiple(Array) (Line: 250)
Drupal\Core\Entity\EntityViewBuilder->build(Array)
call_user_func_array(Array, Array) (Line: 100)
Drupal\Core\Render\Renderer->doTrustedCallback(Array, Array, 'Render #pre_render callbacks must be methods of a class that implements \Drupal\Core\Security\TrustedCallbackInterface or be an anonymous function. The callback was %s. Support for this callback implementation is deprecated in 8.8.0 and will be removed in Drupal 9.0.0. See https://www.drupal.org/node/2966725', 'silenced_deprecation', 'Drupal\Core\Render\Element\RenderCallbackInterface') (Line: 781)
Drupal\Core\Render\Renderer->doCallback('#pre_render', Array, Array) (Line: 372)
Drupal\Core\Render\Renderer->doRender(Array, ) (Line: 200)
Drupal\Core\Render\Renderer->render(Array, ) (Line: 226)
Drupal\Core\Render\MainContent\HtmlRenderer->Drupal\Core\Render\MainContent\{closure}() (Line: 573)
Drupal\Core\Render\Renderer->executeInRenderContext(Object, Object) (Line: 227)
Drupal\Core\Render\MainContent\HtmlRenderer->prepare(Array, Object, Object) (Line: 117)
Drupal\Core\Render\MainContent\HtmlRenderer->renderResponse(Array, Object, Object) (Line: 90)
Drupal\Core\EventSubscriber\MainContentViewSubscriber->onViewRenderArray(Object, 'kernel.view', Object)
call_user_func(Array, Object, 'kernel.view', Object) (Line: 111)
Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher->dispatch('kernel.view', Object) (Line: 156)
Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object, 1) (Line: 68)
Symfony\Component\HttpKernel\HttpKernel->handle(Object, 1, 1) (Line: 57)
Drupal\Core\StackMiddleware\Session->handle(Object, 1, 1) (Line: 47)
Drupal\Core\StackMiddleware\KernelPreHandle->handle(Object, 1, 1) (Line: 191)
Drupal\page_cache\StackMiddleware\PageCache->fetch(Object, 1, 1) (Line: 128)
Drupal\page_cache\StackMiddleware\PageCache->lookup(Object, 1, 1) (Line: 82)
Drupal\page_cache\StackMiddleware\PageCache->handle(Object, 1, 1) (Line: 47)
Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle(Object, 1, 1) (Line: 52)
Drupal\Core\StackMiddleware\NegotiationMiddleware->handle(Object, 1, 1) (Line: 23)
Stack\StackedHttpKernel->handle(Object, 1, 1) (Line: 708)
Drupal\Core\DrupalKernel->handle(Object) (Line: 19)
- Deprecated function: implode(): Passing glue string after array is deprecated. Swap the parameters in element_gva_drupal_block->render_content() (line 106 of themes/gavias_kunco/gva_content_builder/gva_drupal_block.php).
element_gva_drupal_block->render_content(Array, '') (Line: 110)
gavias_content_builder_render_element('gva_drupal_block', Array) (Line: 54)
gavias_content_builder_render_el(Array) (Line: 22)
gavias_content_builder_frontend('[{"settings":{"bg_particles":"off","bg_position":"center top","bg_repeat":"no-repeat","bg_attachment":"scroll","bg_size":"cover","style_space":"remove_padding","layout":"container-fw"},"columns":[{"settings":{"element":"gva_column","bg_position":"center top","bg_repeat":"no-repeat","bg_attachment":"scroll","bg_size":"cover","el_class":"front"},"col_lg":12,"elements":[{"settings":{"content":"\r\n \r\n \r\n \r\n \r\n Urgent Appeal\r\n \r\n Be a helping hand for them in\r\n times of crisis\r\n \r\n \r\n At \"Wejdan Charity\", we work with full transparency to deliver your donations to those in need in conflict and poverty-stricken areas.\r\n \r\n \r\n <a>\r\n Charity Donations \r\n </a>\r\n <a>\r\n Our Projects \r\n </a>\r\n \r\n \r\n \r\n \r\n","animate_delay":"0"},"editing":false,"element_name":"gva_text_noeditor"}],"editing":false,"element_name":"gva_column"}],"editing":false,"element_name":"gva_row"},{"settings":{"element":"gva_row","bg_particles":"off","bg_position":"center top","bg_repeat":"no-repeat","bg_attachment":"scroll","bg_size":"cover","style_space":"remove_padding","layout":"container","class":"before-help-region"},"columns":[{"settings":{"element":"gva_column"},"col_lg":12,"elements":[{"settings":{"title":"Take action for animals now","link":"#","button_title":"Donation Now","button_align":"button-right-v2","style_text":"text-light","style_button":"btn-theme","donorbox":"off","target":"off","el_class":"margin","animate":"fade-up","animate_delay":"0"},"editing":false,"element_name":"gva_call_to_action"}],"editing":false,"element_name":"gva_column"}],"editing":false,"element_name":"gva_row"},{"settings":{"element":"gva_row","bg_particles":"off","bg_position":"center top","bg_repeat":"no-repeat","bg_attachment":"scroll","bg_size":"cover","style_space":"remove_padding","layout":"container-fw","bg_color":"#f9fafb"},"columns":[{"settings":{"element":"gva_column","bg_position":"center top","bg_repeat":"no-repeat","bg_attachment":"scroll","bg_size":"cover","el_class":"about"},"col_lg":12,"elements":[{"settings":{"content":"\r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n \r\n \r\n Who We Are\r\n \r\n \r\n We plant hope.. \r\n and build people and the future\r\n \r\n \r\n Wejdan Charity is a leading humanitarian organization, founded with an ambitious vision to be a bridge of الخير between donors and those in need.\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n Development Stages\r\n A continuous journey of growth\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n Areas of Work\r\n We reach where the need is\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \"We work with passion to bring smiles\"\r\n \r\n \r\n \r\n \r\n \r\n","animate_delay":"0"},"editing":false,"element_name":"gva_text_noeditor"}],"editing":false,"element_name":"gva_column"}],"editing":false,"element_name":"gva_row"},{"settings":{"element":"gva_row","bg_particles":"off","bg_position":"center top","bg_repeat":"no-repeat","bg_attachment":"scroll","bg_size":"cover","style_space":"remove_margin remove_padding remove_padding_col","layout":"container-fw","class":"partner","margin_top":"30","margin_bottom":"30"},"columns":[{"settings":{"element":"gva_column"},"col_lg":12,"elements":[{"settings":{"content":"\r\n\r\n \r\n \r\n Initiatives & Programs\r\n Our Areas of Work\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n Ongoing Charity\r\n Water wells, mosque construction\r\n \r\n \r\n \r\n \r\n \r\n \r\n Student Sponsorship\r\n Building the future through education\r\n \r\n \r\n \r\n \r\n \r\n \r\n Humanitarian Cases\r\n Patient treatment, surgeries\r\n \r\n \r\n \r\n \r\n \r\n \r\n Development Projects\r\n Empowering productive families\r\n \r\n \r\n<a>Learn more about our programs and initiatives</a>\r\n \r\n","animate_delay":"0"},"editing":false,"element_name":"gva_text_noeditor"}],"editing":false,"element_name":"gva_column"}],"editing":false,"element_name":"gva_row"},{"settings":{"element":"gva_row","bg_particles":"off","bg_position":"center top","bg_repeat":"no-repeat","bg_attachment":"scroll","bg_size":"cover","style_space":"remove_margin remove_padding remove_padding_col","layout":"container","class":"newsfront"},"columns":[{"settings":{"element":"gva_column"},"col_lg":12,"elements":[{"settings":{"content":"\r\n \r\n \r\n Our News\r\n \r\n \r\n \r\nNews that tells the story of giving \r\n \r\n","animate_delay":"0"},"editing":false,"element_name":"gva_text_noeditor"},{"settings":{"title_admin":"news: news Block -en","block_drupal":"views_block__news_block_3","hidden_title":"on","align_title":"title-align-left","remove_margin":"on","style_text":"text-dark","animate_delay":"0"},"editing":false,"element_name":"gva_drupal_block"}],"editing":false,"element_name":"gva_column"}],"editing":false,"element_name":"gva_row"},{"settings":{"bg_particles":"off","bg_position":"center top","bg_repeat":"no-repeat","bg_attachment":"scroll","bg_size":"cover","style_space":"remove_padding","layout":"container-fw","element":"gva_row","class":"sliderfrontpage"},"columns":[{"settings":{"element":"gva_column","bg_position":"center top","bg_repeat":"no-repeat","bg_attachment":"scroll","bg_size":"cover"},"col_lg":12,"elements":[{"settings":{"title_admin":"news: campigns-en","block_drupal":"views_block__news_block_5","hidden_title":"on","align_title":"title-align-right","remove_margin":"on","style_text":"text-dark","animate_delay":"0"},"editing":false,"element_name":"gva_drupal_block"}],"editing":false,"element_name":"gva_column"}],"editing":false,"element_name":"gva_row"},{"settings":{"element":"gva_row","bg_particles":"off","bg_position":"center top","bg_repeat":"no-repeat","bg_attachment":"scroll","bg_size":"cover","style_space":"remove_margin remove_padding remove_padding_col","layout":"container-fw","class":"partner"},"columns":[{"settings":{"element":"gva_column"},"col_lg":12,"elements":[{"settings":{"content":"\r\n \r\n \r\n \r\n Our Distinguished Projects\r\n \r\n \r\n \r\n At Wejdan Charity, we strive to provide support and assistance to communities in need who are affected by disasters, crises, and wars, with the aim of improving quality of life and promoting sustainable development. Our projects span across several areas:\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n Relief Projects\r\n Emergency response to disasters and wars, providing food and medicine.\r\n \r\n<a> Browse Projects </a>\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n Development Projects\r\n Empowering communities and building capacities.\r\n \r\n<a> Browse Projects </a>\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n Seasonal Projects\r\n Ramadan campaigns, Qurbani, and winter clothing.\r\n \r\n<a> Browse Projects </a>\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n Endowment Projects\r\n An investment for the hereafter—mosques, wells, and charitable endowments.\r\n<a> Browse Projects </a>\r\n \r\n \r\n \r\n \r\n","animate_delay":"0"},"editing":false,"element_name":"gva_text_noeditor"}],"editing":false,"element_name":"gva_column"}],"editing":false,"element_name":"gva_row"},{"settings":{"element":"gva_row","bg_particles":"off","bg_position":"center top","bg_repeat":"no-repeat","bg_attachment":"scroll","bg_size":"cover","style_space":"remove_margin remove_padding remove_padding_col","layout":"container-fw","class":"partner"},"columns":[{"settings":{"element":"gva_column"},"col_lg":12,"elements":[{"settings":{"content":"\r\n \r\n \r\n\r\n \r\n \r\n Our Achievements in Numbers\r\n Your trust makes the difference\r\n \r\n \r\n\r\n \r\n \r\n 0\r\n Beneficiaries worldwide\r\n \r\n \r\n \r\n 0\r\n Projects implemented\r\n \r\n \r\n \r\n 0\r\n Countries we operate in\r\n \r\n \r\n \r\n 0\r\n Volunteers\r\n \r\n \r\n \r\n \r\n\r\n\r\n// Enhanced counter animation for facts section\r\nfunction animateFactsCounters() {\r\n const statNumbers = document.querySelectorAll('.facts-section__stat-number');\r\n \r\n const observer = new IntersectionObserver((entries) => {\r\n entries.forEach(entry => {\r\n if (entry.isIntersecting) {\r\n const counter = entry.target;\r\n const target = parseInt(counter.getAttribute('data-target'));\r\n const duration = 2000;\r\n const increment = target / (duration / 16);\r\n \r\n let current = 0;\r\n const updateCounter = () => {\r\n current += increment;\r\n if (current < target) {\r\n // Format number with K for thousands\r\n let displayNum = Math.ceil(current);\r\n if (displayNum >= 1000) {\r\n counter.textContent = (displayNum / 1000).toFixed(1).replace('.0', '') + 'K';\r\n } else {\r\n counter.textContent = displayNum.toLocaleString();\r\n }\r\n requestAnimationFrame(updateCounter);\r\n } else {\r\n // Final formatting\r\n if (target >= 1000) {\r\n counter.textContent = (target / 1000).toFixed(1).replace('.0', '') + 'K';\r\n counter.classList.add('formatted');\r\n } else {\r\n counter.textContent = target.toLocaleString();\r\n }\r\n counter.classList.add('animated');\r\n setTimeout(() => counter.classList.remove('animated'), 600);\r\n }\r\n };\r\n updateCounter();\r\n observer.unobserve(counter);\r\n }\r\n });\r\n }, { threshold: 0.5, rootMargin: '0px 0px -50px 0px' });\r\n \r\n statNumbers.forEach(counter => observer.observe(counter));\r\n}\r\n\r\n// Call this function when DOM is loaded\r\ndocument.addEventListener('DOMContentLoaded', () => {\r\n animateFactsCounters();\r\n});","animate_delay":"0"},"editing":false,"element_name":"gva_text_noeditor"}],"editing":false,"element_name":"gva_column"}],"editing":false,"element_name":"gva_row"},{"settings":{"element":"gva_row","bg_particles":"off","bg_position":"center top","bg_repeat":"no-repeat","bg_attachment":"scroll","bg_size":"cover","style_space":"remove_margin remove_padding remove_padding_col","layout":"container-fw","class":"zakatcalc"},"columns":[{"settings":{"element":"gva_column"},"col_lg":12,"elements":[{"settings":{"content":"\r\n\r\n \r\n \r\n \r\n \r\nSmart Zakat Calculator\r\n A precise and comprehensive tool\r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n \r\n \r\n Money & Savings\r\n \r\n \r\n \r\n Cash (on hand or at home)\r\n \r\n \r\n $\r\n \r\n \r\n \r\n Bank balances\r\n \r\n \r\n $\r\n \r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n Gold & Silver\r\n \r\n \r\n Refresh Prices\r\n \r\n \r\n \r\n \r\n \r\n Gold weight (grams)\r\n \r\n \r\n \r\n \r\n Current gold price per gram\r\n \r\n Live\r\n \r\n \r\n \r\n \r\n $ / gram\r\n \r\n \r\n \r\n\r\n \r\n \r\n Silver weight (grams)\r\n \r\n \r\n \r\n \r\n Current silver price per gram\r\n \r\n Live\r\n \r\n \r\n \r\n \r\n $ / gram\r\n \r\n \r\n \r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n Zakat Summary\r\n \r\n \r\n Total assets:\r\n 0.00 $\r\n \r\n \r\n Net zakatable assets:\r\n 0.00 $\r\n \r\n \r\n Nisab value (85g gold):\r\n ...\r\n \r\n \r\n Enter data to check eligibility\r\n \r\n \r\n \r\n\r\n \r\n \r\n Zakat due (2.5%)\r\n 0.00 $\r\n \r\n \r\n <a>\r\n \r\n Contact via WhatsApp for consultation and donation\r\n </a>\r\n \r\n \r\n \r\n \r\n\r\n\r\n// Zakat Calculator Logic\r\nlet zakatcalculatorPricesLoaded = false;\r\n\r\n// Initialize calculator when DOM is loaded\r\ndocument.addEventListener('DOMContentLoaded', () => {\r\n zakatcalculatorFetchPrices();\r\n zakatcalculatorCalculate();\r\n \r\n // Add input event listeners for real-time calculation\r\n const inputs = document.querySelectorAll('.zakatcalculator-section__input');\r\n inputs.forEach(input => {\r\n input.addEventListener('input', zakatcalculatorCalculate);\r\n });\r\n \r\n // Format numbers as user types\r\n inputs.forEach(input => {\r\n input.addEventListener('blur', function() {\r\n if (this.value) {\r\n const value = parseFloat(this.value);\r\n if (!isNaN(value)) {\r\n this.value = value.toLocaleString('en-US', {\r\n minimumFractionDigits: 2,\r\n maximumFractionDigits: 2\r\n });\r\n }\r\n }\r\n });\r\n \r\n input.addEventListener('focus', function() {\r\n if (this.value) {\r\n this.value = this.value.replace(/[^\\d.]/g, '');\r\n }\r\n });\r\n });\r\n});\r\n\r\n// Fetch metal prices\r\nasync function zakatcalculatorFetchPrices() {\r\n const goldInput = document.getElementById('goldPrice');\r\n const silverInput = document.getElementById('silverPrice');\r\n const refreshButton = document.querySelector('.zakatcalculator-section__refresh-button');\r\n const refreshIcon = document.querySelector('.zakatcalculator-section__refresh-icon');\r\n \r\n if (!refreshButton || !refreshIcon) return;\r\n \r\n // Show loading state\r\n refreshButton.disabled = true;\r\n refreshIcon.classList.add('zakatcalculator-section__refresh-icon--spinning');\r\n goldInput.classList.add('zakatcalculator-section__input--loading');\r\n silverInput.classList.add('zakatcalculator-section__input--loading');\r\n \r\n try {\r\n // Simulate API call with delay\r\n await new Promise(resolve => setTimeout(resolve, 1500));\r\n \r\n // Mock data (in a real app, you would fetch from an API)\r\n const liveGoldPrice = 76.50;\r\n const liveSilverPrice = 0.95;\r\n \r\n // Update inputs\r\n goldInput.value = liveGoldPrice.toFixed(2);\r\n silverInput.value = liveSilverPrice.toFixed(2);\r\n \r\n // Remove loading state\r\n goldInput.classList.remove('zakatcalculator-section__input--loading');\r\n silverInput.classList.remove('zakatcalculator-section__input--loading');\r\n goldInput.classList.add('zakatcalculator-section__input--valid');\r\n silverInput.classList.add('zakatcalculator-section__input--valid');\r\n \r\n zakatcalculatorPricesLoaded = true;\r\n \r\n // Show success feedback\r\n refreshButton.innerHTML = ' Updated';\r\n refreshButton.style.backgroundColor = '#617f67';\r\n refreshButton.style.color = 'white';\r\n \r\n setTimeout(() => {\r\n refreshButton.innerHTML = ' Refresh Prices';\r\n refreshButton.style.backgroundColor = '';\r\n refreshButton.style.color = '';\r\n }, 2000);\r\n \r\n } catch (error) {\r\n console.error(\"Failed to fetch prices\", error);\r\n \r\n // Fallback values\r\n goldInput.value = 75.00;\r\n silverInput.value = 0.90;\r\n \r\n // Show error state\r\n goldInput.classList.remove('zakatcalculator-section__input--loading');\r\n silverInput.classList.remove('zakatcalculator-section__input--loading');\r\n goldInput.classList.add('zakatcalculator-section__input--invalid');\r\n silverInput.classList.add('zakatcalculator-section__input--invalid');\r\n \r\n refreshButton.innerHTML = ' Update Failed';\r\n refreshButton.style.backgroundColor = '#dc2626';\r\n refreshButton.style.color = 'white';\r\n \r\n setTimeout(() => {\r\n refreshButton.innerHTML = ' Refresh Prices';\r\n refreshButton.style.backgroundColor = '';\r\n refreshButton.style.color = '';\r\n }, 2000);\r\n \r\n } finally {\r\n refreshButton.disabled = false;\r\n refreshIcon.classList.remove('zakatcalculator-section__refresh-icon--spinning');\r\n \r\n // Recalculate zakat\r\n zakatcalculatorCalculate();\r\n }\r\n}\r\n\r\n// Calculate zakat\r\nfunction zakatcalculatorCalculate() {\r\n const cashHand = parseFloat(document.getElementById('cashHand').value) || 0;\r\n const cashBank = parseFloat(document.getElementById('cashBank').value) || 0;\r\n const goldWeight = parseFloat(document.getElementById('goldWeight').value) || 0;\r\n const goldPrice = parseFloat(document.getElementById('goldPrice').value) || 0;\r\n const silverWeight = parseFloat(document.getElementById('silverWeight').value) || 0;\r\n const silverPrice = parseFloat(document.getElementById('silverPrice').value) || 0;\r\n \r\n // Calculate totals\r\n const totalAssets = cashHand + cashBank + (goldWeight * goldPrice) + (silverWeight * silverPrice);\r\n const nisabThreshold = 85 * goldPrice;\r\n \r\n // Update display\r\n document.getElementById('totalAssetsDisplay').textContent = \r\n formatCurrency(totalAssets);\r\n \r\n document.getElementById('netAssetsDisplay').textContent = \r\n formatCurrency(totalAssets);\r\n \r\n if (goldPrice > 0) {\r\n document.getElementById('nisabValueDisplay').textContent = \r\n formatCurrency(nisabThreshold);\r\n } else {\r\n document.getElementById('nisabValueDisplay').textContent = '...';\r\n }\r\n \r\n // Update status and final zakat\r\n const statusBadge = document.getElementById('statusBadge');\r\n const finalDisplay = document.getElementById('finalZakatDisplay');\r\n const payButton = document.querySelector('.zakatcalculator-section__pay-button');\r\n \r\n if (totalAssets >= nisabThreshold && goldPrice > 0 && zakatcalculatorPricesLoaded) {\r\n const zakatAmount = totalAssets * 0.025;\r\n finalDisplay.textContent = formatCurrency(zakatAmount);\r\n \r\n // Update status badge\r\n statusBadge.textContent = '✓ Zakat is due (Nisab reached)';\r\n statusBadge.className = 'zakatcalculator-section__status zakatcalculator-section__status--eligible';\r\n \r\n // Enable pay button\r\n payButton.disabled = false;\r\n payButton.innerHTML = ' Pay Zakat Now';\r\n \r\n } else {\r\n finalDisplay.textContent = '0.00 $';\r\n \r\n // Update status badge\r\n if (!zakatcalculatorPricesLoaded) {\r\n statusBadge.textContent = 'Enter data to check eligibility';\r\n statusBadge.className = 'zakatcalculator-section__status zakatcalculator-section__status--not-eligible';\r\n } else if (totalAssets < nisabThreshold) {\r\n statusBadge.textContent = 'Zakat is not due (Nisab not reached)';\r\n statusBadge.className = 'zakatcalculator-section__status zakatcalculator-section__status--not-eligible';\r\n } else {\r\n statusBadge.textContent = 'Enter data to check eligibility';\r\n statusBadge.className = 'zakatcalculator-section__status zakatcalculator-section__status--not-eligible';\r\n }\r\n \r\n // Disable pay button\r\n payButton.disabled = true;\r\n payButton.innerHTML = ' Pay Zakat Now';\r\n }\r\n}\r\n\r\n// Format currency\r\nfunction formatCurrency(amount) {\r\n return new Intl.NumberFormat('en-US', {\r\n style: 'currency',\r\n currency: 'USD',\r\n minimumFractionDigits: 2,\r\n maximumFractionDigits: 2\r\n }).format(amount);\r\n}\r\n\r\n// Add zakat to cart\r\nfunction zakatcalculatorAddToCart() {\r\n const amountText = document.getElementById('finalZakatDisplay').textContent;\r\n const amount = parseFloat(amountText.replace(/[^0-9.-]+/g, \"\"));\r\n \r\n if (amount > 0 && !isNaN(amount)) {\r\n // Use your existing addToCart function\r\n if (typeof addToCart === 'function') {\r\n addToCart('Calculated Zakat', amount, 'Zakat');\r\n } else {\r\n // Fallback if addToCart is not defined\r\n alert(`Calculated Zakat amount: ${amountText}`);\r\n }\r\n } else {\r\n alert(\"Invalid zakat amount. Please check your inputs.\");\r\n }\r\n}\r\n\r\n// Input validation\r\nfunction validateZakatInput(input) {\r\n const value = parseFloat(input.value);\r\n const min = parseFloat(input.getAttribute('min')) || 0;\r\n \r\n if (isNaN(value) || value < min) {\r\n input.classList.add('zakatcalculator-section__input--invalid');\r\n return false;\r\n } else {\r\n input.classList.remove('zakatcalculator-section__input--invalid');\r\n input.classList.add('zakatcalculator-section__input--valid');\r\n return true;\r\n }\r\n}","animate_delay":"0"},"editing":false,"element_name":"gva_text_noeditor"}],"editing":false,"element_name":"gva_column"}],"editing":false,"element_name":"gva_row"},{"settings":{"element":"gva_row","bg_particles":"off","bg_position":"center top","bg_repeat":"no-repeat","bg_attachment":"scroll","bg_size":"cover","style_space":"remove_margin remove_padding remove_padding_col","layout":"container-fw","class":"partner","margin_top":"30","margin_bottom":"30"},"columns":[{"settings":{"element":"gva_column"},"col_lg":12,"elements":[{"settings":{"content":"\r\n \r\n Strategic Partnerships\r\n Our partners in creating hope\r\n \r\n \r\n ","animate_delay":"0"},"editing":false,"element_name":"gva_text_noeditor"},{"settings":{"title_admin":"Partners: Partners Block - en","block_drupal":"views_block__partners_block_2","hidden_title":"on","align_title":"title-align-right","remove_margin":"on","style_text":"text-dark","animate_delay":"0"},"editing":false,"element_name":"gva_drupal_block"}],"editing":false,"element_name":"gva_column"}],"editing":false,"element_name":"gva_row"}]') (Line: 47)
Drupal\gavias_content_builder\Plugin\Field\FieldFormatter\GaviasContentBuilderFormatter->viewElements(Object, 'en') (Line: 89)
Drupal\Core\Field\FormatterBase->view(Object, 'en') (Line: 263)
Drupal\Core\Entity\Entity\EntityViewDisplay->buildMultiple(Array) (Line: 351)
Drupal\Core\Entity\EntityViewBuilder->buildComponents(Array, Array, Array, 'full') (Line: 24)
Drupal\node\NodeViewBuilder->buildComponents(Array, Array, Array, 'full') (Line: 293)
Drupal\Core\Entity\EntityViewBuilder->buildMultiple(Array) (Line: 250)
Drupal\Core\Entity\EntityViewBuilder->build(Array)
call_user_func_array(Array, Array) (Line: 100)
Drupal\Core\Render\Renderer->doTrustedCallback(Array, Array, 'Render #pre_render callbacks must be methods of a class that implements \Drupal\Core\Security\TrustedCallbackInterface or be an anonymous function. The callback was %s. Support for this callback implementation is deprecated in 8.8.0 and will be removed in Drupal 9.0.0. See https://www.drupal.org/node/2966725', 'silenced_deprecation', 'Drupal\Core\Render\Element\RenderCallbackInterface') (Line: 781)
Drupal\Core\Render\Renderer->doCallback('#pre_render', Array, Array) (Line: 372)
Drupal\Core\Render\Renderer->doRender(Array, ) (Line: 200)
Drupal\Core\Render\Renderer->render(Array, ) (Line: 226)
Drupal\Core\Render\MainContent\HtmlRenderer->Drupal\Core\Render\MainContent\{closure}() (Line: 573)
Drupal\Core\Render\Renderer->executeInRenderContext(Object, Object) (Line: 227)
Drupal\Core\Render\MainContent\HtmlRenderer->prepare(Array, Object, Object) (Line: 117)
Drupal\Core\Render\MainContent\HtmlRenderer->renderResponse(Array, Object, Object) (Line: 90)
Drupal\Core\EventSubscriber\MainContentViewSubscriber->onViewRenderArray(Object, 'kernel.view', Object)
call_user_func(Array, Object, 'kernel.view', Object) (Line: 111)
Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher->dispatch('kernel.view', Object) (Line: 156)
Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object, 1) (Line: 68)
Symfony\Component\HttpKernel\HttpKernel->handle(Object, 1, 1) (Line: 57)
Drupal\Core\StackMiddleware\Session->handle(Object, 1, 1) (Line: 47)
Drupal\Core\StackMiddleware\KernelPreHandle->handle(Object, 1, 1) (Line: 191)
Drupal\page_cache\StackMiddleware\PageCache->fetch(Object, 1, 1) (Line: 128)
Drupal\page_cache\StackMiddleware\PageCache->lookup(Object, 1, 1) (Line: 82)
Drupal\page_cache\StackMiddleware\PageCache->handle(Object, 1, 1) (Line: 47)
Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle(Object, 1, 1) (Line: 52)
Drupal\Core\StackMiddleware\NegotiationMiddleware->handle(Object, 1, 1) (Line: 23)
Stack\StackedHttpKernel->handle(Object, 1, 1) (Line: 708)
Drupal\Core\DrupalKernel->handle(Object) (Line: 19)
- Deprecated function: implode(): Passing glue string after array is deprecated. Swap the parameters in element_gva_column->render_content() (line 462 of themes/gavias_kunco/gva_content_builder/gva_column.php).
element_gva_column->render_content(Array, '
Strategic Partnerships
Our partners in creating hope
<a href="/en/node/265" hreflang="en">Clone </a>
<a href="/en/node/264" hreflang="en">Clone </a>
') (Line: 110)
gavias_content_builder_render_element('gva_column', Array, '
Strategic Partnerships
Our partners in creating hope
<a href="/en/node/265" hreflang="en">Clone </a>
<a href="/en/node/264" hreflang="en">Clone </a>
') (Line: 58)
gavias_content_builder_render_el(Array) (Line: 22)
gavias_content_builder_frontend('[{"settings":{"bg_particles":"off","bg_position":"center top","bg_repeat":"no-repeat","bg_attachment":"scroll","bg_size":"cover","style_space":"remove_padding","layout":"container-fw"},"columns":[{"settings":{"element":"gva_column","bg_position":"center top","bg_repeat":"no-repeat","bg_attachment":"scroll","bg_size":"cover","el_class":"front"},"col_lg":12,"elements":[{"settings":{"content":"\r\n \r\n \r\n \r\n \r\n Urgent Appeal\r\n \r\n Be a helping hand for them in\r\n times of crisis\r\n \r\n \r\n At \"Wejdan Charity\", we work with full transparency to deliver your donations to those in need in conflict and poverty-stricken areas.\r\n \r\n \r\n <a>\r\n Charity Donations \r\n </a>\r\n <a>\r\n Our Projects \r\n </a>\r\n \r\n \r\n \r\n \r\n","animate_delay":"0"},"editing":false,"element_name":"gva_text_noeditor"}],"editing":false,"element_name":"gva_column"}],"editing":false,"element_name":"gva_row"},{"settings":{"element":"gva_row","bg_particles":"off","bg_position":"center top","bg_repeat":"no-repeat","bg_attachment":"scroll","bg_size":"cover","style_space":"remove_padding","layout":"container","class":"before-help-region"},"columns":[{"settings":{"element":"gva_column"},"col_lg":12,"elements":[{"settings":{"title":"Take action for animals now","link":"#","button_title":"Donation Now","button_align":"button-right-v2","style_text":"text-light","style_button":"btn-theme","donorbox":"off","target":"off","el_class":"margin","animate":"fade-up","animate_delay":"0"},"editing":false,"element_name":"gva_call_to_action"}],"editing":false,"element_name":"gva_column"}],"editing":false,"element_name":"gva_row"},{"settings":{"element":"gva_row","bg_particles":"off","bg_position":"center top","bg_repeat":"no-repeat","bg_attachment":"scroll","bg_size":"cover","style_space":"remove_padding","layout":"container-fw","bg_color":"#f9fafb"},"columns":[{"settings":{"element":"gva_column","bg_position":"center top","bg_repeat":"no-repeat","bg_attachment":"scroll","bg_size":"cover","el_class":"about"},"col_lg":12,"elements":[{"settings":{"content":"\r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n \r\n \r\n Who We Are\r\n \r\n \r\n We plant hope.. \r\n and build people and the future\r\n \r\n \r\n Wejdan Charity is a leading humanitarian organization, founded with an ambitious vision to be a bridge of الخير between donors and those in need.\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n Development Stages\r\n A continuous journey of growth\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n Areas of Work\r\n We reach where the need is\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \"We work with passion to bring smiles\"\r\n \r\n \r\n \r\n \r\n \r\n","animate_delay":"0"},"editing":false,"element_name":"gva_text_noeditor"}],"editing":false,"element_name":"gva_column"}],"editing":false,"element_name":"gva_row"},{"settings":{"element":"gva_row","bg_particles":"off","bg_position":"center top","bg_repeat":"no-repeat","bg_attachment":"scroll","bg_size":"cover","style_space":"remove_margin remove_padding remove_padding_col","layout":"container-fw","class":"partner","margin_top":"30","margin_bottom":"30"},"columns":[{"settings":{"element":"gva_column"},"col_lg":12,"elements":[{"settings":{"content":"\r\n\r\n \r\n \r\n Initiatives & Programs\r\n Our Areas of Work\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n Ongoing Charity\r\n Water wells, mosque construction\r\n \r\n \r\n \r\n \r\n \r\n \r\n Student Sponsorship\r\n Building the future through education\r\n \r\n \r\n \r\n \r\n \r\n \r\n Humanitarian Cases\r\n Patient treatment, surgeries\r\n \r\n \r\n \r\n \r\n \r\n \r\n Development Projects\r\n Empowering productive families\r\n \r\n \r\n<a>Learn more about our programs and initiatives</a>\r\n \r\n","animate_delay":"0"},"editing":false,"element_name":"gva_text_noeditor"}],"editing":false,"element_name":"gva_column"}],"editing":false,"element_name":"gva_row"},{"settings":{"element":"gva_row","bg_particles":"off","bg_position":"center top","bg_repeat":"no-repeat","bg_attachment":"scroll","bg_size":"cover","style_space":"remove_margin remove_padding remove_padding_col","layout":"container","class":"newsfront"},"columns":[{"settings":{"element":"gva_column"},"col_lg":12,"elements":[{"settings":{"content":"\r\n \r\n \r\n Our News\r\n \r\n \r\n \r\nNews that tells the story of giving \r\n \r\n","animate_delay":"0"},"editing":false,"element_name":"gva_text_noeditor"},{"settings":{"title_admin":"news: news Block -en","block_drupal":"views_block__news_block_3","hidden_title":"on","align_title":"title-align-left","remove_margin":"on","style_text":"text-dark","animate_delay":"0"},"editing":false,"element_name":"gva_drupal_block"}],"editing":false,"element_name":"gva_column"}],"editing":false,"element_name":"gva_row"},{"settings":{"bg_particles":"off","bg_position":"center top","bg_repeat":"no-repeat","bg_attachment":"scroll","bg_size":"cover","style_space":"remove_padding","layout":"container-fw","element":"gva_row","class":"sliderfrontpage"},"columns":[{"settings":{"element":"gva_column","bg_position":"center top","bg_repeat":"no-repeat","bg_attachment":"scroll","bg_size":"cover"},"col_lg":12,"elements":[{"settings":{"title_admin":"news: campigns-en","block_drupal":"views_block__news_block_5","hidden_title":"on","align_title":"title-align-right","remove_margin":"on","style_text":"text-dark","animate_delay":"0"},"editing":false,"element_name":"gva_drupal_block"}],"editing":false,"element_name":"gva_column"}],"editing":false,"element_name":"gva_row"},{"settings":{"element":"gva_row","bg_particles":"off","bg_position":"center top","bg_repeat":"no-repeat","bg_attachment":"scroll","bg_size":"cover","style_space":"remove_margin remove_padding remove_padding_col","layout":"container-fw","class":"partner"},"columns":[{"settings":{"element":"gva_column"},"col_lg":12,"elements":[{"settings":{"content":"\r\n \r\n \r\n \r\n Our Distinguished Projects\r\n \r\n \r\n \r\n At Wejdan Charity, we strive to provide support and assistance to communities in need who are affected by disasters, crises, and wars, with the aim of improving quality of life and promoting sustainable development. Our projects span across several areas:\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n Relief Projects\r\n Emergency response to disasters and wars, providing food and medicine.\r\n \r\n<a> Browse Projects </a>\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n Development Projects\r\n Empowering communities and building capacities.\r\n \r\n<a> Browse Projects </a>\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n Seasonal Projects\r\n Ramadan campaigns, Qurbani, and winter clothing.\r\n \r\n<a> Browse Projects </a>\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n Endowment Projects\r\n An investment for the hereafter—mosques, wells, and charitable endowments.\r\n<a> Browse Projects </a>\r\n \r\n \r\n \r\n \r\n","animate_delay":"0"},"editing":false,"element_name":"gva_text_noeditor"}],"editing":false,"element_name":"gva_column"}],"editing":false,"element_name":"gva_row"},{"settings":{"element":"gva_row","bg_particles":"off","bg_position":"center top","bg_repeat":"no-repeat","bg_attachment":"scroll","bg_size":"cover","style_space":"remove_margin remove_padding remove_padding_col","layout":"container-fw","class":"partner"},"columns":[{"settings":{"element":"gva_column"},"col_lg":12,"elements":[{"settings":{"content":"\r\n \r\n \r\n\r\n \r\n \r\n Our Achievements in Numbers\r\n Your trust makes the difference\r\n \r\n \r\n\r\n \r\n \r\n 0\r\n Beneficiaries worldwide\r\n \r\n \r\n \r\n 0\r\n Projects implemented\r\n \r\n \r\n \r\n 0\r\n Countries we operate in\r\n \r\n \r\n \r\n 0\r\n Volunteers\r\n \r\n \r\n \r\n \r\n\r\n\r\n// Enhanced counter animation for facts section\r\nfunction animateFactsCounters() {\r\n const statNumbers = document.querySelectorAll('.facts-section__stat-number');\r\n \r\n const observer = new IntersectionObserver((entries) => {\r\n entries.forEach(entry => {\r\n if (entry.isIntersecting) {\r\n const counter = entry.target;\r\n const target = parseInt(counter.getAttribute('data-target'));\r\n const duration = 2000;\r\n const increment = target / (duration / 16);\r\n \r\n let current = 0;\r\n const updateCounter = () => {\r\n current += increment;\r\n if (current < target) {\r\n // Format number with K for thousands\r\n let displayNum = Math.ceil(current);\r\n if (displayNum >= 1000) {\r\n counter.textContent = (displayNum / 1000).toFixed(1).replace('.0', '') + 'K';\r\n } else {\r\n counter.textContent = displayNum.toLocaleString();\r\n }\r\n requestAnimationFrame(updateCounter);\r\n } else {\r\n // Final formatting\r\n if (target >= 1000) {\r\n counter.textContent = (target / 1000).toFixed(1).replace('.0', '') + 'K';\r\n counter.classList.add('formatted');\r\n } else {\r\n counter.textContent = target.toLocaleString();\r\n }\r\n counter.classList.add('animated');\r\n setTimeout(() => counter.classList.remove('animated'), 600);\r\n }\r\n };\r\n updateCounter();\r\n observer.unobserve(counter);\r\n }\r\n });\r\n }, { threshold: 0.5, rootMargin: '0px 0px -50px 0px' });\r\n \r\n statNumbers.forEach(counter => observer.observe(counter));\r\n}\r\n\r\n// Call this function when DOM is loaded\r\ndocument.addEventListener('DOMContentLoaded', () => {\r\n animateFactsCounters();\r\n});","animate_delay":"0"},"editing":false,"element_name":"gva_text_noeditor"}],"editing":false,"element_name":"gva_column"}],"editing":false,"element_name":"gva_row"},{"settings":{"element":"gva_row","bg_particles":"off","bg_position":"center top","bg_repeat":"no-repeat","bg_attachment":"scroll","bg_size":"cover","style_space":"remove_margin remove_padding remove_padding_col","layout":"container-fw","class":"zakatcalc"},"columns":[{"settings":{"element":"gva_column"},"col_lg":12,"elements":[{"settings":{"content":"\r\n\r\n \r\n \r\n \r\n \r\nSmart Zakat Calculator\r\n A precise and comprehensive tool\r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n \r\n \r\n Money & Savings\r\n \r\n \r\n \r\n Cash (on hand or at home)\r\n \r\n \r\n $\r\n \r\n \r\n \r\n Bank balances\r\n \r\n \r\n $\r\n \r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n Gold & Silver\r\n \r\n \r\n Refresh Prices\r\n \r\n \r\n \r\n \r\n \r\n Gold weight (grams)\r\n \r\n \r\n \r\n \r\n Current gold price per gram\r\n \r\n Live\r\n \r\n \r\n \r\n \r\n $ / gram\r\n \r\n \r\n \r\n\r\n \r\n \r\n Silver weight (grams)\r\n \r\n \r\n \r\n \r\n Current silver price per gram\r\n \r\n Live\r\n \r\n \r\n \r\n \r\n $ / gram\r\n \r\n \r\n \r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n Zakat Summary\r\n \r\n \r\n Total assets:\r\n 0.00 $\r\n \r\n \r\n Net zakatable assets:\r\n 0.00 $\r\n \r\n \r\n Nisab value (85g gold):\r\n ...\r\n \r\n \r\n Enter data to check eligibility\r\n \r\n \r\n \r\n\r\n \r\n \r\n Zakat due (2.5%)\r\n 0.00 $\r\n \r\n \r\n <a>\r\n \r\n Contact via WhatsApp for consultation and donation\r\n </a>\r\n \r\n \r\n \r\n \r\n\r\n\r\n// Zakat Calculator Logic\r\nlet zakatcalculatorPricesLoaded = false;\r\n\r\n// Initialize calculator when DOM is loaded\r\ndocument.addEventListener('DOMContentLoaded', () => {\r\n zakatcalculatorFetchPrices();\r\n zakatcalculatorCalculate();\r\n \r\n // Add input event listeners for real-time calculation\r\n const inputs = document.querySelectorAll('.zakatcalculator-section__input');\r\n inputs.forEach(input => {\r\n input.addEventListener('input', zakatcalculatorCalculate);\r\n });\r\n \r\n // Format numbers as user types\r\n inputs.forEach(input => {\r\n input.addEventListener('blur', function() {\r\n if (this.value) {\r\n const value = parseFloat(this.value);\r\n if (!isNaN(value)) {\r\n this.value = value.toLocaleString('en-US', {\r\n minimumFractionDigits: 2,\r\n maximumFractionDigits: 2\r\n });\r\n }\r\n }\r\n });\r\n \r\n input.addEventListener('focus', function() {\r\n if (this.value) {\r\n this.value = this.value.replace(/[^\\d.]/g, '');\r\n }\r\n });\r\n });\r\n});\r\n\r\n// Fetch metal prices\r\nasync function zakatcalculatorFetchPrices() {\r\n const goldInput = document.getElementById('goldPrice');\r\n const silverInput = document.getElementById('silverPrice');\r\n const refreshButton = document.querySelector('.zakatcalculator-section__refresh-button');\r\n const refreshIcon = document.querySelector('.zakatcalculator-section__refresh-icon');\r\n \r\n if (!refreshButton || !refreshIcon) return;\r\n \r\n // Show loading state\r\n refreshButton.disabled = true;\r\n refreshIcon.classList.add('zakatcalculator-section__refresh-icon--spinning');\r\n goldInput.classList.add('zakatcalculator-section__input--loading');\r\n silverInput.classList.add('zakatcalculator-section__input--loading');\r\n \r\n try {\r\n // Simulate API call with delay\r\n await new Promise(resolve => setTimeout(resolve, 1500));\r\n \r\n // Mock data (in a real app, you would fetch from an API)\r\n const liveGoldPrice = 76.50;\r\n const liveSilverPrice = 0.95;\r\n \r\n // Update inputs\r\n goldInput.value = liveGoldPrice.toFixed(2);\r\n silverInput.value = liveSilverPrice.toFixed(2);\r\n \r\n // Remove loading state\r\n goldInput.classList.remove('zakatcalculator-section__input--loading');\r\n silverInput.classList.remove('zakatcalculator-section__input--loading');\r\n goldInput.classList.add('zakatcalculator-section__input--valid');\r\n silverInput.classList.add('zakatcalculator-section__input--valid');\r\n \r\n zakatcalculatorPricesLoaded = true;\r\n \r\n // Show success feedback\r\n refreshButton.innerHTML = ' Updated';\r\n refreshButton.style.backgroundColor = '#617f67';\r\n refreshButton.style.color = 'white';\r\n \r\n setTimeout(() => {\r\n refreshButton.innerHTML = ' Refresh Prices';\r\n refreshButton.style.backgroundColor = '';\r\n refreshButton.style.color = '';\r\n }, 2000);\r\n \r\n } catch (error) {\r\n console.error(\"Failed to fetch prices\", error);\r\n \r\n // Fallback values\r\n goldInput.value = 75.00;\r\n silverInput.value = 0.90;\r\n \r\n // Show error state\r\n goldInput.classList.remove('zakatcalculator-section__input--loading');\r\n silverInput.classList.remove('zakatcalculator-section__input--loading');\r\n goldInput.classList.add('zakatcalculator-section__input--invalid');\r\n silverInput.classList.add('zakatcalculator-section__input--invalid');\r\n \r\n refreshButton.innerHTML = ' Update Failed';\r\n refreshButton.style.backgroundColor = '#dc2626';\r\n refreshButton.style.color = 'white';\r\n \r\n setTimeout(() => {\r\n refreshButton.innerHTML = ' Refresh Prices';\r\n refreshButton.style.backgroundColor = '';\r\n refreshButton.style.color = '';\r\n }, 2000);\r\n \r\n } finally {\r\n refreshButton.disabled = false;\r\n refreshIcon.classList.remove('zakatcalculator-section__refresh-icon--spinning');\r\n \r\n // Recalculate zakat\r\n zakatcalculatorCalculate();\r\n }\r\n}\r\n\r\n// Calculate zakat\r\nfunction zakatcalculatorCalculate() {\r\n const cashHand = parseFloat(document.getElementById('cashHand').value) || 0;\r\n const cashBank = parseFloat(document.getElementById('cashBank').value) || 0;\r\n const goldWeight = parseFloat(document.getElementById('goldWeight').value) || 0;\r\n const goldPrice = parseFloat(document.getElementById('goldPrice').value) || 0;\r\n const silverWeight = parseFloat(document.getElementById('silverWeight').value) || 0;\r\n const silverPrice = parseFloat(document.getElementById('silverPrice').value) || 0;\r\n \r\n // Calculate totals\r\n const totalAssets = cashHand + cashBank + (goldWeight * goldPrice) + (silverWeight * silverPrice);\r\n const nisabThreshold = 85 * goldPrice;\r\n \r\n // Update display\r\n document.getElementById('totalAssetsDisplay').textContent = \r\n formatCurrency(totalAssets);\r\n \r\n document.getElementById('netAssetsDisplay').textContent = \r\n formatCurrency(totalAssets);\r\n \r\n if (goldPrice > 0) {\r\n document.getElementById('nisabValueDisplay').textContent = \r\n formatCurrency(nisabThreshold);\r\n } else {\r\n document.getElementById('nisabValueDisplay').textContent = '...';\r\n }\r\n \r\n // Update status and final zakat\r\n const statusBadge = document.getElementById('statusBadge');\r\n const finalDisplay = document.getElementById('finalZakatDisplay');\r\n const payButton = document.querySelector('.zakatcalculator-section__pay-button');\r\n \r\n if (totalAssets >= nisabThreshold && goldPrice > 0 && zakatcalculatorPricesLoaded) {\r\n const zakatAmount = totalAssets * 0.025;\r\n finalDisplay.textContent = formatCurrency(zakatAmount);\r\n \r\n // Update status badge\r\n statusBadge.textContent = '✓ Zakat is due (Nisab reached)';\r\n statusBadge.className = 'zakatcalculator-section__status zakatcalculator-section__status--eligible';\r\n \r\n // Enable pay button\r\n payButton.disabled = false;\r\n payButton.innerHTML = ' Pay Zakat Now';\r\n \r\n } else {\r\n finalDisplay.textContent = '0.00 $';\r\n \r\n // Update status badge\r\n if (!zakatcalculatorPricesLoaded) {\r\n statusBadge.textContent = 'Enter data to check eligibility';\r\n statusBadge.className = 'zakatcalculator-section__status zakatcalculator-section__status--not-eligible';\r\n } else if (totalAssets < nisabThreshold) {\r\n statusBadge.textContent = 'Zakat is not due (Nisab not reached)';\r\n statusBadge.className = 'zakatcalculator-section__status zakatcalculator-section__status--not-eligible';\r\n } else {\r\n statusBadge.textContent = 'Enter data to check eligibility';\r\n statusBadge.className = 'zakatcalculator-section__status zakatcalculator-section__status--not-eligible';\r\n }\r\n \r\n // Disable pay button\r\n payButton.disabled = true;\r\n payButton.innerHTML = ' Pay Zakat Now';\r\n }\r\n}\r\n\r\n// Format currency\r\nfunction formatCurrency(amount) {\r\n return new Intl.NumberFormat('en-US', {\r\n style: 'currency',\r\n currency: 'USD',\r\n minimumFractionDigits: 2,\r\n maximumFractionDigits: 2\r\n }).format(amount);\r\n}\r\n\r\n// Add zakat to cart\r\nfunction zakatcalculatorAddToCart() {\r\n const amountText = document.getElementById('finalZakatDisplay').textContent;\r\n const amount = parseFloat(amountText.replace(/[^0-9.-]+/g, \"\"));\r\n \r\n if (amount > 0 && !isNaN(amount)) {\r\n // Use your existing addToCart function\r\n if (typeof addToCart === 'function') {\r\n addToCart('Calculated Zakat', amount, 'Zakat');\r\n } else {\r\n // Fallback if addToCart is not defined\r\n alert(`Calculated Zakat amount: ${amountText}`);\r\n }\r\n } else {\r\n alert(\"Invalid zakat amount. Please check your inputs.\");\r\n }\r\n}\r\n\r\n// Input validation\r\nfunction validateZakatInput(input) {\r\n const value = parseFloat(input.value);\r\n const min = parseFloat(input.getAttribute('min')) || 0;\r\n \r\n if (isNaN(value) || value < min) {\r\n input.classList.add('zakatcalculator-section__input--invalid');\r\n return false;\r\n } else {\r\n input.classList.remove('zakatcalculator-section__input--invalid');\r\n input.classList.add('zakatcalculator-section__input--valid');\r\n return true;\r\n }\r\n}","animate_delay":"0"},"editing":false,"element_name":"gva_text_noeditor"}],"editing":false,"element_name":"gva_column"}],"editing":false,"element_name":"gva_row"},{"settings":{"element":"gva_row","bg_particles":"off","bg_position":"center top","bg_repeat":"no-repeat","bg_attachment":"scroll","bg_size":"cover","style_space":"remove_margin remove_padding remove_padding_col","layout":"container-fw","class":"partner","margin_top":"30","margin_bottom":"30"},"columns":[{"settings":{"element":"gva_column"},"col_lg":12,"elements":[{"settings":{"content":"\r\n \r\n Strategic Partnerships\r\n Our partners in creating hope\r\n \r\n \r\n ","animate_delay":"0"},"editing":false,"element_name":"gva_text_noeditor"},{"settings":{"title_admin":"Partners: Partners Block - en","block_drupal":"views_block__partners_block_2","hidden_title":"on","align_title":"title-align-right","remove_margin":"on","style_text":"text-dark","animate_delay":"0"},"editing":false,"element_name":"gva_drupal_block"}],"editing":false,"element_name":"gva_column"}],"editing":false,"element_name":"gva_row"}]') (Line: 47)
Drupal\gavias_content_builder\Plugin\Field\FieldFormatter\GaviasContentBuilderFormatter->viewElements(Object, 'en') (Line: 89)
Drupal\Core\Field\FormatterBase->view(Object, 'en') (Line: 263)
Drupal\Core\Entity\Entity\EntityViewDisplay->buildMultiple(Array) (Line: 351)
Drupal\Core\Entity\EntityViewBuilder->buildComponents(Array, Array, Array, 'full') (Line: 24)
Drupal\node\NodeViewBuilder->buildComponents(Array, Array, Array, 'full') (Line: 293)
Drupal\Core\Entity\EntityViewBuilder->buildMultiple(Array) (Line: 250)
Drupal\Core\Entity\EntityViewBuilder->build(Array)
call_user_func_array(Array, Array) (Line: 100)
Drupal\Core\Render\Renderer->doTrustedCallback(Array, Array, 'Render #pre_render callbacks must be methods of a class that implements \Drupal\Core\Security\TrustedCallbackInterface or be an anonymous function. The callback was %s. Support for this callback implementation is deprecated in 8.8.0 and will be removed in Drupal 9.0.0. See https://www.drupal.org/node/2966725', 'silenced_deprecation', 'Drupal\Core\Render\Element\RenderCallbackInterface') (Line: 781)
Drupal\Core\Render\Renderer->doCallback('#pre_render', Array, Array) (Line: 372)
Drupal\Core\Render\Renderer->doRender(Array, ) (Line: 200)
Drupal\Core\Render\Renderer->render(Array, ) (Line: 226)
Drupal\Core\Render\MainContent\HtmlRenderer->Drupal\Core\Render\MainContent\{closure}() (Line: 573)
Drupal\Core\Render\Renderer->executeInRenderContext(Object, Object) (Line: 227)
Drupal\Core\Render\MainContent\HtmlRenderer->prepare(Array, Object, Object) (Line: 117)
Drupal\Core\Render\MainContent\HtmlRenderer->renderResponse(Array, Object, Object) (Line: 90)
Drupal\Core\EventSubscriber\MainContentViewSubscriber->onViewRenderArray(Object, 'kernel.view', Object)
call_user_func(Array, Object, 'kernel.view', Object) (Line: 111)
Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher->dispatch('kernel.view', Object) (Line: 156)
Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object, 1) (Line: 68)
Symfony\Component\HttpKernel\HttpKernel->handle(Object, 1, 1) (Line: 57)
Drupal\Core\StackMiddleware\Session->handle(Object, 1, 1) (Line: 47)
Drupal\Core\StackMiddleware\KernelPreHandle->handle(Object, 1, 1) (Line: 191)
Drupal\page_cache\StackMiddleware\PageCache->fetch(Object, 1, 1) (Line: 128)
Drupal\page_cache\StackMiddleware\PageCache->lookup(Object, 1, 1) (Line: 82)
Drupal\page_cache\StackMiddleware\PageCache->handle(Object, 1, 1) (Line: 47)
Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle(Object, 1, 1) (Line: 52)
Drupal\Core\StackMiddleware\NegotiationMiddleware->handle(Object, 1, 1) (Line: 23)
Stack\StackedHttpKernel->handle(Object, 1, 1) (Line: 708)
Drupal\Core\DrupalKernel->handle(Object) (Line: 19)
- Deprecated function: implode(): Passing glue string after array is deprecated. Swap the parameters in element_gva_column->render_content() (line 463 of themes/gavias_kunco/gva_content_builder/gva_column.php).
element_gva_column->render_content(Array, '
Strategic Partnerships
Our partners in creating hope
<a href="/en/node/265" hreflang="en">Clone </a>
<a href="/en/node/264" hreflang="en">Clone </a>
') (Line: 110)
gavias_content_builder_render_element('gva_column', Array, '
Strategic Partnerships
Our partners in creating hope
<a href="/en/node/265" hreflang="en">Clone </a>
<a href="/en/node/264" hreflang="en">Clone </a>
') (Line: 58)
gavias_content_builder_render_el(Array) (Line: 22)
gavias_content_builder_frontend('[{"settings":{"bg_particles":"off","bg_position":"center top","bg_repeat":"no-repeat","bg_attachment":"scroll","bg_size":"cover","style_space":"remove_padding","layout":"container-fw"},"columns":[{"settings":{"element":"gva_column","bg_position":"center top","bg_repeat":"no-repeat","bg_attachment":"scroll","bg_size":"cover","el_class":"front"},"col_lg":12,"elements":[{"settings":{"content":"\r\n \r\n \r\n \r\n \r\n Urgent Appeal\r\n \r\n Be a helping hand for them in\r\n times of crisis\r\n \r\n \r\n At \"Wejdan Charity\", we work with full transparency to deliver your donations to those in need in conflict and poverty-stricken areas.\r\n \r\n \r\n <a>\r\n Charity Donations \r\n </a>\r\n <a>\r\n Our Projects \r\n </a>\r\n \r\n \r\n \r\n \r\n","animate_delay":"0"},"editing":false,"element_name":"gva_text_noeditor"}],"editing":false,"element_name":"gva_column"}],"editing":false,"element_name":"gva_row"},{"settings":{"element":"gva_row","bg_particles":"off","bg_position":"center top","bg_repeat":"no-repeat","bg_attachment":"scroll","bg_size":"cover","style_space":"remove_padding","layout":"container","class":"before-help-region"},"columns":[{"settings":{"element":"gva_column"},"col_lg":12,"elements":[{"settings":{"title":"Take action for animals now","link":"#","button_title":"Donation Now","button_align":"button-right-v2","style_text":"text-light","style_button":"btn-theme","donorbox":"off","target":"off","el_class":"margin","animate":"fade-up","animate_delay":"0"},"editing":false,"element_name":"gva_call_to_action"}],"editing":false,"element_name":"gva_column"}],"editing":false,"element_name":"gva_row"},{"settings":{"element":"gva_row","bg_particles":"off","bg_position":"center top","bg_repeat":"no-repeat","bg_attachment":"scroll","bg_size":"cover","style_space":"remove_padding","layout":"container-fw","bg_color":"#f9fafb"},"columns":[{"settings":{"element":"gva_column","bg_position":"center top","bg_repeat":"no-repeat","bg_attachment":"scroll","bg_size":"cover","el_class":"about"},"col_lg":12,"elements":[{"settings":{"content":"\r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n \r\n \r\n Who We Are\r\n \r\n \r\n We plant hope.. \r\n and build people and the future\r\n \r\n \r\n Wejdan Charity is a leading humanitarian organization, founded with an ambitious vision to be a bridge of الخير between donors and those in need.\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n Development Stages\r\n A continuous journey of growth\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n Areas of Work\r\n We reach where the need is\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \"We work with passion to bring smiles\"\r\n \r\n \r\n \r\n \r\n \r\n","animate_delay":"0"},"editing":false,"element_name":"gva_text_noeditor"}],"editing":false,"element_name":"gva_column"}],"editing":false,"element_name":"gva_row"},{"settings":{"element":"gva_row","bg_particles":"off","bg_position":"center top","bg_repeat":"no-repeat","bg_attachment":"scroll","bg_size":"cover","style_space":"remove_margin remove_padding remove_padding_col","layout":"container-fw","class":"partner","margin_top":"30","margin_bottom":"30"},"columns":[{"settings":{"element":"gva_column"},"col_lg":12,"elements":[{"settings":{"content":"\r\n\r\n \r\n \r\n Initiatives & Programs\r\n Our Areas of Work\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n Ongoing Charity\r\n Water wells, mosque construction\r\n \r\n \r\n \r\n \r\n \r\n \r\n Student Sponsorship\r\n Building the future through education\r\n \r\n \r\n \r\n \r\n \r\n \r\n Humanitarian Cases\r\n Patient treatment, surgeries\r\n \r\n \r\n \r\n \r\n \r\n \r\n Development Projects\r\n Empowering productive families\r\n \r\n \r\n<a>Learn more about our programs and initiatives</a>\r\n \r\n","animate_delay":"0"},"editing":false,"element_name":"gva_text_noeditor"}],"editing":false,"element_name":"gva_column"}],"editing":false,"element_name":"gva_row"},{"settings":{"element":"gva_row","bg_particles":"off","bg_position":"center top","bg_repeat":"no-repeat","bg_attachment":"scroll","bg_size":"cover","style_space":"remove_margin remove_padding remove_padding_col","layout":"container","class":"newsfront"},"columns":[{"settings":{"element":"gva_column"},"col_lg":12,"elements":[{"settings":{"content":"\r\n \r\n \r\n Our News\r\n \r\n \r\n \r\nNews that tells the story of giving \r\n \r\n","animate_delay":"0"},"editing":false,"element_name":"gva_text_noeditor"},{"settings":{"title_admin":"news: news Block -en","block_drupal":"views_block__news_block_3","hidden_title":"on","align_title":"title-align-left","remove_margin":"on","style_text":"text-dark","animate_delay":"0"},"editing":false,"element_name":"gva_drupal_block"}],"editing":false,"element_name":"gva_column"}],"editing":false,"element_name":"gva_row"},{"settings":{"bg_particles":"off","bg_position":"center top","bg_repeat":"no-repeat","bg_attachment":"scroll","bg_size":"cover","style_space":"remove_padding","layout":"container-fw","element":"gva_row","class":"sliderfrontpage"},"columns":[{"settings":{"element":"gva_column","bg_position":"center top","bg_repeat":"no-repeat","bg_attachment":"scroll","bg_size":"cover"},"col_lg":12,"elements":[{"settings":{"title_admin":"news: campigns-en","block_drupal":"views_block__news_block_5","hidden_title":"on","align_title":"title-align-right","remove_margin":"on","style_text":"text-dark","animate_delay":"0"},"editing":false,"element_name":"gva_drupal_block"}],"editing":false,"element_name":"gva_column"}],"editing":false,"element_name":"gva_row"},{"settings":{"element":"gva_row","bg_particles":"off","bg_position":"center top","bg_repeat":"no-repeat","bg_attachment":"scroll","bg_size":"cover","style_space":"remove_margin remove_padding remove_padding_col","layout":"container-fw","class":"partner"},"columns":[{"settings":{"element":"gva_column"},"col_lg":12,"elements":[{"settings":{"content":"\r\n \r\n \r\n \r\n Our Distinguished Projects\r\n \r\n \r\n \r\n At Wejdan Charity, we strive to provide support and assistance to communities in need who are affected by disasters, crises, and wars, with the aim of improving quality of life and promoting sustainable development. Our projects span across several areas:\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n Relief Projects\r\n Emergency response to disasters and wars, providing food and medicine.\r\n \r\n<a> Browse Projects </a>\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n Development Projects\r\n Empowering communities and building capacities.\r\n \r\n<a> Browse Projects </a>\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n Seasonal Projects\r\n Ramadan campaigns, Qurbani, and winter clothing.\r\n \r\n<a> Browse Projects </a>\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n Endowment Projects\r\n An investment for the hereafter—mosques, wells, and charitable endowments.\r\n<a> Browse Projects </a>\r\n \r\n \r\n \r\n \r\n","animate_delay":"0"},"editing":false,"element_name":"gva_text_noeditor"}],"editing":false,"element_name":"gva_column"}],"editing":false,"element_name":"gva_row"},{"settings":{"element":"gva_row","bg_particles":"off","bg_position":"center top","bg_repeat":"no-repeat","bg_attachment":"scroll","bg_size":"cover","style_space":"remove_margin remove_padding remove_padding_col","layout":"container-fw","class":"partner"},"columns":[{"settings":{"element":"gva_column"},"col_lg":12,"elements":[{"settings":{"content":"\r\n \r\n \r\n\r\n \r\n \r\n Our Achievements in Numbers\r\n Your trust makes the difference\r\n \r\n \r\n\r\n \r\n \r\n 0\r\n Beneficiaries worldwide\r\n \r\n \r\n \r\n 0\r\n Projects implemented\r\n \r\n \r\n \r\n 0\r\n Countries we operate in\r\n \r\n \r\n \r\n 0\r\n Volunteers\r\n \r\n \r\n \r\n \r\n\r\n\r\n// Enhanced counter animation for facts section\r\nfunction animateFactsCounters() {\r\n const statNumbers = document.querySelectorAll('.facts-section__stat-number');\r\n \r\n const observer = new IntersectionObserver((entries) => {\r\n entries.forEach(entry => {\r\n if (entry.isIntersecting) {\r\n const counter = entry.target;\r\n const target = parseInt(counter.getAttribute('data-target'));\r\n const duration = 2000;\r\n const increment = target / (duration / 16);\r\n \r\n let current = 0;\r\n const updateCounter = () => {\r\n current += increment;\r\n if (current < target) {\r\n // Format number with K for thousands\r\n let displayNum = Math.ceil(current);\r\n if (displayNum >= 1000) {\r\n counter.textContent = (displayNum / 1000).toFixed(1).replace('.0', '') + 'K';\r\n } else {\r\n counter.textContent = displayNum.toLocaleString();\r\n }\r\n requestAnimationFrame(updateCounter);\r\n } else {\r\n // Final formatting\r\n if (target >= 1000) {\r\n counter.textContent = (target / 1000).toFixed(1).replace('.0', '') + 'K';\r\n counter.classList.add('formatted');\r\n } else {\r\n counter.textContent = target.toLocaleString();\r\n }\r\n counter.classList.add('animated');\r\n setTimeout(() => counter.classList.remove('animated'), 600);\r\n }\r\n };\r\n updateCounter();\r\n observer.unobserve(counter);\r\n }\r\n });\r\n }, { threshold: 0.5, rootMargin: '0px 0px -50px 0px' });\r\n \r\n statNumbers.forEach(counter => observer.observe(counter));\r\n}\r\n\r\n// Call this function when DOM is loaded\r\ndocument.addEventListener('DOMContentLoaded', () => {\r\n animateFactsCounters();\r\n});","animate_delay":"0"},"editing":false,"element_name":"gva_text_noeditor"}],"editing":false,"element_name":"gva_column"}],"editing":false,"element_name":"gva_row"},{"settings":{"element":"gva_row","bg_particles":"off","bg_position":"center top","bg_repeat":"no-repeat","bg_attachment":"scroll","bg_size":"cover","style_space":"remove_margin remove_padding remove_padding_col","layout":"container-fw","class":"zakatcalc"},"columns":[{"settings":{"element":"gva_column"},"col_lg":12,"elements":[{"settings":{"content":"\r\n\r\n \r\n \r\n \r\n \r\nSmart Zakat Calculator\r\n A precise and comprehensive tool\r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n \r\n \r\n Money & Savings\r\n \r\n \r\n \r\n Cash (on hand or at home)\r\n \r\n \r\n $\r\n \r\n \r\n \r\n Bank balances\r\n \r\n \r\n $\r\n \r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n Gold & Silver\r\n \r\n \r\n Refresh Prices\r\n \r\n \r\n \r\n \r\n \r\n Gold weight (grams)\r\n \r\n \r\n \r\n \r\n Current gold price per gram\r\n \r\n Live\r\n \r\n \r\n \r\n \r\n $ / gram\r\n \r\n \r\n \r\n\r\n \r\n \r\n Silver weight (grams)\r\n \r\n \r\n \r\n \r\n Current silver price per gram\r\n \r\n Live\r\n \r\n \r\n \r\n \r\n $ / gram\r\n \r\n \r\n \r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n Zakat Summary\r\n \r\n \r\n Total assets:\r\n 0.00 $\r\n \r\n \r\n Net zakatable assets:\r\n 0.00 $\r\n \r\n \r\n Nisab value (85g gold):\r\n ...\r\n \r\n \r\n Enter data to check eligibility\r\n \r\n \r\n \r\n\r\n \r\n \r\n Zakat due (2.5%)\r\n 0.00 $\r\n \r\n \r\n <a>\r\n \r\n Contact via WhatsApp for consultation and donation\r\n </a>\r\n \r\n \r\n \r\n \r\n\r\n\r\n// Zakat Calculator Logic\r\nlet zakatcalculatorPricesLoaded = false;\r\n\r\n// Initialize calculator when DOM is loaded\r\ndocument.addEventListener('DOMContentLoaded', () => {\r\n zakatcalculatorFetchPrices();\r\n zakatcalculatorCalculate();\r\n \r\n // Add input event listeners for real-time calculation\r\n const inputs = document.querySelectorAll('.zakatcalculator-section__input');\r\n inputs.forEach(input => {\r\n input.addEventListener('input', zakatcalculatorCalculate);\r\n });\r\n \r\n // Format numbers as user types\r\n inputs.forEach(input => {\r\n input.addEventListener('blur', function() {\r\n if (this.value) {\r\n const value = parseFloat(this.value);\r\n if (!isNaN(value)) {\r\n this.value = value.toLocaleString('en-US', {\r\n minimumFractionDigits: 2,\r\n maximumFractionDigits: 2\r\n });\r\n }\r\n }\r\n });\r\n \r\n input.addEventListener('focus', function() {\r\n if (this.value) {\r\n this.value = this.value.replace(/[^\\d.]/g, '');\r\n }\r\n });\r\n });\r\n});\r\n\r\n// Fetch metal prices\r\nasync function zakatcalculatorFetchPrices() {\r\n const goldInput = document.getElementById('goldPrice');\r\n const silverInput = document.getElementById('silverPrice');\r\n const refreshButton = document.querySelector('.zakatcalculator-section__refresh-button');\r\n const refreshIcon = document.querySelector('.zakatcalculator-section__refresh-icon');\r\n \r\n if (!refreshButton || !refreshIcon) return;\r\n \r\n // Show loading state\r\n refreshButton.disabled = true;\r\n refreshIcon.classList.add('zakatcalculator-section__refresh-icon--spinning');\r\n goldInput.classList.add('zakatcalculator-section__input--loading');\r\n silverInput.classList.add('zakatcalculator-section__input--loading');\r\n \r\n try {\r\n // Simulate API call with delay\r\n await new Promise(resolve => setTimeout(resolve, 1500));\r\n \r\n // Mock data (in a real app, you would fetch from an API)\r\n const liveGoldPrice = 76.50;\r\n const liveSilverPrice = 0.95;\r\n \r\n // Update inputs\r\n goldInput.value = liveGoldPrice.toFixed(2);\r\n silverInput.value = liveSilverPrice.toFixed(2);\r\n \r\n // Remove loading state\r\n goldInput.classList.remove('zakatcalculator-section__input--loading');\r\n silverInput.classList.remove('zakatcalculator-section__input--loading');\r\n goldInput.classList.add('zakatcalculator-section__input--valid');\r\n silverInput.classList.add('zakatcalculator-section__input--valid');\r\n \r\n zakatcalculatorPricesLoaded = true;\r\n \r\n // Show success feedback\r\n refreshButton.innerHTML = ' Updated';\r\n refreshButton.style.backgroundColor = '#617f67';\r\n refreshButton.style.color = 'white';\r\n \r\n setTimeout(() => {\r\n refreshButton.innerHTML = ' Refresh Prices';\r\n refreshButton.style.backgroundColor = '';\r\n refreshButton.style.color = '';\r\n }, 2000);\r\n \r\n } catch (error) {\r\n console.error(\"Failed to fetch prices\", error);\r\n \r\n // Fallback values\r\n goldInput.value = 75.00;\r\n silverInput.value = 0.90;\r\n \r\n // Show error state\r\n goldInput.classList.remove('zakatcalculator-section__input--loading');\r\n silverInput.classList.remove('zakatcalculator-section__input--loading');\r\n goldInput.classList.add('zakatcalculator-section__input--invalid');\r\n silverInput.classList.add('zakatcalculator-section__input--invalid');\r\n \r\n refreshButton.innerHTML = ' Update Failed';\r\n refreshButton.style.backgroundColor = '#dc2626';\r\n refreshButton.style.color = 'white';\r\n \r\n setTimeout(() => {\r\n refreshButton.innerHTML = ' Refresh Prices';\r\n refreshButton.style.backgroundColor = '';\r\n refreshButton.style.color = '';\r\n }, 2000);\r\n \r\n } finally {\r\n refreshButton.disabled = false;\r\n refreshIcon.classList.remove('zakatcalculator-section__refresh-icon--spinning');\r\n \r\n // Recalculate zakat\r\n zakatcalculatorCalculate();\r\n }\r\n}\r\n\r\n// Calculate zakat\r\nfunction zakatcalculatorCalculate() {\r\n const cashHand = parseFloat(document.getElementById('cashHand').value) || 0;\r\n const cashBank = parseFloat(document.getElementById('cashBank').value) || 0;\r\n const goldWeight = parseFloat(document.getElementById('goldWeight').value) || 0;\r\n const goldPrice = parseFloat(document.getElementById('goldPrice').value) || 0;\r\n const silverWeight = parseFloat(document.getElementById('silverWeight').value) || 0;\r\n const silverPrice = parseFloat(document.getElementById('silverPrice').value) || 0;\r\n \r\n // Calculate totals\r\n const totalAssets = cashHand + cashBank + (goldWeight * goldPrice) + (silverWeight * silverPrice);\r\n const nisabThreshold = 85 * goldPrice;\r\n \r\n // Update display\r\n document.getElementById('totalAssetsDisplay').textContent = \r\n formatCurrency(totalAssets);\r\n \r\n document.getElementById('netAssetsDisplay').textContent = \r\n formatCurrency(totalAssets);\r\n \r\n if (goldPrice > 0) {\r\n document.getElementById('nisabValueDisplay').textContent = \r\n formatCurrency(nisabThreshold);\r\n } else {\r\n document.getElementById('nisabValueDisplay').textContent = '...';\r\n }\r\n \r\n // Update status and final zakat\r\n const statusBadge = document.getElementById('statusBadge');\r\n const finalDisplay = document.getElementById('finalZakatDisplay');\r\n const payButton = document.querySelector('.zakatcalculator-section__pay-button');\r\n \r\n if (totalAssets >= nisabThreshold && goldPrice > 0 && zakatcalculatorPricesLoaded) {\r\n const zakatAmount = totalAssets * 0.025;\r\n finalDisplay.textContent = formatCurrency(zakatAmount);\r\n \r\n // Update status badge\r\n statusBadge.textContent = '✓ Zakat is due (Nisab reached)';\r\n statusBadge.className = 'zakatcalculator-section__status zakatcalculator-section__status--eligible';\r\n \r\n // Enable pay button\r\n payButton.disabled = false;\r\n payButton.innerHTML = ' Pay Zakat Now';\r\n \r\n } else {\r\n finalDisplay.textContent = '0.00 $';\r\n \r\n // Update status badge\r\n if (!zakatcalculatorPricesLoaded) {\r\n statusBadge.textContent = 'Enter data to check eligibility';\r\n statusBadge.className = 'zakatcalculator-section__status zakatcalculator-section__status--not-eligible';\r\n } else if (totalAssets < nisabThreshold) {\r\n statusBadge.textContent = 'Zakat is not due (Nisab not reached)';\r\n statusBadge.className = 'zakatcalculator-section__status zakatcalculator-section__status--not-eligible';\r\n } else {\r\n statusBadge.textContent = 'Enter data to check eligibility';\r\n statusBadge.className = 'zakatcalculator-section__status zakatcalculator-section__status--not-eligible';\r\n }\r\n \r\n // Disable pay button\r\n payButton.disabled = true;\r\n payButton.innerHTML = ' Pay Zakat Now';\r\n }\r\n}\r\n\r\n// Format currency\r\nfunction formatCurrency(amount) {\r\n return new Intl.NumberFormat('en-US', {\r\n style: 'currency',\r\n currency: 'USD',\r\n minimumFractionDigits: 2,\r\n maximumFractionDigits: 2\r\n }).format(amount);\r\n}\r\n\r\n// Add zakat to cart\r\nfunction zakatcalculatorAddToCart() {\r\n const amountText = document.getElementById('finalZakatDisplay').textContent;\r\n const amount = parseFloat(amountText.replace(/[^0-9.-]+/g, \"\"));\r\n \r\n if (amount > 0 && !isNaN(amount)) {\r\n // Use your existing addToCart function\r\n if (typeof addToCart === 'function') {\r\n addToCart('Calculated Zakat', amount, 'Zakat');\r\n } else {\r\n // Fallback if addToCart is not defined\r\n alert(`Calculated Zakat amount: ${amountText}`);\r\n }\r\n } else {\r\n alert(\"Invalid zakat amount. Please check your inputs.\");\r\n }\r\n}\r\n\r\n// Input validation\r\nfunction validateZakatInput(input) {\r\n const value = parseFloat(input.value);\r\n const min = parseFloat(input.getAttribute('min')) || 0;\r\n \r\n if (isNaN(value) || value < min) {\r\n input.classList.add('zakatcalculator-section__input--invalid');\r\n return false;\r\n } else {\r\n input.classList.remove('zakatcalculator-section__input--invalid');\r\n input.classList.add('zakatcalculator-section__input--valid');\r\n return true;\r\n }\r\n}","animate_delay":"0"},"editing":false,"element_name":"gva_text_noeditor"}],"editing":false,"element_name":"gva_column"}],"editing":false,"element_name":"gva_row"},{"settings":{"element":"gva_row","bg_particles":"off","bg_position":"center top","bg_repeat":"no-repeat","bg_attachment":"scroll","bg_size":"cover","style_space":"remove_margin remove_padding remove_padding_col","layout":"container-fw","class":"partner","margin_top":"30","margin_bottom":"30"},"columns":[{"settings":{"element":"gva_column"},"col_lg":12,"elements":[{"settings":{"content":"\r\n \r\n Strategic Partnerships\r\n Our partners in creating hope\r\n \r\n \r\n ","animate_delay":"0"},"editing":false,"element_name":"gva_text_noeditor"},{"settings":{"title_admin":"Partners: Partners Block - en","block_drupal":"views_block__partners_block_2","hidden_title":"on","align_title":"title-align-right","remove_margin":"on","style_text":"text-dark","animate_delay":"0"},"editing":false,"element_name":"gva_drupal_block"}],"editing":false,"element_name":"gva_column"}],"editing":false,"element_name":"gva_row"}]') (Line: 47)
Drupal\gavias_content_builder\Plugin\Field\FieldFormatter\GaviasContentBuilderFormatter->viewElements(Object, 'en') (Line: 89)
Drupal\Core\Field\FormatterBase->view(Object, 'en') (Line: 263)
Drupal\Core\Entity\Entity\EntityViewDisplay->buildMultiple(Array) (Line: 351)
Drupal\Core\Entity\EntityViewBuilder->buildComponents(Array, Array, Array, 'full') (Line: 24)
Drupal\node\NodeViewBuilder->buildComponents(Array, Array, Array, 'full') (Line: 293)
Drupal\Core\Entity\EntityViewBuilder->buildMultiple(Array) (Line: 250)
Drupal\Core\Entity\EntityViewBuilder->build(Array)
call_user_func_array(Array, Array) (Line: 100)
Drupal\Core\Render\Renderer->doTrustedCallback(Array, Array, 'Render #pre_render callbacks must be methods of a class that implements \Drupal\Core\Security\TrustedCallbackInterface or be an anonymous function. The callback was %s. Support for this callback implementation is deprecated in 8.8.0 and will be removed in Drupal 9.0.0. See https://www.drupal.org/node/2966725', 'silenced_deprecation', 'Drupal\Core\Render\Element\RenderCallbackInterface') (Line: 781)
Drupal\Core\Render\Renderer->doCallback('#pre_render', Array, Array) (Line: 372)
Drupal\Core\Render\Renderer->doRender(Array, ) (Line: 200)
Drupal\Core\Render\Renderer->render(Array, ) (Line: 226)
Drupal\Core\Render\MainContent\HtmlRenderer->Drupal\Core\Render\MainContent\{closure}() (Line: 573)
Drupal\Core\Render\Renderer->executeInRenderContext(Object, Object) (Line: 227)
Drupal\Core\Render\MainContent\HtmlRenderer->prepare(Array, Object, Object) (Line: 117)
Drupal\Core\Render\MainContent\HtmlRenderer->renderResponse(Array, Object, Object) (Line: 90)
Drupal\Core\EventSubscriber\MainContentViewSubscriber->onViewRenderArray(Object, 'kernel.view', Object)
call_user_func(Array, Object, 'kernel.view', Object) (Line: 111)
Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher->dispatch('kernel.view', Object) (Line: 156)
Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object, 1) (Line: 68)
Symfony\Component\HttpKernel\HttpKernel->handle(Object, 1, 1) (Line: 57)
Drupal\Core\StackMiddleware\Session->handle(Object, 1, 1) (Line: 47)
Drupal\Core\StackMiddleware\KernelPreHandle->handle(Object, 1, 1) (Line: 191)
Drupal\page_cache\StackMiddleware\PageCache->fetch(Object, 1, 1) (Line: 128)
Drupal\page_cache\StackMiddleware\PageCache->lookup(Object, 1, 1) (Line: 82)
Drupal\page_cache\StackMiddleware\PageCache->handle(Object, 1, 1) (Line: 47)
Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle(Object, 1, 1) (Line: 52)
Drupal\Core\StackMiddleware\NegotiationMiddleware->handle(Object, 1, 1) (Line: 23)
Stack\StackedHttpKernel->handle(Object, 1, 1) (Line: 708)
Drupal\Core\DrupalKernel->handle(Object) (Line: 19)
- Deprecated function: implode(): Passing glue string after array is deprecated. Swap the parameters in element_gva_row->render_content() (line 317 of themes/gavias_kunco/gva_content_builder/gva_row.php).
element_gva_row->render_content(Array, '
Strategic Partnerships
Our partners in creating hope
<a href="/en/node/265" hreflang="en">Clone </a>
<a href="/en/node/264" hreflang="en">Clone </a>
') (Line: 110)
gavias_content_builder_render_element('gva_row', Array, '
Strategic Partnerships
Our partners in creating hope
<a href="/en/node/265" hreflang="en">Clone </a>
<a href="/en/node/264" hreflang="en">Clone </a>
') (Line: 62)
gavias_content_builder_render_el(Array) (Line: 22)
gavias_content_builder_frontend('[{"settings":{"bg_particles":"off","bg_position":"center top","bg_repeat":"no-repeat","bg_attachment":"scroll","bg_size":"cover","style_space":"remove_padding","layout":"container-fw"},"columns":[{"settings":{"element":"gva_column","bg_position":"center top","bg_repeat":"no-repeat","bg_attachment":"scroll","bg_size":"cover","el_class":"front"},"col_lg":12,"elements":[{"settings":{"content":"\r\n \r\n \r\n \r\n \r\n Urgent Appeal\r\n \r\n Be a helping hand for them in\r\n times of crisis\r\n \r\n \r\n At \"Wejdan Charity\", we work with full transparency to deliver your donations to those in need in conflict and poverty-stricken areas.\r\n \r\n \r\n <a>\r\n Charity Donations \r\n </a>\r\n <a>\r\n Our Projects \r\n </a>\r\n \r\n \r\n \r\n \r\n","animate_delay":"0"},"editing":false,"element_name":"gva_text_noeditor"}],"editing":false,"element_name":"gva_column"}],"editing":false,"element_name":"gva_row"},{"settings":{"element":"gva_row","bg_particles":"off","bg_position":"center top","bg_repeat":"no-repeat","bg_attachment":"scroll","bg_size":"cover","style_space":"remove_padding","layout":"container","class":"before-help-region"},"columns":[{"settings":{"element":"gva_column"},"col_lg":12,"elements":[{"settings":{"title":"Take action for animals now","link":"#","button_title":"Donation Now","button_align":"button-right-v2","style_text":"text-light","style_button":"btn-theme","donorbox":"off","target":"off","el_class":"margin","animate":"fade-up","animate_delay":"0"},"editing":false,"element_name":"gva_call_to_action"}],"editing":false,"element_name":"gva_column"}],"editing":false,"element_name":"gva_row"},{"settings":{"element":"gva_row","bg_particles":"off","bg_position":"center top","bg_repeat":"no-repeat","bg_attachment":"scroll","bg_size":"cover","style_space":"remove_padding","layout":"container-fw","bg_color":"#f9fafb"},"columns":[{"settings":{"element":"gva_column","bg_position":"center top","bg_repeat":"no-repeat","bg_attachment":"scroll","bg_size":"cover","el_class":"about"},"col_lg":12,"elements":[{"settings":{"content":"\r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n \r\n \r\n Who We Are\r\n \r\n \r\n We plant hope.. \r\n and build people and the future\r\n \r\n \r\n Wejdan Charity is a leading humanitarian organization, founded with an ambitious vision to be a bridge of الخير between donors and those in need.\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n Development Stages\r\n A continuous journey of growth\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n Areas of Work\r\n We reach where the need is\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \"We work with passion to bring smiles\"\r\n \r\n \r\n \r\n \r\n \r\n","animate_delay":"0"},"editing":false,"element_name":"gva_text_noeditor"}],"editing":false,"element_name":"gva_column"}],"editing":false,"element_name":"gva_row"},{"settings":{"element":"gva_row","bg_particles":"off","bg_position":"center top","bg_repeat":"no-repeat","bg_attachment":"scroll","bg_size":"cover","style_space":"remove_margin remove_padding remove_padding_col","layout":"container-fw","class":"partner","margin_top":"30","margin_bottom":"30"},"columns":[{"settings":{"element":"gva_column"},"col_lg":12,"elements":[{"settings":{"content":"\r\n\r\n \r\n \r\n Initiatives & Programs\r\n Our Areas of Work\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n Ongoing Charity\r\n Water wells, mosque construction\r\n \r\n \r\n \r\n \r\n \r\n \r\n Student Sponsorship\r\n Building the future through education\r\n \r\n \r\n \r\n \r\n \r\n \r\n Humanitarian Cases\r\n Patient treatment, surgeries\r\n \r\n \r\n \r\n \r\n \r\n \r\n Development Projects\r\n Empowering productive families\r\n \r\n \r\n<a>Learn more about our programs and initiatives</a>\r\n \r\n","animate_delay":"0"},"editing":false,"element_name":"gva_text_noeditor"}],"editing":false,"element_name":"gva_column"}],"editing":false,"element_name":"gva_row"},{"settings":{"element":"gva_row","bg_particles":"off","bg_position":"center top","bg_repeat":"no-repeat","bg_attachment":"scroll","bg_size":"cover","style_space":"remove_margin remove_padding remove_padding_col","layout":"container","class":"newsfront"},"columns":[{"settings":{"element":"gva_column"},"col_lg":12,"elements":[{"settings":{"content":"\r\n \r\n \r\n Our News\r\n \r\n \r\n \r\nNews that tells the story of giving \r\n \r\n","animate_delay":"0"},"editing":false,"element_name":"gva_text_noeditor"},{"settings":{"title_admin":"news: news Block -en","block_drupal":"views_block__news_block_3","hidden_title":"on","align_title":"title-align-left","remove_margin":"on","style_text":"text-dark","animate_delay":"0"},"editing":false,"element_name":"gva_drupal_block"}],"editing":false,"element_name":"gva_column"}],"editing":false,"element_name":"gva_row"},{"settings":{"bg_particles":"off","bg_position":"center top","bg_repeat":"no-repeat","bg_attachment":"scroll","bg_size":"cover","style_space":"remove_padding","layout":"container-fw","element":"gva_row","class":"sliderfrontpage"},"columns":[{"settings":{"element":"gva_column","bg_position":"center top","bg_repeat":"no-repeat","bg_attachment":"scroll","bg_size":"cover"},"col_lg":12,"elements":[{"settings":{"title_admin":"news: campigns-en","block_drupal":"views_block__news_block_5","hidden_title":"on","align_title":"title-align-right","remove_margin":"on","style_text":"text-dark","animate_delay":"0"},"editing":false,"element_name":"gva_drupal_block"}],"editing":false,"element_name":"gva_column"}],"editing":false,"element_name":"gva_row"},{"settings":{"element":"gva_row","bg_particles":"off","bg_position":"center top","bg_repeat":"no-repeat","bg_attachment":"scroll","bg_size":"cover","style_space":"remove_margin remove_padding remove_padding_col","layout":"container-fw","class":"partner"},"columns":[{"settings":{"element":"gva_column"},"col_lg":12,"elements":[{"settings":{"content":"\r\n \r\n \r\n \r\n Our Distinguished Projects\r\n \r\n \r\n \r\n At Wejdan Charity, we strive to provide support and assistance to communities in need who are affected by disasters, crises, and wars, with the aim of improving quality of life and promoting sustainable development. Our projects span across several areas:\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n Relief Projects\r\n Emergency response to disasters and wars, providing food and medicine.\r\n \r\n<a> Browse Projects </a>\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n Development Projects\r\n Empowering communities and building capacities.\r\n \r\n<a> Browse Projects </a>\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n Seasonal Projects\r\n Ramadan campaigns, Qurbani, and winter clothing.\r\n \r\n<a> Browse Projects </a>\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n Endowment Projects\r\n An investment for the hereafter—mosques, wells, and charitable endowments.\r\n<a> Browse Projects </a>\r\n \r\n \r\n \r\n \r\n","animate_delay":"0"},"editing":false,"element_name":"gva_text_noeditor"}],"editing":false,"element_name":"gva_column"}],"editing":false,"element_name":"gva_row"},{"settings":{"element":"gva_row","bg_particles":"off","bg_position":"center top","bg_repeat":"no-repeat","bg_attachment":"scroll","bg_size":"cover","style_space":"remove_margin remove_padding remove_padding_col","layout":"container-fw","class":"partner"},"columns":[{"settings":{"element":"gva_column"},"col_lg":12,"elements":[{"settings":{"content":"\r\n \r\n \r\n\r\n \r\n \r\n Our Achievements in Numbers\r\n Your trust makes the difference\r\n \r\n \r\n\r\n \r\n \r\n 0\r\n Beneficiaries worldwide\r\n \r\n \r\n \r\n 0\r\n Projects implemented\r\n \r\n \r\n \r\n 0\r\n Countries we operate in\r\n \r\n \r\n \r\n 0\r\n Volunteers\r\n \r\n \r\n \r\n \r\n\r\n\r\n// Enhanced counter animation for facts section\r\nfunction animateFactsCounters() {\r\n const statNumbers = document.querySelectorAll('.facts-section__stat-number');\r\n \r\n const observer = new IntersectionObserver((entries) => {\r\n entries.forEach(entry => {\r\n if (entry.isIntersecting) {\r\n const counter = entry.target;\r\n const target = parseInt(counter.getAttribute('data-target'));\r\n const duration = 2000;\r\n const increment = target / (duration / 16);\r\n \r\n let current = 0;\r\n const updateCounter = () => {\r\n current += increment;\r\n if (current < target) {\r\n // Format number with K for thousands\r\n let displayNum = Math.ceil(current);\r\n if (displayNum >= 1000) {\r\n counter.textContent = (displayNum / 1000).toFixed(1).replace('.0', '') + 'K';\r\n } else {\r\n counter.textContent = displayNum.toLocaleString();\r\n }\r\n requestAnimationFrame(updateCounter);\r\n } else {\r\n // Final formatting\r\n if (target >= 1000) {\r\n counter.textContent = (target / 1000).toFixed(1).replace('.0', '') + 'K';\r\n counter.classList.add('formatted');\r\n } else {\r\n counter.textContent = target.toLocaleString();\r\n }\r\n counter.classList.add('animated');\r\n setTimeout(() => counter.classList.remove('animated'), 600);\r\n }\r\n };\r\n updateCounter();\r\n observer.unobserve(counter);\r\n }\r\n });\r\n }, { threshold: 0.5, rootMargin: '0px 0px -50px 0px' });\r\n \r\n statNumbers.forEach(counter => observer.observe(counter));\r\n}\r\n\r\n// Call this function when DOM is loaded\r\ndocument.addEventListener('DOMContentLoaded', () => {\r\n animateFactsCounters();\r\n});","animate_delay":"0"},"editing":false,"element_name":"gva_text_noeditor"}],"editing":false,"element_name":"gva_column"}],"editing":false,"element_name":"gva_row"},{"settings":{"element":"gva_row","bg_particles":"off","bg_position":"center top","bg_repeat":"no-repeat","bg_attachment":"scroll","bg_size":"cover","style_space":"remove_margin remove_padding remove_padding_col","layout":"container-fw","class":"zakatcalc"},"columns":[{"settings":{"element":"gva_column"},"col_lg":12,"elements":[{"settings":{"content":"\r\n\r\n \r\n \r\n \r\n \r\nSmart Zakat Calculator\r\n A precise and comprehensive tool\r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n \r\n \r\n Money & Savings\r\n \r\n \r\n \r\n Cash (on hand or at home)\r\n \r\n \r\n $\r\n \r\n \r\n \r\n Bank balances\r\n \r\n \r\n $\r\n \r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n Gold & Silver\r\n \r\n \r\n Refresh Prices\r\n \r\n \r\n \r\n \r\n \r\n Gold weight (grams)\r\n \r\n \r\n \r\n \r\n Current gold price per gram\r\n \r\n Live\r\n \r\n \r\n \r\n \r\n $ / gram\r\n \r\n \r\n \r\n\r\n \r\n \r\n Silver weight (grams)\r\n \r\n \r\n \r\n \r\n Current silver price per gram\r\n \r\n Live\r\n \r\n \r\n \r\n \r\n $ / gram\r\n \r\n \r\n \r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n Zakat Summary\r\n \r\n \r\n Total assets:\r\n 0.00 $\r\n \r\n \r\n Net zakatable assets:\r\n 0.00 $\r\n \r\n \r\n Nisab value (85g gold):\r\n ...\r\n \r\n \r\n Enter data to check eligibility\r\n \r\n \r\n \r\n\r\n \r\n \r\n Zakat due (2.5%)\r\n 0.00 $\r\n \r\n \r\n <a>\r\n \r\n Contact via WhatsApp for consultation and donation\r\n </a>\r\n \r\n \r\n \r\n \r\n\r\n\r\n// Zakat Calculator Logic\r\nlet zakatcalculatorPricesLoaded = false;\r\n\r\n// Initialize calculator when DOM is loaded\r\ndocument.addEventListener('DOMContentLoaded', () => {\r\n zakatcalculatorFetchPrices();\r\n zakatcalculatorCalculate();\r\n \r\n // Add input event listeners for real-time calculation\r\n const inputs = document.querySelectorAll('.zakatcalculator-section__input');\r\n inputs.forEach(input => {\r\n input.addEventListener('input', zakatcalculatorCalculate);\r\n });\r\n \r\n // Format numbers as user types\r\n inputs.forEach(input => {\r\n input.addEventListener('blur', function() {\r\n if (this.value) {\r\n const value = parseFloat(this.value);\r\n if (!isNaN(value)) {\r\n this.value = value.toLocaleString('en-US', {\r\n minimumFractionDigits: 2,\r\n maximumFractionDigits: 2\r\n });\r\n }\r\n }\r\n });\r\n \r\n input.addEventListener('focus', function() {\r\n if (this.value) {\r\n this.value = this.value.replace(/[^\\d.]/g, '');\r\n }\r\n });\r\n });\r\n});\r\n\r\n// Fetch metal prices\r\nasync function zakatcalculatorFetchPrices() {\r\n const goldInput = document.getElementById('goldPrice');\r\n const silverInput = document.getElementById('silverPrice');\r\n const refreshButton = document.querySelector('.zakatcalculator-section__refresh-button');\r\n const refreshIcon = document.querySelector('.zakatcalculator-section__refresh-icon');\r\n \r\n if (!refreshButton || !refreshIcon) return;\r\n \r\n // Show loading state\r\n refreshButton.disabled = true;\r\n refreshIcon.classList.add('zakatcalculator-section__refresh-icon--spinning');\r\n goldInput.classList.add('zakatcalculator-section__input--loading');\r\n silverInput.classList.add('zakatcalculator-section__input--loading');\r\n \r\n try {\r\n // Simulate API call with delay\r\n await new Promise(resolve => setTimeout(resolve, 1500));\r\n \r\n // Mock data (in a real app, you would fetch from an API)\r\n const liveGoldPrice = 76.50;\r\n const liveSilverPrice = 0.95;\r\n \r\n // Update inputs\r\n goldInput.value = liveGoldPrice.toFixed(2);\r\n silverInput.value = liveSilverPrice.toFixed(2);\r\n \r\n // Remove loading state\r\n goldInput.classList.remove('zakatcalculator-section__input--loading');\r\n silverInput.classList.remove('zakatcalculator-section__input--loading');\r\n goldInput.classList.add('zakatcalculator-section__input--valid');\r\n silverInput.classList.add('zakatcalculator-section__input--valid');\r\n \r\n zakatcalculatorPricesLoaded = true;\r\n \r\n // Show success feedback\r\n refreshButton.innerHTML = ' Updated';\r\n refreshButton.style.backgroundColor = '#617f67';\r\n refreshButton.style.color = 'white';\r\n \r\n setTimeout(() => {\r\n refreshButton.innerHTML = ' Refresh Prices';\r\n refreshButton.style.backgroundColor = '';\r\n refreshButton.style.color = '';\r\n }, 2000);\r\n \r\n } catch (error) {\r\n console.error(\"Failed to fetch prices\", error);\r\n \r\n // Fallback values\r\n goldInput.value = 75.00;\r\n silverInput.value = 0.90;\r\n \r\n // Show error state\r\n goldInput.classList.remove('zakatcalculator-section__input--loading');\r\n silverInput.classList.remove('zakatcalculator-section__input--loading');\r\n goldInput.classList.add('zakatcalculator-section__input--invalid');\r\n silverInput.classList.add('zakatcalculator-section__input--invalid');\r\n \r\n refreshButton.innerHTML = ' Update Failed';\r\n refreshButton.style.backgroundColor = '#dc2626';\r\n refreshButton.style.color = 'white';\r\n \r\n setTimeout(() => {\r\n refreshButton.innerHTML = ' Refresh Prices';\r\n refreshButton.style.backgroundColor = '';\r\n refreshButton.style.color = '';\r\n }, 2000);\r\n \r\n } finally {\r\n refreshButton.disabled = false;\r\n refreshIcon.classList.remove('zakatcalculator-section__refresh-icon--spinning');\r\n \r\n // Recalculate zakat\r\n zakatcalculatorCalculate();\r\n }\r\n}\r\n\r\n// Calculate zakat\r\nfunction zakatcalculatorCalculate() {\r\n const cashHand = parseFloat(document.getElementById('cashHand').value) || 0;\r\n const cashBank = parseFloat(document.getElementById('cashBank').value) || 0;\r\n const goldWeight = parseFloat(document.getElementById('goldWeight').value) || 0;\r\n const goldPrice = parseFloat(document.getElementById('goldPrice').value) || 0;\r\n const silverWeight = parseFloat(document.getElementById('silverWeight').value) || 0;\r\n const silverPrice = parseFloat(document.getElementById('silverPrice').value) || 0;\r\n \r\n // Calculate totals\r\n const totalAssets = cashHand + cashBank + (goldWeight * goldPrice) + (silverWeight * silverPrice);\r\n const nisabThreshold = 85 * goldPrice;\r\n \r\n // Update display\r\n document.getElementById('totalAssetsDisplay').textContent = \r\n formatCurrency(totalAssets);\r\n \r\n document.getElementById('netAssetsDisplay').textContent = \r\n formatCurrency(totalAssets);\r\n \r\n if (goldPrice > 0) {\r\n document.getElementById('nisabValueDisplay').textContent = \r\n formatCurrency(nisabThreshold);\r\n } else {\r\n document.getElementById('nisabValueDisplay').textContent = '...';\r\n }\r\n \r\n // Update status and final zakat\r\n const statusBadge = document.getElementById('statusBadge');\r\n const finalDisplay = document.getElementById('finalZakatDisplay');\r\n const payButton = document.querySelector('.zakatcalculator-section__pay-button');\r\n \r\n if (totalAssets >= nisabThreshold && goldPrice > 0 && zakatcalculatorPricesLoaded) {\r\n const zakatAmount = totalAssets * 0.025;\r\n finalDisplay.textContent = formatCurrency(zakatAmount);\r\n \r\n // Update status badge\r\n statusBadge.textContent = '✓ Zakat is due (Nisab reached)';\r\n statusBadge.className = 'zakatcalculator-section__status zakatcalculator-section__status--eligible';\r\n \r\n // Enable pay button\r\n payButton.disabled = false;\r\n payButton.innerHTML = ' Pay Zakat Now';\r\n \r\n } else {\r\n finalDisplay.textContent = '0.00 $';\r\n \r\n // Update status badge\r\n if (!zakatcalculatorPricesLoaded) {\r\n statusBadge.textContent = 'Enter data to check eligibility';\r\n statusBadge.className = 'zakatcalculator-section__status zakatcalculator-section__status--not-eligible';\r\n } else if (totalAssets < nisabThreshold) {\r\n statusBadge.textContent = 'Zakat is not due (Nisab not reached)';\r\n statusBadge.className = 'zakatcalculator-section__status zakatcalculator-section__status--not-eligible';\r\n } else {\r\n statusBadge.textContent = 'Enter data to check eligibility';\r\n statusBadge.className = 'zakatcalculator-section__status zakatcalculator-section__status--not-eligible';\r\n }\r\n \r\n // Disable pay button\r\n payButton.disabled = true;\r\n payButton.innerHTML = ' Pay Zakat Now';\r\n }\r\n}\r\n\r\n// Format currency\r\nfunction formatCurrency(amount) {\r\n return new Intl.NumberFormat('en-US', {\r\n style: 'currency',\r\n currency: 'USD',\r\n minimumFractionDigits: 2,\r\n maximumFractionDigits: 2\r\n }).format(amount);\r\n}\r\n\r\n// Add zakat to cart\r\nfunction zakatcalculatorAddToCart() {\r\n const amountText = document.getElementById('finalZakatDisplay').textContent;\r\n const amount = parseFloat(amountText.replace(/[^0-9.-]+/g, \"\"));\r\n \r\n if (amount > 0 && !isNaN(amount)) {\r\n // Use your existing addToCart function\r\n if (typeof addToCart === 'function') {\r\n addToCart('Calculated Zakat', amount, 'Zakat');\r\n } else {\r\n // Fallback if addToCart is not defined\r\n alert(`Calculated Zakat amount: ${amountText}`);\r\n }\r\n } else {\r\n alert(\"Invalid zakat amount. Please check your inputs.\");\r\n }\r\n}\r\n\r\n// Input validation\r\nfunction validateZakatInput(input) {\r\n const value = parseFloat(input.value);\r\n const min = parseFloat(input.getAttribute('min')) || 0;\r\n \r\n if (isNaN(value) || value < min) {\r\n input.classList.add('zakatcalculator-section__input--invalid');\r\n return false;\r\n } else {\r\n input.classList.remove('zakatcalculator-section__input--invalid');\r\n input.classList.add('zakatcalculator-section__input--valid');\r\n return true;\r\n }\r\n}","animate_delay":"0"},"editing":false,"element_name":"gva_text_noeditor"}],"editing":false,"element_name":"gva_column"}],"editing":false,"element_name":"gva_row"},{"settings":{"element":"gva_row","bg_particles":"off","bg_position":"center top","bg_repeat":"no-repeat","bg_attachment":"scroll","bg_size":"cover","style_space":"remove_margin remove_padding remove_padding_col","layout":"container-fw","class":"partner","margin_top":"30","margin_bottom":"30"},"columns":[{"settings":{"element":"gva_column"},"col_lg":12,"elements":[{"settings":{"content":"\r\n \r\n Strategic Partnerships\r\n Our partners in creating hope\r\n \r\n \r\n ","animate_delay":"0"},"editing":false,"element_name":"gva_text_noeditor"},{"settings":{"title_admin":"Partners: Partners Block - en","block_drupal":"views_block__partners_block_2","hidden_title":"on","align_title":"title-align-right","remove_margin":"on","style_text":"text-dark","animate_delay":"0"},"editing":false,"element_name":"gva_drupal_block"}],"editing":false,"element_name":"gva_column"}],"editing":false,"element_name":"gva_row"}]') (Line: 47)
Drupal\gavias_content_builder\Plugin\Field\FieldFormatter\GaviasContentBuilderFormatter->viewElements(Object, 'en') (Line: 89)
Drupal\Core\Field\FormatterBase->view(Object, 'en') (Line: 263)
Drupal\Core\Entity\Entity\EntityViewDisplay->buildMultiple(Array) (Line: 351)
Drupal\Core\Entity\EntityViewBuilder->buildComponents(Array, Array, Array, 'full') (Line: 24)
Drupal\node\NodeViewBuilder->buildComponents(Array, Array, Array, 'full') (Line: 293)
Drupal\Core\Entity\EntityViewBuilder->buildMultiple(Array) (Line: 250)
Drupal\Core\Entity\EntityViewBuilder->build(Array)
call_user_func_array(Array, Array) (Line: 100)
Drupal\Core\Render\Renderer->doTrustedCallback(Array, Array, 'Render #pre_render callbacks must be methods of a class that implements \Drupal\Core\Security\TrustedCallbackInterface or be an anonymous function. The callback was %s. Support for this callback implementation is deprecated in 8.8.0 and will be removed in Drupal 9.0.0. See https://www.drupal.org/node/2966725', 'silenced_deprecation', 'Drupal\Core\Render\Element\RenderCallbackInterface') (Line: 781)
Drupal\Core\Render\Renderer->doCallback('#pre_render', Array, Array) (Line: 372)
Drupal\Core\Render\Renderer->doRender(Array, ) (Line: 200)
Drupal\Core\Render\Renderer->render(Array, ) (Line: 226)
Drupal\Core\Render\MainContent\HtmlRenderer->Drupal\Core\Render\MainContent\{closure}() (Line: 573)
Drupal\Core\Render\Renderer->executeInRenderContext(Object, Object) (Line: 227)
Drupal\Core\Render\MainContent\HtmlRenderer->prepare(Array, Object, Object) (Line: 117)
Drupal\Core\Render\MainContent\HtmlRenderer->renderResponse(Array, Object, Object) (Line: 90)
Drupal\Core\EventSubscriber\MainContentViewSubscriber->onViewRenderArray(Object, 'kernel.view', Object)
call_user_func(Array, Object, 'kernel.view', Object) (Line: 111)
Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher->dispatch('kernel.view', Object) (Line: 156)
Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object, 1) (Line: 68)
Symfony\Component\HttpKernel\HttpKernel->handle(Object, 1, 1) (Line: 57)
Drupal\Core\StackMiddleware\Session->handle(Object, 1, 1) (Line: 47)
Drupal\Core\StackMiddleware\KernelPreHandle->handle(Object, 1, 1) (Line: 191)
Drupal\page_cache\StackMiddleware\PageCache->fetch(Object, 1, 1) (Line: 128)
Drupal\page_cache\StackMiddleware\PageCache->lookup(Object, 1, 1) (Line: 82)
Drupal\page_cache\StackMiddleware\PageCache->handle(Object, 1, 1) (Line: 47)
Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle(Object, 1, 1) (Line: 52)
Drupal\Core\StackMiddleware\NegotiationMiddleware->handle(Object, 1, 1) (Line: 23)
Stack\StackedHttpKernel->handle(Object, 1, 1) (Line: 708)
Drupal\Core\DrupalKernel->handle(Object) (Line: 19)