const isLoggedIn = false; const userTimeZone = Intl.DateTimeFormat().resolvedOptions().timeZone; function setCookie(name, value, expires) { const d = new Date(); if (!expires) { expires = 30 * 24 * 3600; // 30 days from now } d.setTime(d.getTime() + (expires * 1000)); let expiresStr = "expires=" + d.toUTCString(); document.cookie = name + "=" + value + ";" + expiresStr + ";path=/"; } function getCookie(name) { // Encode the name to ensure it's handled correctly const nameEQ = name + "="; // Split the string into an array of individual cookie strings const ca = document.cookie.split(';'); for (let i = 0; i < ca.length; i++) { let c = ca[i]; // Trim leading whitespace from the cookie string while (c.charAt(0) === ' ') { c = c.substring(1, c.length); } // If the cookie string starts with the name being searched if (c.indexOf(nameEQ) === 0) { // Return the value part of the string, which starts after the name and the equals sign return c.substring(nameEQ.length, c.length); } } return null; // Return null if the cookie name is not found } async function api(method, endPoint, params, auth) { const headers = new Headers(); if (!auth) { auth = gSession; // global session token } headers.append('Authorization', `Bearer ${auth}`); let str; let maybeBody; if (method == 'GET') { const urlParams = new URLSearchParams(params); str = urlParams.size > 0 ? ('&' + urlParams.toString()) : ''; maybeBody = {}; } else { str = ''; maybeBody = { body: JSON.stringify(params) }; } const response = await fetch('/api/?p=' + endPoint + str, { method: method, headers: headers, ...maybeBody }); if (!response.ok) { return false; } const data = await response.json(); if (data.success === false && (data.error_code === 201 || data.error_code === 202)) { // authentication error redirect('/sign_in/'); } return data; } async function apiGet(endPoint, data, auth) { return await api('GET', endPoint, data, auth); } async function apiPost(endPoint, data, auth) { return await api('POST', endPoint, data, auth); } function displayCurrency(x) { var thousandSep = ' '; x = x.toFixed(2).toString().replace('.', ','); var pattern = /(-?\d+)(\d{3})/; while (pattern.test(x)) x = x.replace(pattern, "$1" + thousandSep + "$2"); return x + ' DA'; } function txt(eng) { var texts = {"next":{"fr":"Suivant","ar":"\u0627\u0644\u062a\u0627\u0644\u064a"},"add a note (optional)":{"fr":"Ajouter une note (facultatif)","ar":"\u0623\u0636\u0641 \u0645\u0644\u0627\u062d\u0638\u0629 (\u0627\u062e\u062a\u064a\u0627\u0631\u064a)"},"show this qr code to your payer":{"fr":"Pr\u00e9senter ce code QR \u00e0 votre payeur","ar":"\u0623\u0638\u0647\u0631 \u0631\u0645\u0632 QR \u0647\u0630\u0627 \u0644\u0644\u062c\u0647\u0629 \u0627\u0644\u062a\u064a \u0633\u062a\u0642\u0648\u0645 \u0628\u0627\u0644\u062f\u0641\u0639 \u0644\u0643"},"add reference (optional)":{"fr":"Ajouter une r\u00e9f\u00e9rence (facultatif)","ar":"\u0625\u0636\u0627\u0641\u0629 \u0645\u0631\u062c\u0639 (\u0627\u062e\u062a\u064a\u0627\u0631\u064a)"},"your payees":{"fr":"Vos b\u00e9n\u00e9ficiaires","ar":"\u0627\u0644\u0645\u0633\u062a\u0641\u064a\u062f\u0648\u0646 \u0645\u0646 \u0645\u062f\u0641\u0648\u0639\u0627\u062a\u0643"},"scan code":{"fr":"Scanner un Code","ar":"\u0627\u0645\u0633\u062d \u0627\u0644\u0631\u0645\u0632"},"add payee":{"fr":"Ajouter un b\u00e9n\u00e9ficiaire","ar":"\u0625\u0636\u0627\u0641\u0629 \u0645\u0633\u062a\u0641\u064a\u062f"},"search by name or email":{"fr":"Recherche par nom ou par courriel","ar":"\u0627\u0644\u0628\u062d\u062b \u0628\u0627\u0644\u0627\u0633\u0645 \u0623\u0648 \u0627\u0644\u0628\u0631\u064a\u062f \u0627\u0644\u0625\u0644\u0643\u062a\u0631\u0648\u0646\u064a"},"enter a fullname (lastname then firstname), email, or business name":{"fr":"Veuillez saisir un nom complet (nom de famille puis pr\u00e9nom), une adresse e-mail ou un nom d'entreprise","ar":"\u0623\u062f\u062e\u0644 \u0627\u0644\u0627\u0633\u0645 \u0627\u0644\u0643\u0627\u0645\u0644 (\u0627\u0633\u0645 \u0627\u0644\u0639\u0627\u0626\u0644\u0629 \u062b\u0645 \u0627\u0644\u0627\u0633\u0645 \u0627\u0644\u0623\u0648\u0644)\u060c \u0623\u0648 \u0627\u0644\u0628\u0631\u064a\u062f \u0627\u0644\u0625\u0644\u0643\u062a\u0631\u0648\u0646\u064a\u060c \u0623\u0648 \u0627\u0633\u0645 \u0627\u0644\u0634\u0631\u0643\u0629"},"you are initiating a payment to":{"fr":"Vous \u00eates en train d'effectuer un paiement \u00e0","ar":"\u0623\u0646\u062a \u0628\u0635\u062f\u062f \u0628\u062f\u0621 \u0639\u0645\u0644\u064a\u0629 \u062f\u0641\u0639 \u0625\u0644\u0649"},"confirm":{"fr":"Confirmer","ar":"\u062a\u0623\u0643\u064a\u062f"},"cancel":{"fr":"Annuler","ar":"\u0625\u0644\u063a\u0627\u0621"},"payment of":{"fr":"Paiement de","ar":"\u062f\u0641\u0639"},"was successfully sent to":{"fr":"a \u00e9t\u00e9 envoy\u00e9 avec succ\u00e8s \u00e0","ar":"\u062a\u0645 \u0625\u0631\u0633\u0627\u0644\u0647\u0627 \u0628\u0646\u062c\u0627\u062d \u0625\u0644\u0649"},"ok":{"fr":"OK","ar":"\u0645\u0648\u0627\u0641\u0642"},"enter the code that was sent to you via email to confirm payment":{"fr":"Saisissez le code qui vous a \u00e9t\u00e9 envoy\u00e9 par e-mail pour confirmer le paiement","ar":"\u0623\u062f\u062e\u0644 \u0627\u0644\u0631\u0645\u0632 \u0627\u0644\u0630\u064a \u062a\u0645 \u0625\u0631\u0633\u0627\u0644\u0647 \u0625\u0644\u064a\u0643 \u0639\u0628\u0631 \u0627\u0644\u0628\u0631\u064a\u062f \u0627\u0644\u0625\u0644\u0643\u062a\u0631\u0648\u0646\u064a \u0644\u062a\u0623\u0643\u064a\u062f \u0627\u0644\u062f\u0641\u0639"},"submit":{"fr":"Soumettre","ar":"\u0625\u0631\u0633\u0627\u0644"},"to":{"fr":"\u00e0","ar":"\u0644"},"from":{"fr":"depuis","ar":"\u0645\u0646"},"ref":{"fr":"R\u00e9f","ar":"\u0645\u0631\u062c\u0639"},"ccp":{"fr":"CCP","ar":"\u0627\u0644\u0628\u0631\u064a\u062f"},"business":{"fr":"Entreprise","ar":"\u062a\u062c\u0627\u0631\u064a"},"individual":{"fr":"Individuel","ar":"\u0634\u062e\u0635\u064a"},"balance":{"fr":"Solde","ar":"\u0631\u0635\u064a\u062f"},"withdraw":{"fr":"Retirer","ar":"\u0633\u062d\u0628"},"deposit":{"fr":"D\u00e9poser","ar":"\u0625\u064a\u062f\u0627\u0639"},"email":{"fr":"E-mail","ar":"\u0628\u0631\u064a\u062f \u0625\u0644\u0643\u062a\u0631\u0648\u0646\u064a"},"name":{"fr":"Nom","ar":"\u0627\u0633\u0645"},"update":{"fr":"Mise \u00e0 jour","ar":"\u062a\u062d\u062f\u064a\u062b"},"profile photo":{"fr":"Photo de profil","ar":"\u0635\u0648\u0631\u0629 \u0627\u0644\u0645\u0644\u0641 \u0627\u0644\u0634\u062e\u0635\u064a"},"account type":{"fr":"Type de compte","ar":"\u0646\u0648\u0639 \u0627\u0644\u062d\u0633\u0627\u0628"},"business name":{"fr":"Nom de l'entreprise","ar":"\u0627\u0633\u0645 \u0627\u0644\u0634\u0631\u0643\u0629"},"close":{"fr":"Fermer","ar":"\u0625\u063a\u0644\u0627\u0642"},"account":{"fr":"Compte","ar":"\u062d\u0633\u0627\u0628"},"sign out":{"fr":"Se d\u00e9connecter","ar":"\u062a\u0633\u062c\u064a\u0644 \u0627\u0644\u062e\u0631\u0648\u062c"},"fee":{"fr":"Frais","ar":"\u062a\u0643\u0644\u0641\u0629"},"new deposit":{"fr":"Nouveau d\u00e9p\u00f4t","ar":"\u0625\u064a\u062f\u0627\u0639 \u062c\u062f\u064a\u062f"},"make a ccp transfer to the following account number":{"fr":"Effectuer un virement CCP vers le num\u00e9ro de compte suivant","ar":"\u0642\u0645 \u0628\u062a\u062d\u0648\u064a\u0644 \u0646\u0642\u062f\u064a \u0645\u0646 \u062d\u0633\u0628\u0643 \u0627\u0644\u0628\u0631\u064a\u062f\u064a \u0625\u0644\u0649 \u0631\u0642\u0645 \u0627\u0644\u062d\u0633\u0627\u0628 \u0627\u0644\u062a\u0627\u0644\u064a"},"then enter the amount and reference number below":{"fr":"Ensuite saisir le montant et le num\u00e9ro de r\u00e9f\u00e9rence ci-dessous","ar":"\u062b\u0645 \u0623\u062f\u062e\u0644 \u0627\u0644\u0645\u0628\u0644\u063a \u0648\u0631\u0642\u0645 \u0627\u0644\u0645\u0631\u062c\u0639 \u0623\u062f\u0646\u0627\u0647"},"amount in da":{"fr":"Montant en DA","ar":"\u0627\u0644\u0645\u0628\u0644\u063a \u0628\u0627\u0644\u062f\u064a\u0646\u0627\u0631"},"reference":{"fr":"R\u00e9f\u00e9rence","ar":"\u0645\u0631\u062c\u0639"},"pending deposits":{"fr":"D\u00e9p\u00f4ts en attente","ar":"\u0627\u0644\u0625\u064a\u062f\u0627\u0639\u0627\u062a \u0627\u0644\u0645\u0639\u0644\u0642\u0629"},"enter the amount you want to withdraw and the destination ccp account number":{"fr":"Saisir le montant \u00e0 retirer et le num\u00e9ro de compte CCP de destination","ar":"\u0623\u062f\u062e\u0644 \u0627\u0644\u0645\u0628\u0644\u063a \u0627\u0644\u0630\u064a \u062a\u0631\u063a\u0628 \u0641\u064a \u0633\u062d\u0628\u0647 \u0648\u0631\u0642\u0645 \u062d\u0633\u0627\u0628 CCP \u0627\u0644\u0648\u062c\u0647\u0629"},"ccp account number":{"fr":"Num\u00e9ro de compte CCP","ar":"\u0631\u0642\u0645 \u062d\u0633\u0627\u0628 CCP"},"pending withdrawals":{"fr":"Retraits en attente","ar":"\u0639\u0645\u0644\u064a\u0627\u062a \u0627\u0644\u0633\u062d\u0628 \u0627\u0644\u0645\u0639\u0644\u0642\u0629"},"send":{"fr":"Envoyer","ar":"\u0625\u0631\u0633\u0627\u0644"},"payees":{"fr":"B\u00e9n\u00e9ficiaires","ar":"\u0627\u0644\u0645\u0633\u062a\u0641\u064a\u062f\u0648\u0646"},"pay":{"fr":"Payer","ar":"\u062f\u0641\u0639"},"receive":{"fr":"Recevoir","ar":"\u0627\u0633\u062a\u0644\u0627\u0645"},"transactions":{"fr":"Transactions","ar":"\u0627\u0644\u0645\u0639\u0627\u0645\u0644\u0627\u062a"},"da":{"fr":"DA","ar":"\u062f\u062c"},"billions":{"fr":"milliards","ar":"\u0645\u0644\u0627\u064a\u0631"},"millions":{"fr":"millions","ar":"\u0645\u0644\u0627\u064a\u0646"},"thousands":{"fr":"milles","ar":"\u0622\u0644\u0627\u0641"},"cents":{"fr":"centimes","ar":"\u0633\u0646\u062a\u064a\u0645"},"invalid email":{"fr":"Adresse e-mail invalide","ar":"\u0628\u0631\u064a\u062f \u0625\u0644\u0643\u062a\u0631\u0648\u0646\u064a \u063a\u064a\u0631 \u0635\u0627\u0644\u062d"},"invalid password":{"fr":"Mot de passe invalide","ar":"\u0643\u0644\u0645\u0629 \u0645\u0631\u0648\u0631 \u063a\u064a\u0631 \u0635\u062d\u064a\u062d\u0629"},"wrong email or password":{"fr":"Adresse e-mail ou mot de passe incorrect","ar":"\u0628\u0631\u064a\u062f \u0625\u0644\u0643\u062a\u0631\u0648\u0646\u064a \u0623\u0648 \u0643\u0644\u0645\u0629 \u0645\u0631\u0648\u0631 \u062e\u0627\u0637\u0626\u0629"},"failed to send you a reset-password email. please contact support":{"fr":"Impossible de vous envoyer un e-mail de r\u00e9initialisation de mot de passe. Veuillez contacter l'assistance","ar":"\u0644\u0645 \u064a\u062a\u0645 \u0625\u0631\u0633\u0627\u0644 \u0628\u0631\u064a\u062f \u0625\u0644\u0643\u062a\u0631\u0648\u0646\u064a \u0644\u0625\u0639\u0627\u062f\u0629 \u062a\u0639\u064a\u064a\u0646 \u0643\u0644\u0645\u0629 \u0627\u0644\u0645\u0631\u0648\u0631. \u064a\u0631\u062c\u0649 \u0627\u0644\u0627\u062a\u0635\u0627\u0644 \u0628\u0627\u0644\u062f\u0639\u0645"},"passwords do not match":{"fr":"Les mots de passe ne correspondent pas","ar":"\u0643\u0644\u0645\u0627\u062a \u0627\u0644\u0645\u0631\u0648\u0631 \u063a\u064a\u0631 \u0645\u062a\u0637\u0627\u0628\u0642\u0629"},"wrong email or reset code":{"fr":"Adresse e-mail ou code de r\u00e9initialisation incorrects","ar":"\u0628\u0631\u064a\u062f \u0625\u0644\u0643\u062a\u0631\u0648\u0646\u064a \u062e\u0627\u0637\u0626 \u0623\u0648 \u0631\u0645\u0632 \u0625\u0639\u0627\u062f\u0629 \u062a\u0639\u064a\u064a\u0646 \u062e\u0627\u0637\u0626"},"failed to update your password. please contact support":{"fr":"Impossible de mettre \u00e0 jour votre mot de passe. Veuillez contacter l'assistance","ar":"\u0641\u0634\u0644 \u062a\u062d\u062f\u064a\u062b \u0643\u0644\u0645\u0629 \u0627\u0644\u0645\u0631\u0648\u0631. \u064a\u0631\u062c\u0649 \u0627\u0644\u0627\u062a\u0635\u0627\u0644 \u0628\u0627\u0644\u062f\u0639\u0645"},"email already registered. if this is your account, please login":{"fr":"Adresse e-mail d\u00e9j\u00e0 enregistr\u00e9e. Si c'est votre compte, veuillez vous connecter","ar":"\u062a\u0645 \u062a\u0633\u062c\u064a\u0644 \u0627\u0644\u0628\u0631\u064a\u062f \u0627\u0644\u0625\u0644\u0643\u062a\u0631\u0648\u0646\u064a \u0645\u0633\u0628\u0642\u0627\u064b. \u0625\u0630\u0627 \u0643\u0627\u0646 \u0647\u0630\u0627 \u062d\u0633\u0627\u0628\u0643\u060c \u064a\u064f\u0631\u062c\u0649 \u062a\u0633\u062c\u064a\u0644 \u0627\u0644\u062f\u062e\u0648\u0644"},"failed to create a new account. please contact customer service":{"fr":"Impossible de cr\u00e9er un compte. Veuillez contacter le service client","ar":"\u0641\u0634\u0644 \u0625\u0646\u0634\u0627\u0621 \u062d\u0633\u0627\u0628 \u062c\u062f\u064a\u062f. \u064a\u0631\u062c\u0649 \u0627\u0644\u0627\u062a\u0635\u0627\u0644 \u0628\u062e\u062f\u0645\u0629 \u0627\u0644\u0639\u0645\u0644\u0627\u0621"},"sign in":{"fr":"Se connecter","ar":"\u062a\u0633\u062c\u064a\u0644 \u0627\u0644\u062f\u062e\u0648\u0644"},"password":{"fr":"Mot de passe","ar":"\u0643\u0644\u0645\u0629 \u0627\u0644\u0645\u0631\u0648\u0631"},"forgot password":{"fr":"Mot de passe oubli\u00e9","ar":"\u0647\u0644 \u0646\u0633\u064a\u062a \u0643\u0644\u0645\u0629 \u0627\u0644\u0633\u0631"},"reset password":{"fr":"R\u00e9initialiser le mot de passe","ar":"\u0625\u0639\u0627\u062f\u0629 \u062a\u0639\u064a\u064a\u0646 \u0643\u0644\u0645\u0629 \u0627\u0644\u0645\u0631\u0648\u0631"},"don't have an account":{"fr":"Vous n'avez pas de compte ?","ar":"\u0644\u064a\u0633 \u0644\u062f\u064a\u0643 \u062d\u0633\u0627\u0628"},"create account":{"fr":"Cr\u00e9er un compte","ar":"\u0625\u0646\u0634\u0627\u0621 \u062d\u0633\u0627\u0628"},"enter your account email so we send you a password-reset code":{"fr":"Veuillez saisir l'adresse e-mail de votre compte afin que nous puissions vous envoyer un code de r\u00e9initialisation de mot de passe","ar":"\u0623\u062f\u062e\u0644 \u0628\u0631\u064a\u062f\u0643 \u0627\u0644\u0625\u0644\u0643\u062a\u0631\u0648\u0646\u064a \u0627\u0644\u0645\u0633\u062c\u0644 \u0641\u064a \u062d\u0633\u0627\u0628\u0643 \u0644\u0646\u0631\u0633\u0644 \u0644\u0643 \u0631\u0645\u0632 \u0625\u0639\u0627\u062f\u0629 \u062a\u0639\u064a\u064a\u0646 \u0643\u0644\u0645\u0629 \u0627\u0644\u0645\u0631\u0648\u0631"},"you remember your password":{"fr":"Vous vous souvenez de votre mot de passe","ar":"\u062a\u062a\u0630\u0643\u0631 \u0643\u0644\u0645\u0629 \u0645\u0631\u0648\u0631\u0643"},"enter the reset password code we sent by email and your new password":{"fr":"Saisissez le code de r\u00e9initialisation de mot de passe que nous vous avons envoy\u00e9 par e-mail et votre nouveau mot de passe","ar":"\u0623\u062f\u062e\u0644 \u0631\u0645\u0632 \u0625\u0639\u0627\u062f\u0629 \u062a\u0639\u064a\u064a\u0646 \u0643\u0644\u0645\u0629 \u0627\u0644\u0645\u0631\u0648\u0631 \u0627\u0644\u0630\u064a \u0623\u0631\u0633\u0644\u0646\u0627\u0647 \u0639\u0628\u0631 \u0627\u0644\u0628\u0631\u064a\u062f \u0627\u0644\u0625\u0644\u0643\u062a\u0631\u0648\u0646\u064a \u0648\u0643\u0644\u0645\u0629 \u0645\u0631\u0648\u0631\u0643 \u0627\u0644\u062c\u062f\u064a\u062f\u0629"},"code":{"fr":"Code","ar":"\u0634\u0641\u0631\u0629"},"new password":{"fr":"Nouveau mot de passe","ar":"\u0643\u0644\u0645\u0629 \u0627\u0644\u0645\u0631\u0648\u0631 \u0627\u0644\u062c\u062f\u064a\u062f\u0629"},"retype new password":{"fr":"Saisissez \u00e0 nouveau le nouveau mot de passe","ar":"\u0623\u0639\u062f \u0643\u062a\u0627\u0628\u0629 \u0643\u0644\u0645\u0629 \u0627\u0644\u0645\u0631\u0648\u0631 \u0627\u0644\u062c\u062f\u064a\u062f\u0629"},"retype password":{"fr":"Retaper le mot de passe","ar":"\u0623\u0639\u062f \u0643\u062a\u0627\u0628\u0629 \u0643\u0644\u0645\u0629 \u0627\u0644\u0645\u0631\u0648\u0631"},"create":{"fr":"Cr\u00e9er","ar":"\u064a\u062e\u0644\u0642"},"have an account":{"fr":"Avoir un compte","ar":"\u0644\u062f\u064a\u0643 \u062d\u0633\u0627\u0628"},"error signing in":{"fr":"Erreur de connexion","ar":"\u062d\u062f\u062b \u062e\u0637\u0623 \u0641\u064a \u062a\u0633\u062c\u064a\u0644 \u0627\u0644\u062f\u062e\u0648\u0644"},"status":{"fr":"Statut","ar":"\u062d\u0627\u0644\u0629"},"error":{"fr":"Erreur","ar":"\u062e\u0637\u0623"},"error retrieving session":{"fr":"Erreur lors de la r\u00e9cup\u00e9ration de la session","ar":"\u062e\u0637\u0623 \u0641\u064a \u0627\u0633\u062a\u0631\u062f\u0627\u062f \u0627\u0644\u062c\u0644\u0633\u0629"},"billion":{"fr":"milliard","ar":"\u0645\u0644\u064a\u0627\u0631"},"million":{"fr":"million","ar":"\u0645\u0644\u064a\u0648\u0646"},"thousand":{"fr":"mille","ar":"\u0623\u0644\u0641"},"cent":{"fr":"centime","ar":"\u0633\u0646\u062a\u064a\u0645"},"upload":{"fr":"T\u00e9l\u00e9charger","ar":"\u0631\u0641\u0639"},"save":{"fr":"Sauvegarder","ar":"\u064a\u062d\u0641\u0638"},"your identity verification is currently pending. please return later when the verification is complete":{"fr":"Votre v\u00e9rification d'identit\u00e9 est en cours. Veuillez revenir plus tard une fois la v\u00e9rification termin\u00e9e","ar":"\u0639\u0645\u0644\u064a\u0629 \u0627\u0644\u062a\u062d\u0642\u0642 \u0645\u0646 \u0647\u0648\u064a\u062a\u0643 \u0642\u064a\u062f \u0627\u0644\u0627\u0646\u062a\u0638\u0627\u0631 \u062d\u0627\u0644\u064a\u064b\u0627. \u064a\u0631\u062c\u0649 \u0627\u0644\u0639\u0648\u062f\u0629 \u0644\u0627\u062d\u0642\u064b\u0627 \u0639\u0646\u062f \u0627\u0643\u062a\u0645\u0627\u0644 \u0639\u0645\u0644\u064a\u0629 \u0627\u0644\u062a\u062d\u0642\u0642"},"identity verification":{"fr":"V\u00e9rification d'identit\u00e9","ar":"\u0627\u0644\u062a\u062d\u0642\u0642 \u0645\u0646 \u0627\u0644\u0647\u0648\u064a\u0629"},"enter your legal name as it appears on your national identification card or passport":{"fr":"Veuillez saisir votre nom l\u00e9gal tel qu'il figure sur votre carte nationale d'identit\u00e9 ou votre passeport","ar":"\u0623\u062f\u062e\u0644 \u0627\u0633\u0645\u0643 \u0627\u0644\u0642\u0627\u0646\u0648\u0646\u064a \u0643\u0645\u0627 \u064a\u0638\u0647\u0631 \u0641\u064a \u0628\u0637\u0627\u0642\u0629 \u0647\u0648\u064a\u062a\u0643 \u0627\u0644\u0648\u0637\u0646\u064a\u0629 \u0623\u0648 \u062c\u0648\u0627\u0632 \u0633\u0641\u0631\u0643"},"first name":{"fr":"Pr\u00e9nom","ar":"\u0627\u0644\u0627\u0633\u0645 \u0627\u0644\u0623\u0648\u0644"},"last name":{"fr":"Nom de famille","ar":"\u0627\u0633\u0645 \u0627\u0644\u0639\u0627\u0626\u0644\u0629"},"take a photo of the front side of your national identification card or the main page of your passport":{"fr":"Prenez une photo du recto de votre carte nationale d'identit\u00e9 ou de la page principale de votre passeport","ar":"\u0627\u0644\u062a\u0642\u0637 \u0635\u0648\u0631\u0629 \u0644\u0644\u0648\u062c\u0647 \u0627\u0644\u0623\u0645\u0627\u0645\u064a \u0644\u0628\u0637\u0627\u0642\u0629 \u0647\u0648\u064a\u062a\u0643 \u0627\u0644\u0648\u0637\u0646\u064a\u0629 \u0623\u0648 \u0627\u0644\u0635\u0641\u062d\u0629 \u0627\u0644\u0631\u0626\u064a\u0633\u064a\u0629 \u0644\u062c\u0648\u0627\u0632 \u0633\u0641\u0631\u0643"},"retake":{"fr":"Reprendre","ar":"\u0625\u0639\u0627\u062f\u0629 \u0627\u0644\u0627\u062e\u062a\u0628\u0627\u0631"},"take a selfie photo of yourself holding your identification document you took a photo of in the previous screen":{"fr":"Prenez un selfie de vous tenant votre pi\u00e8ce d'identit\u00e9 dont vous avez pris la photo sur l'\u00e9cran pr\u00e9c\u00e9dent","ar":"\u0627\u0644\u062a\u0642\u0637 \u0635\u0648\u0631\u0629 \u0633\u064a\u0644\u0641\u064a \u0644\u0646\u0641\u0633\u0643 \u0648\u0623\u0646\u062a \u062a\u062d\u0645\u0644 \u0648\u062b\u064a\u0642\u0629 \u0647\u0648\u064a\u062a\u0643 \u0627\u0644\u062a\u064a \u0642\u0645\u062a \u0628\u062a\u0635\u0648\u064a\u0631\u0647\u0627 \u0641\u064a \u0627\u0644\u0634\u0627\u0634\u0629 \u0627\u0644\u0633\u0627\u0628\u0642\u0629"},"payment sent":{"fr":"Paiement envoy\u00e9","ar":"\u0625\u0631\u0633\u0627\u0644 \u0645\u0628\u0644\u063a"},"ccp withdrawal":{"fr":"Retrait au CCP","ar":"\u0633\u062d\u0628 \u0625\u0644\u0649 \u0627\u0644\u0628\u0631\u064a\u062f"},"payment received":{"fr":"Paiement re\u00e7u","ar":"\u0627\u0633\u062a\u0644\u0627\u0645 \u0645\u0628\u0644\u063a"},"ccp deposit":{"fr":"d\u00e9p\u00f4t du CCP","ar":"\u0625\u064a\u062f\u0627\u0639 \u0645\u0646 \u0627\u0644\u0628\u0631\u064a\u062f"},"language":{"fr":"Langue","ar":"\u0644\u063a\u0629"},"appearance":{"fr":"Apparence","ar":"\u0645\u0638\u0647\u0631"},"dark mode":{"fr":"Mode sombre","ar":"\u0627\u0644\u0648\u0636\u0639 \u0627\u0644\u062f\u0627\u0643\u0646"},"light mode":{"fr":"Mode clair","ar":"\u0627\u0644\u0648\u0636\u0639 \u0627\u0644\u0641\u0627\u062a\u062d"},"transfer from your ccp account to your cash dz account":{"fr":"Effectuez un virement depuis votre compte CCP vers votre compte Cash DZ.","ar":"\u062d\u0648\u0644 \u0645\u0646 \u062d\u0633\u0627\u0628\u0643 \u0641\u064a CCP \u0625\u0644\u0649 \u062d\u0633\u0627\u0628\u0643 \u0641\u064a Cash DZ"},"withdraw from your cash dz account to your ccp account":{"fr":"Effectuez un retrait de votre compte Cash DZ vers votre compte CCP.","ar":"\u0627\u0633\u062d\u0628 \u0645\u0646 \u062d\u0633\u0627\u0628\u0643 Cash DZ \u0625\u0644\u0649 \u062d\u0633\u0627\u0628\u0643 CCP"},"you are initiating a payment of":{"fr":"Vous initiez un paiement de","ar":"\u0623\u0646\u062a \u0628\u0635\u062f\u062f \u0628\u062f\u0621 \u0639\u0645\u0644\u064a\u0629 \u062f\u0641\u0639 \u0645\u0628\u0644\u063a"},"enter the code that was sent to you via email to confirm payment. the code expires in":{"fr":"Saisissez le code qui vous a \u00e9t\u00e9 envoy\u00e9 par e-mail pour confirmer le paiement. Ce code expire dans [date manquante].","ar":"\u0623\u062f\u062e\u0644 \u0627\u0644\u0631\u0645\u0632 \u0627\u0644\u0630\u064a \u062a\u0645 \u0625\u0631\u0633\u0627\u0644\u0647 \u0625\u0644\u064a\u0643 \u0639\u0628\u0631 \u0627\u0644\u0628\u0631\u064a\u062f \u0627\u0644\u0625\u0644\u0643\u062a\u0631\u0648\u0646\u064a \u0644\u062a\u0623\u0643\u064a\u062f \u0627\u0644\u062f\u0641\u0639. \u064a\u0646\u062a\u0647\u064a \u0635\u0644\u0627\u062d\u064a\u0629 \u0627\u0644\u0631\u0645\u0632 \u062e\u0644\u0627\u0644"},"minutes":{"fr":"minutes","ar":"\u062f\u0642\u0627\u0626\u0642"},"identity verified":{"fr":"Identit\u00e9 v\u00e9rifi\u00e9e","ar":"\u062a\u0645 \u0627\u0644\u062a\u062d\u0642\u0642 \u0645\u0646 \u0627\u0644\u0647\u0648\u064a\u0629"},"your identity is confirmed. your account is activated":{"fr":"Votre identit\u00e9 est confirm\u00e9e. Votre compte est activ\u00e9.","ar":"\u062a\u0645 \u062a\u0623\u0643\u064a\u062f \u0647\u0648\u064a\u062a\u0643. \u062a\u0645 \u062a\u0641\u0639\u064a\u0644 \u062d\u0633\u0627\u0628\u0643."},"deposit successful":{"fr":"D\u00e9p\u00f4t r\u00e9ussi","ar":"\u062a\u0645 \u0627\u0644\u0625\u064a\u062f\u0627\u0639 \u0628\u0646\u062c\u0627\u062d"},"your deposit of":{"fr":"Votre d\u00e9p\u00f4t de","ar":"\u0625\u064a\u062f\u0627\u0639\u0643 \u0628\u0645\u0628\u0644\u063a"},"was successful":{"fr":"a r\u00e9ussi","ar":"\u0643\u0627\u0646 \u0646\u0627\u062c\u062d\u0627"},"withdrawal successful":{"fr":"Retrait r\u00e9ussi","ar":"\u062a\u0645 \u0627\u0644\u0633\u062d\u0628 \u0628\u0646\u062c\u0627\u062d"},"your withdrawal of":{"fr":"Votre retrait de","ar":"\u0633\u062d\u0628\u0643 \u0644\u0640"},"you sent a payment of":{"fr":"Vous avez envoy\u00e9 un paiement de","ar":"\u0644\u0642\u062f \u0623\u0631\u0633\u0644\u062a \u062f\u0641\u0639\u0629 \u0628\u0642\u064a\u0645\u0629"},"you received a payment of":{"fr":"Vous avez re\u00e7u un paiement de","ar":"\u0644\u0642\u062f \u062a\u0644\u0642\u064a\u062a \u062f\u0641\u0639\u0629 \u0642\u062f\u0631\u0647\u0627"}}; var lowEng = eng.toLowerCase(); var lang = 'en'; return (texts[lowEng] && texts[lowEng][lang]) || eng; } function toCentsParts(value) { tValue = Math.abs(value); billions = millions = thousands = 0; if (tValue >= 10000000) { billions = Math.floor(tValue / 10000000); tValue = tValue - (billions * 10000000); } if (tValue >= 10000) { millions = Math.floor(tValue / 10000); tValue = tValue - (millions * 10000); } if (tValue >= 10) { thousands = Math.floor(tValue / 10); tValue = tValue - (thousands * 10); } cents = Math.round(tValue * 100); return [billions, millions, thousands, cents]; } function arabicOnesSingle(value) { var cent = value % 100; return cent < 3 || cent > 10; } function getUnitNames(values) { var ar = false; return [ values[0] === 1 || ar && arabicOnesSingle(values[0]) ? 'billion' : 'billions', values[1] === 1 || ar && arabicOnesSingle(values[1]) ? 'million' : 'millions', values[2] === 1 || ar && arabicOnesSingle(values[2]) ? 'thousand' : 'thousands', values[3] === 1 || ar && arabicOnesSingle(values[3]) ? 'cent' : 'cents', ]; } function displayCurrencyInWords(value) { var text = ''; var groupConnector = ', '; [billions, millions, thousands, cents] = toCentsParts(value); [unitBillions, unitMillions, unitThousands, unitCents] = getUnitNames([billions, millions, thousands, cents]); if (billions > 0) text = ((billions === 1 ? '' : billions + ' ') + unitBillions); if (millions > 0) text += (text ? groupConnector : '') + ((millions === 1 ? '' : millions + ' ') + unitMillions); if (thousands > 0) text += (text ? groupConnector : '') + ((thousands === 1 ? '' : thousands + ' ') + unitThousands); if (cents > 0) text += (text ? groupConnector : '') + ((cents === 1 ? '' : cents + ' ') + unitCents); return text; } var autoCloseTimeout = null; var oncloseMessageCallback = null; function showMessage(text, autoClose, success, onclose) { var suc = 'bg-green-100 border-green-400 text-green-700'; var err = 'bg-red-100 border-red-400 text-red-700'; $('#message-box').removeClass(success ? err : suc).addClass(success ? suc : err); $('#message-box div.body').text(txt(text)); $('#message-box-ok').toggle(!autoClose); $('#message-box').show(); clearTimeout(autoCloseTimeout); if (autoClose) { autoCloseTimeout = setTimeout(function() { $('#message-box').hide(); }, 2000); } oncloseMessageCallback = onclose; } function closeMessage() { $('#message-box').hide(); if (typeof oncloseMessageCallback == 'function') { oncloseMessageCallback(); } } function signOut() { redirect('/sign_in/?action=sign_out'); } function escapeRegExp(string) { // Matches all special regex characters and escapes them with a backslash. return string.replace(/[.*+?^${}()|[\]\\]/g, '\\$&'); } function displayDateTime(datetimeUTC, dateOnly) { var options; if (dateOnly) { options = { timeZone: userTimeZone, year: 'numeric', month: 'numeric', day: 'numeric' }; } else { options = { timeZone: userTimeZone, year: 'numeric', month: 'numeric', day: 'numeric', hour: 'numeric', minute: 'numeric' }; } datetimeUTC = datetimeUTC.replace(' ', '\T') + '\Z'; return (new Date(datetimeUTC)).toLocaleString(undefined, options); } function sendMsgToApp(data) { if (window.FlutterChannel) { window.FlutterChannel.postMessage(JSON.stringify(data)); } } function msgFromApp(dataStr) { var data = JSON.parse(dataStr); switch (data.type) { case 'fcmToken': setCookie('device_token', data.token, 365 * 24 * 3600); if (isLoggedIn) { apiPost('SetDeviceToken', { 'device_token': data.token }); } return { "tokenReceived": true }; break; } } function emailValid(email) { return /^.+@[a-z0-9\-]+\.[a-z]{2,}$/i.test(email); } function passwordValid(password) { return /[A-Z]+/.test(password) && /[a-z]+/.test(password) && /[0-9]+/.test(password) && /[\!\@\#\$\%\^\&\*]+/.test(password) && (password.length >= 8); } function codeValid(code) { return /^[0-9]{6}$/.test(code); } function amountValid(amount) { return amount >= 0 && amount <= 9999999.99; } function nameValid(name) { return /^[A-Za-z ']+$/.test(name); } function appNameValid(name) { return /^[A-Za-z ']{6,}$/.test(name); } function getCoverCropDimensions(videoElement) { const videoWidth = videoElement.videoWidth; const videoHeight = videoElement.videoHeight; const containerWidth = videoElement.clientWidth; const containerHeight = videoElement.clientHeight; const videoRatio = videoWidth / videoHeight; const containerRatio = containerWidth / containerHeight; let sx, sy, sWidth, sHeight; if (containerRatio > videoRatio) { // The container is wider than the video ratio // Video is "letterboxed" horizontally, cropped vertically sWidth = videoWidth; sHeight = videoWidth / containerRatio; sx = 0; sy = (videoHeight - sHeight) / 2; } else { // The container is taller than the video ratio (or ratios are equal) // Video is "letterboxed" vertically, cropped horizontally sWidth = videoHeight * containerRatio; sHeight = videoHeight; sx = (videoWidth - sWidth) / 2; sy = 0; } return { sx: sx, sy: sy, sWidth: sWidth, sHeight: sHeight }; } function fileContentToBase64(file) { return new Promise((resolve, reject) => { const reader = new FileReader(); reader.readAsDataURL(file); reader.onload = () => resolve(reader.result); reader.onerror = reject; }); } function redirect(url) { window.location = url; }