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,IAAAC,OAAA,kCAAAI,qDAAA,6CAAAL,GAAA,IAAAC,OAAA,4BAAAI,2DAAA,oCAAAL,GAAA,IAAAC,OAAA,4BAAAI,+CAAA,mCAAAL,GAAA,IAAAC,OAAA,2BAAAI,+CAAA,+CAAAL,GAAA,IAAAC,OAAA,4BAAAI,6DACK,WAAWV,SAC9B,IAAK+F,EACH,MAAM,IAAIC,MAAM,mBAAmBhG,KAErC,OAAO+F,GAAK,EAEdE,SAAgBA,EAAQ,GAAGA,IAAU3B,EAAKe,OAAOzD,EAAE,kBACnD,WAAMsE,EAAMC,GAAEA,MAAIC,EAAKC,QAAAC,OAAOA,UAEtBrB,UAAUX,EAAKe,OAAOvF,QAE5B,MAAMyG,EAAMC,EAAU,CAAEC,OAAQ,IAAMxF,EAAEmF,EAAKC,KAC1CK,IAAIJ,GACJI,IAAIpC,GAGDqC,EAAapB,EAAQqB,UAAU,OACjCD,GACFA,EAAWE,uBAAuBN,GAIpCA,EAAIO,MAAMX,EAAE","names":["async","loadLocaleMessages","locale","files","name","loader","__variableDynamicImportRuntimeHelper","Object","assign","__vitePreload","import","then","n","a","__VITE_PRELOAD__","b","c","d","e","f","g","h","i","j","k","l","m","o","p","q","r","s","t","u","v","w","x","y","z","A","B","C","D","E","F","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z","_","$","Promise","all","map","data","default","error","reduce","acc","curr","i18n","createI18n","fallbackLocale","messages","getDirection","includes","setDirection","direction","document","documentElement","setAttribute","setLocale","keys","length","fallbackMessages","global","setLocaleMessage","Bugsnag","start","apiKey","appVersion","plugins","BugsnagPluginVue","createInertiaApp","resolve","page","Error","title","setup","el","App","props","plugin","app","createApp","render","use","bugsnagVue","getPlugin","installVueErrorHandler","mount"],"ignoreList":[],"sources":["../../../resources/js/i18n.js","../../../resources/js/app.js"],"sourcesContent":["import { createI18n } from 'vue-i18n';\n\n// Function to load locale messages dynamically\nasync function loadLocaleMessages(locale) {\n const files = [\n { name: 'accounts_management', loader: import(`./lang/${locale}/accounts_management.json`) },\n { name: 'agency_services', loader: import(`./lang/${locale}/agency_services.json`) },\n { name: 'branch', loader: import(`./lang/${locale}/branch.json`) },\n { name: 'business_financing', loader: import(`./lang/${locale}/business_financing.json`) },\n { name: 'careers', loader: import(`./lang/${locale}/careers.json`) },\n { name: 'charitable_associations_and_institutions', loader: import(`./lang/${locale}/charitable_associations_and_institutions.json`) },\n { name: 'common', loader: import(`./lang/${locale}/common.json`) },\n { name: 'compliance_statement', loader: import(`./lang/${locale}/compliance_statement.json`) },\n { name: 'current_accounts', loader: import(`./lang/${locale}/current_accounts.json`) },\n { name: 'electronic_payment_cards', loader: import(`./lang/${locale}/electronic_payment_cards.json`) },\n { name: 'error', loader: import(`./lang/${locale}/error.json`) },\n { name: 'financials_page', loader: import(`./lang/${locale}/financials_page.json`) },\n { name: 'footer', loader: import(`./lang/${locale}/footer.json`) },\n { name: 'home', loader: import(`./lang/${locale}/home.json`) },\n { name: 'individual_services', loader: import(`./lang/${locale}/individual_services.json`) },\n { name: 'internal_transfers', loader: import(`./lang/${locale}/internal_transfers.json`) },\n {name: 'internet_banking', loader: import(`./lang/${locale}/internet_banking.json`) },\n { name: 'investment_products', loader: import(`./lang/${locale}/investment_products.json`) },\n { name: 'navbar', loader: import(`./lang/${locale}/navbar.json`) },\n { name: 'news', loader: import(`./lang/${locale}/news.json`) },\n { name: 'our_vision', loader: import(`./lang/${locale}/our_vision.json`) },\n { name: 'page_headers', loader: import(`./lang/${locale}/page_headers.json`) },\n { name: 'privacy_policy', loader: import(`./lang/${locale}/privacy_policy.json`) },\n { name: 'seo', loader: import(`./lang/${locale}/seo.json`) },\n { name: 'sharia_compliance', loader: import(`./lang/${locale}/sharia_compliance.json`) },\n { name: 'telephone_banking_services', loader: import(`./lang/${locale}/telephone_banking_services.json`) },\n { name: 'terms_conditions', loader: import(`./lang/${locale}/terms_conditions.json`) },\n ];\n\n try {\n const messages = await Promise.all(\n files.map(async ({ name, loader }) => {\n try {\n const data = await loader;\n return { [name]: data.default };\n } catch (error) {\n console.warn(`Could not load ${name} for locale: ${locale}. Falling back to default/fallback.`);\n return {}; // Return an empty object if loading fails\n }\n })\n );\n\n return messages.reduce((acc, curr) => ({ ...acc, ...curr }), {});\n } catch (error) {\n console.error(`Could not load messages for locale: ${locale}`, error);\n return {};\n }\n}\n\n// Initialize vue-i18n with an empty messages object\nexport const i18n = createI18n({\n locale: 'ar', // Default locale (Arabic)\n fallbackLocale: 'en', // Fallback to English if the locale cannot be determined\n messages: {}, // Initially, messages are empty to enable lazy loading\n});\n\n// Function to get the direction based on locale (rtl for Arabic, ltr for English)\nexport const getDirection = (locale) => {\n const rtlLocales = ['ar']; // List of RTL locales\n return rtlLocales.includes(locale) ? 'rtl' : 'ltr';\n};\n\n// Function to set the direction of the document\nexport const setDirection = (locale) => {\n const direction = getDirection(locale);\n document.documentElement.setAttribute('dir', direction); // Set the `dir` attribute\n};\n\n// Function to change the locale dynamically\nexport const setLocale = async (locale) => {\n if (!locale) {\n console.error('Locale is not defined or is invalid.');\n return;\n }\n \n try {\n const messages = await loadLocaleMessages(locale);\n if (Object.keys(messages).length === 0) {\n console.warn(`Locale ${locale} could not load properly, falling back to 'en'.`);\n locale = 'en';\n setDirection(locale);\n }\n\n const fallbackMessages = locale === 'en' ? messages : await loadLocaleMessages('en');\n i18n.global.setLocaleMessage(locale, messages);\n i18n.global.setLocaleMessage('en', fallbackMessages); // Set fallback locale messages\n \n i18n.global.locale = locale;\n setDirection(locale);\n\n } catch (error) {\n console.error(`Failed to load locale: ${locale}, switching to fallback locale 'en'.`, error);\n await setLocale('en'); // Ensure that 'en' is set in case of any error\n }\n};\n","import Bugsnag from '@bugsnag/js';\nimport BugsnagPluginVue from '@bugsnag/plugin-vue';\nimport { createInertiaApp } from '@inertiajs/vue3';\nimport { createApp, h } from 'vue';\nimport '../css/app.css';\nimport '../css/scss/main.scss';\nimport { i18n, setLocale } from './i18n'; // Import both i18n and setLocale\n\n// Get Bugsnag API key from environment variables\nconst bugsnagApiKey = import.meta.env.VITE_BUGSNAG_API_KEY;\nconst appVersion = import.meta.env.VITE_APP_VERSION;\n\nconst isProduction = import.meta.env.MODE === 'production';\n\nif (bugsnagApiKey && isProduction) {\n // Initialize Bugsnag and Bugsnag Vue plugin\n Bugsnag.start({\n apiKey: bugsnagApiKey,\n appVersion: appVersion,\n plugins: [new BugsnagPluginVue()],\n });\n}\n\n\ncreateInertiaApp({\n // Dynamic import using import.meta.glob for lazy loading\n resolve: (name) => {\n const pages = import.meta.glob('./Pages/**/*.vue'); // Lazy load pages dynamically\n const page = pages[`./Pages/${name}.vue`];\n if (!page) {\n throw new Error(`Page not found: ${name}`);\n }\n return page(); // Load the specific page dynamically\n },\n title: title => title ? `${title}` : i18n.global.t('common.appName'),\n async setup({ el, App, props, plugin }) {\n // Set the initial locale and ensure messages are loaded before mounting the app\n await setLocale(i18n.global.locale); // Load the messages for the default locale ('en')\n\n const app = createApp({ render: () => h(App, props) })\n .use(plugin)\n .use(i18n);\n\n // Install Bugsnag error handler for Vue\n const bugsnagVue = Bugsnag.getPlugin('vue');\n if (bugsnagVue) {\n bugsnagVue.installVueErrorHandler(app);\n }\n\n // Mount the app after ensuring that translations are properly loaded\n app.mount(el);\n },\n});\n"],"file":"assets/app-ywokInbN.js"}