diff --git a/odex25_takaful/ensan_sale_management_takaful/__init__.py b/odex25_takaful/ensan_sale_management_takaful/__init__.py
new file mode 100644
index 000000000..9a7e03ede
--- /dev/null
+++ b/odex25_takaful/ensan_sale_management_takaful/__init__.py
@@ -0,0 +1 @@
+from . import models
\ No newline at end of file
diff --git a/odex25_takaful/ensan_sale_management_takaful/__manifest__.py b/odex25_takaful/ensan_sale_management_takaful/__manifest__.py
new file mode 100644
index 000000000..18bdcee24
--- /dev/null
+++ b/odex25_takaful/ensan_sale_management_takaful/__manifest__.py
@@ -0,0 +1,18 @@
+{
+ 'name': 'Ensan Sale Management Takaful',
+ 'version': '1.0',
+ 'description': 'Bridging Takaful and Sale Management',
+ 'summary': 'Bridging Takaful and Sale Management',
+ 'author': 'Expert Co. Ltd.',
+ 'website': 'http://www.exp-sa.com',
+ 'license': 'LGPL-3',
+ 'category': 'Odex25-Ens',
+ 'depends': [
+ 'ensan_sale_management',
+ 'odex_takaful',
+ ],
+ 'data': [
+ 'views/product_template_views.xml',
+ ],
+ 'auto_install': True,
+}
\ No newline at end of file
diff --git a/odex25_takaful/ensan_sale_management_takaful/models/__init__.py b/odex25_takaful/ensan_sale_management_takaful/models/__init__.py
new file mode 100644
index 000000000..232754377
--- /dev/null
+++ b/odex25_takaful/ensan_sale_management_takaful/models/__init__.py
@@ -0,0 +1 @@
+from . import product
\ No newline at end of file
diff --git a/odex25_takaful/ensan_sale_management_takaful/models/product.py b/odex25_takaful/ensan_sale_management_takaful/models/product.py
new file mode 100644
index 000000000..265a09a18
--- /dev/null
+++ b/odex25_takaful/ensan_sale_management_takaful/models/product.py
@@ -0,0 +1,8 @@
+from odoo import models
+
+class ProductTemplate(models.Model):
+ _inherit = 'product.template'
+
+ def _compute_fixed_value(self):
+ for rec in self:
+ rec.fixed_value = rec.donation_type == 'Fixed Amount'
\ No newline at end of file
diff --git a/odex25_takaful/ensan_sale_management_takaful/views/product_template_views.xml b/odex25_takaful/ensan_sale_management_takaful/views/product_template_views.xml
new file mode 100644
index 000000000..539dabbb8
--- /dev/null
+++ b/odex25_takaful/ensan_sale_management_takaful/views/product_template_views.xml
@@ -0,0 +1,16 @@
+
+
+ ${ctx.get('body')} +
+ ++ Thank you, +
+ ++ From ${ctx.get('company_name')}. +
+ ]]> + + + diff --git a/odex25_takaful/odex_takaful/i18n/ar_001.po b/odex25_takaful/odex_takaful/i18n/ar_001.po new file mode 100644 index 000000000..3582cee76 --- /dev/null +++ b/odex25_takaful/odex_takaful/i18n/ar_001.po @@ -0,0 +1,7565 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * odex_takaful +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 14.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2025-10-19 10:59+0000\n" +"PO-Revision-Date: 2025-10-19 10:59+0000\n" +"Last-Translator: \n" +"Language-Team: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: \n" + +#. module: odex_takaful +#: model:ir.actions.report,print_report_name:odex_takaful.action_report_transfer_deduction_pdf +msgid "" +"\n" +" (object.sponsorship_creation_date and ('Transfer Deduction Report - %s' % (object.sponsorship_creation_date.strftime('%Y-%m-%d'))) or 'Transfer Deduction Report')\n" +" " +msgstr "" + +#. module: odex_takaful +#: model:mail.template,body_html:odex_takaful.push_notification_email_template +msgid "" +"\n" +"\n" +" Dear ${ctx.get('partner_name')},\n" +"
\n" +" \n" +"\n" +" ${ctx.get('body')}\n" +"
\n" +"\n" +"\n" +" Thank you,\n" +"
\n" +"\n" +"\n" +" From ${ctx.get('company_name')}.\n" +"
\n" +" " +msgstr "" + +#. module: odex_takaful +#: code:addons/odex_takaful/models/takaful_month_payment.py:0 +#, python-format +msgid " No benefits for pay" +msgstr "" + +#. module: odex_takaful +#: code:addons/odex_takaful/models/takaful_sponorship_model.py:0 +#, python-format +msgid " Please set Journal in Payment Details " +msgstr "يرجى تعيين اليومية في تفاصيل الدفع" + +#. module: odex_takaful +#: code:addons/odex_takaful/models/takaful_sponorship_model.py:0 +#, python-format +msgid " Please set donor's payable and receivable accounts first " +msgstr "يرجى تحديد حسابات الدفع والقبض أولا" + +#. module: odex_takaful +#: code:addons/odex_takaful/models/takaful_sponorship_model.py:0 +#: code:addons/odex_takaful/models/takaful_sponorship_model.py:0 +#, python-format +msgid "" +" Please set income journal in settings (kafala_journal_id Payment Journal)" +msgstr "يرجى ضبط دفتر الإيراد في الإعدادات" + +#. module: odex_takaful +#: code:addons/odex_takaful/models/takaful_sponorship_model.py:0 +#, python-format +msgid " Please set orphan restricted income account in settings " +msgstr "يرجى تعيين حساب الإيراد المقيد للأيتام في الإعدادات" + +#. module: odex_takaful +#: code:addons/odex_takaful/models/takaful_sponorship_model.py:0 +#, python-format +msgid " Please set widow restricted income account in settings " +msgstr "يرجى تعيين حساب الإيراد المقيد للأرملة في الإعدادات" + +#. module: odex_takaful +#: model:ir.model.fields,field_description:odex_takaful.field_donations_items___quantity +msgid " Quantity" +msgstr "" + +#. module: odex_takaful +#: model:ir.model.fields,field_description:odex_takaful.field_takaful_sponsor__event_count +msgid "# Events" +msgstr "عدد الفعاليات" + +#. module: odex_takaful +#: model:ir.model.fields,field_description:odex_takaful.field_takaful_sponsor__meeting_count +msgid "# Meetings" +msgstr "عدد الاجتماعات" + +#. module: odex_takaful +#: model:ir.model.fields,field_description:odex_takaful.field_takaful_sponsor__operation_count +msgid "# Of Operations" +msgstr "العمليات" + +#. module: odex_takaful +#: model:ir.model.fields,field_description:odex_takaful.field_takaful_sponsor__signature_count +msgid "# Signatures" +msgstr "التوقيعات" + +#. module: odex_takaful +#: model:ir.model.fields,field_description:odex_takaful.field_takaful_sponsor__task_count +msgid "# Tasks" +msgstr "عدد المهام" + +#. module: odex_takaful +#: model:ir.model.fields,field_description:odex_takaful.field_takaful_sponsor__supplier_invoice_count +msgid "# Vendor Bills" +msgstr "عدد فواتير الموردين" + +#. module: odex_takaful +#: model:ir.model.fields,field_description:odex_takaful.field_takaful_sponsor__contribution_count +msgid "# of Contributions" +msgstr "المساهمين" + +#. module: odex_takaful +#: model:ir.model.fields,field_description:odex_takaful.field_takaful_sponsor__gift_count +msgid "# of Gifts" +msgstr "عدد الهدايا" + +#. module: odex_takaful +#: model:ir.model.fields,field_description:odex_takaful.field_takaful_sponsor__kafalat_count +msgid "# of Kafalat" +msgstr "عدد الكفالات" + +#. module: odex_takaful +#: model:mail.template,subject:odex_takaful.push_notification_email_template +msgid "${ctx.get('company_name')} - ${ctx.get('title')}" +msgstr "" + +#. module: odex_takaful +#: model_terms:ir.ui.view,arch_db:odex_takaful.product_product_view_kanban +msgid "" +msgstr "" + +#. module: odex_takaful +#: model_terms:ir.ui.view,arch_db:odex_takaful.product_product_view_kanban +msgid "" +msgstr "" + +#. module: odex_takaful +#: code:addons/odex_takaful/models/takaful_sponorship_model.py:0 +#, python-format +msgid "" +"\n" +" Create a new product\n" +"
" +msgstr "" + +#. module: odex_takaful +#: model_terms:ir.ui.view,arch_db:odex_takaful.takaful_sponsorship_payment_form +msgid " Months" +msgstr "" + +#. module: odex_takaful +#: model_terms:ir.ui.view,arch_db:odex_takaful.takaful_sponsorship_payment_form +msgid " Riyal" +msgstr "" + +#. module: odex_takaful +#: model_terms:ir.ui.view,arch_db:odex_takaful.takaful_settings_view2 +msgid "Hours" +msgstr "الساعات" + +#. module: odex_takaful +#: model_terms:ir.ui.view,arch_db:odex_takaful.kafalat_payment_report_pdf +#: model_terms:ir.ui.view,arch_db:odex_takaful.makfuleen_report_pdf +msgid " Sponsor Name: " +msgstr "" + +#. module: odex_takaful +#: model_terms:ir.ui.view,arch_db:odex_takaful.benefit_payment_report_pdf +msgid "Benefits Payments Report" +msgstr "" + +#. module: odex_takaful +#: model_terms:ir.ui.view,arch_db:odex_takaful.benefit_month_payment_share +msgid "Benefits Payments Shares Report From Sponsorship:" +msgstr "" + +#. module: odex_takaful +#: model_terms:ir.ui.view,arch_db:odex_takaful.benefit_month_payment_report_pdf +msgid "Sponsorship Monthly Payments of Benefits :" +msgstr "" + +#. module: odex_takaful +#: model_terms:ir.ui.view,arch_db:odex_takaful.report_payment_voucher +msgid "Amount Paid:" +msgstr "مبلغ التبرع:" + +#. module: odex_takaful +#: model_terms:ir.ui.view,arch_db:odex_takaful.report_payment_voucher +msgid "Beneficiary:" +msgstr "المستفيد:" + +#. module: odex_takaful +#: model_terms:ir.ui.view,arch_db:odex_takaful.report_transfer_deduction_document +msgid "Benefit Members" +msgstr "الأفراد المستفيدين" + +#. module: odex_takaful +#: model_terms:ir.ui.view,arch_db:odex_takaful.report_transfer_deduction_document +msgid "Branches" +msgstr "الفروع" + +#. module: odex_takaful +#: model_terms:ir.ui.view,arch_db:odex_takaful.report_payment_voucher +msgid "Donation Amount:" +msgstr "المبلغ المدفوع:" + +#. module: odex_takaful +#: model_terms:ir.ui.view,arch_db:odex_takaful.report_payment_voucher +msgid "Donation Name:" +msgstr "اسم التبرع:" + +#. module: odex_takaful +#: model_terms:ir.ui.view,arch_db:odex_takaful.report_payment_voucher +msgid "Donation Type:" +msgstr "نوع التبرع:" + +#. module: odex_takaful +#: model_terms:ir.ui.view,arch_db:odex_takaful.report_transfer_deduction_document +msgid "End Date" +msgstr "تاريخ النهاية" + +#. module: odex_takaful +#: model_terms:ir.ui.view,arch_db:odex_takaful.report_payment_voucher +msgid "Payment Date:" +msgstr "تاريخ الدفع:" + +#. module: odex_takaful +#: model_terms:ir.ui.view,arch_db:odex_takaful.report_payment_voucher +msgid "Payment Method:" +msgstr "طريقة الدفع:" + +#. module: enasan_geidea_sponsorship +#: model_terms:ir.ui.view,arch_db:enasan_geidea_sponsorship.view_account_payment_register_form_geidea +msgid "Process on Terminal" +msgstr "الدفع على المنصة" + +#. module: odex_takaful +#: model_terms:ir.ui.view,arch_db:odex_takaful.report_transfer_deduction_document +msgid "Payment Method" +msgstr "طريقة الدفع" + +#. module: odex_takaful +#: model_terms:ir.ui.view,arch_db:odex_takaful.report_payment_voucher +msgid "Point of Sale:" +msgstr "نقطة البيع:" + +#. module: odex_takaful +#: model_terms:ir.ui.view,arch_db:odex_takaful.report_payment_voucher +msgid "Scheduling Sequence(s):" +msgstr "تسلسلات الجدولة:" + +#. module: odex_takaful +#: model_terms:ir.ui.view,arch_db:odex_takaful.report_payment_voucher +msgid "Sponsor Name:" +msgstr "المتبرع/الكافل:" + +#. module: odex_takaful +#: model_terms:ir.ui.view,arch_db:odex_takaful.report_transfer_deduction_document +msgid "Sponsors" +msgstr "المتبرعين" + +#. module: odex_takaful +#: model_terms:ir.ui.view,arch_db:odex_takaful.report_transfer_deduction_document +msgid "Start Date" +msgstr "تاريخ البداية" + +#. module: odex_takaful +#: model_terms:ir.ui.view,arch_db:odex_takaful.report_transfer_deduction_document +msgid "Selected Criteria" +msgstr "المعايير المختارة" + +#. module: odex_takaful +#: model_terms:ir.ui.view,arch_db:odex_takaful.report_transfer_deduction_document +msgid "Sponsorship Details" +msgstr "تفاصيل الكفالات" + +#. module: odex_takaful +#: code:addons/odex_takaful/models/res_partner.py:0 +#, python-format +msgid "" +"A contact cannot be both Family/Beneficiary and Donor/Member/Sponsor at the " +"same time!" +msgstr "لا يمكن أن تكون جهة الاتصال أسرة/مستفيد ومتبرع/عضو/كافل في نفس الوقت!" + +#. module: odex_takaful +#: model:ir.model.fields,field_description:odex_takaful.field_donations_items__account_id +#: model:ir.model.fields,field_description:odex_takaful.field_month_payment__account_id +msgid "Account" +msgstr "حساب" + +#. module: odex_takaful +#: code:addons/odex_takaful/reports/month_payment_report.py:0 +#: model:ir.model.fields,field_description:odex_takaful.field_takaful_sponsor__account_number +#, python-format +msgid "Account Number" +msgstr "رقم الحساب" + +#. module: odex_takaful +#: model:ir.model.fields,field_description:odex_takaful.field_takaful_sponsor__property_account_payable_id +msgid "Account Payable" +msgstr "حساب الدائنون" + +#. module: odex_takaful +#: model:ir.model,name:odex_takaful.model_account_payment +msgid "Account Payment Inherit Model" +msgstr "" + +#. module: odex_takaful +#: model:ir.model.fields,field_description:odex_takaful.field_payment_details_lines__account_payment_method +msgid "Account Payment Method" +msgstr "طريقة الدفع المرتبطة بالحاب" + +#. module: odex_takaful +#: model:ir.model.fields,field_description:odex_takaful.field_takaful_sponsor__property_account_receivable_id +msgid "Account Receivable" +msgstr "حساب المدينون" + +#. module: odex_takaful +#: model:ir.model.fields,field_description:odex_takaful.field_takaful_sponsor__account_type +msgid "Account Type" +msgstr "نوع الحساب" + +#. module: odex_takaful +#: model:ir.model.fields,field_description:odex_takaful.field_donations_details_lines__message_needaction +#: model:ir.model.fields,field_description:odex_takaful.field_month_payment__message_needaction +#: model:ir.model.fields,field_description:odex_takaful.field_replacement_process__message_needaction +#: model:ir.model.fields,field_description:odex_takaful.field_sponsorship_cancellation__message_needaction +#: model:ir.model.fields,field_description:odex_takaful.field_sponsorship_payment__message_needaction +#: model:ir.model.fields,field_description:odex_takaful.field_takaful_sponsor__message_needaction +#: model:ir.model.fields,field_description:odex_takaful.field_takaful_sponsorship__message_needaction +msgid "Action Needed" +msgstr "إجراء مطلوب" + +#. module: odex_takaful +#: model_terms:ir.ui.view,arch_db:odex_takaful.donations_details_lines_view_form +msgid "Action Refund" +msgstr "إجراء الإرجاع" + +#. module: odex_takaful +#: model:ir.model.fields,field_description:odex_takaful.field_takaful_sponsor__activation_mode +msgid "Activation Mode" +msgstr "نموذج الأنشطة" + +#. module: odex_takaful +#: model:ir.model.fields,field_description:odex_takaful.field_takaful_sponsor__active +#: model:ir.model.fields.selection,name:odex_takaful.selection__donations_details_lines__state__active +#: model_terms:ir.ui.view,arch_db:odex_takaful.donations_details_lines_view_search +msgid "Active" +msgstr "نشط" + +#. module: odex_takaful +#: model:ir.model.fields,field_description:odex_takaful.field_takaful_sponsor__active_lang_count +msgid "Active Lang Count" +msgstr "عدد اللغات النشطة" + +#. module: odex_takaful +#: model:ir.actions.server,name:odex_takaful.action_active_sponsor_report +#: model:ir.model.fields,field_description:odex_takaful.field_takaful_sponsor__active_counts +#: model_terms:ir.ui.view,arch_db:odex_takaful.active_sponsor_report_pivot_view +msgid "Active Sponsors Count" +msgstr "عدد الكفلاء النشطين" + +#. module: odex_takaful +#: code:addons/odex_takaful/models/takaful_sponsor_model.py:0 +#, python-format +msgid "Active Sponsors Count Report" +msgstr "تقرير عدد الكفلاء النشطين" + +#. module: odex_takaful +#: model:ir.ui.menu,name:odex_takaful.active_sponsor_report_menu +msgid "Active Sponsors Report" +msgstr "تقرير الكفلاء النشطين" + +#. module: odex_takaful +#: model:ir.model.fields,field_description:odex_takaful.field_month_payment__activity_ids +#: model:ir.model.fields,field_description:odex_takaful.field_replacement_process__activity_ids +#: model:ir.model.fields,field_description:odex_takaful.field_sponsorship_cancellation__activity_ids +#: model:ir.model.fields,field_description:odex_takaful.field_sponsorship_payment__activity_ids +#: model:ir.model.fields,field_description:odex_takaful.field_takaful_sponsor__activity_ids +#: model:ir.model.fields,field_description:odex_takaful.field_takaful_sponsorship__activity_ids +msgid "Activities" +msgstr "الأنشطة" + +#. module: odex_takaful +#: model:ir.model.fields,field_description:odex_takaful.field_month_payment__activity_exception_decoration +#: model:ir.model.fields,field_description:odex_takaful.field_replacement_process__activity_exception_decoration +#: model:ir.model.fields,field_description:odex_takaful.field_sponsorship_cancellation__activity_exception_decoration +#: model:ir.model.fields,field_description:odex_takaful.field_sponsorship_payment__activity_exception_decoration +#: model:ir.model.fields,field_description:odex_takaful.field_takaful_sponsor__activity_exception_decoration +#: model:ir.model.fields,field_description:odex_takaful.field_takaful_sponsorship__activity_exception_decoration +msgid "Activity Exception Decoration" +msgstr "زخرفة استثناء النشاط" + +#. module: odex_takaful +#: model:ir.model.fields,field_description:odex_takaful.field_month_payment__activity_state +#: model:ir.model.fields,field_description:odex_takaful.field_replacement_process__activity_state +#: model:ir.model.fields,field_description:odex_takaful.field_sponsorship_cancellation__activity_state +#: model:ir.model.fields,field_description:odex_takaful.field_sponsorship_payment__activity_state +#: model:ir.model.fields,field_description:odex_takaful.field_takaful_sponsor__activity_state +#: model:ir.model.fields,field_description:odex_takaful.field_takaful_sponsorship__activity_state +msgid "Activity State" +msgstr "حالة النشاط" + +#. module: odex_takaful +#: model:ir.model.fields,field_description:odex_takaful.field_month_payment__activity_type_icon +#: model:ir.model.fields,field_description:odex_takaful.field_replacement_process__activity_type_icon +#: model:ir.model.fields,field_description:odex_takaful.field_sponsorship_cancellation__activity_type_icon +#: model:ir.model.fields,field_description:odex_takaful.field_sponsorship_payment__activity_type_icon +#: model:ir.model.fields,field_description:odex_takaful.field_takaful_sponsor__activity_type_icon +#: model:ir.model.fields,field_description:odex_takaful.field_takaful_sponsorship__activity_type_icon +msgid "Activity Type Icon" +msgstr "أيقونة نوع النشاط" + +#. module: odex_takaful +#: model_terms:ir.ui.view,arch_db:odex_takaful.add_details_wizard_form +msgid "Add" +msgstr "إضافة" + +#. module: odex_takaful +#: code:addons/odex_takaful/models/takaful_conf.py:0 +#, python-format +msgid "Add Details Wizard" +msgstr "إضافة التفاصيل" + +#. module: odex_takaful +#: model_terms:ir.ui.view,arch_db:odex_takaful.product_product_view_kanban +msgid "Add Payment" +msgstr "طريقة الدفع" + +#. module: odex_takaful +#: model_terms:ir.ui.view,arch_db:odex_takaful.product_product_view_kanban +msgid "Add Payment Method" +msgstr "طريقة الدفع" + +#. module: odex_takaful +#: model_terms:ir.ui.view,arch_db:odex_takaful.takaful_sponsorship_form +msgid "Add a line" +msgstr "إضافة بند" + +#. module: odex_takaful +#: model_terms:ir.ui.view,arch_db:odex_takaful.takaful_sponsorship_form +msgid "Add a section" +msgstr "إضافة قطاع" + +#. module: odex_takaful +#: code:addons/odex_takaful/models/donation_details_lines.py:0 +#, python-format +msgid "Added: %s" +msgstr "" + +#. module: odex_takaful +#: model:ir.model.fields,help:odex_takaful.field_takaful_sponsor__l10n_sa_additional_identification_number +msgid "Additional Identification Number for Seller/Buyer" +msgstr "رقم التعريف الإضافي للبائع/المشتري" + +#. module: odex_takaful +#: model:ir.model.fields,help:odex_takaful.field_takaful_sponsor__l10n_sa_additional_identification_scheme +msgid "Additional Identification scheme for Seller/Buyer" +msgstr "مخطط التعريف الإضافي للبائع/المشتري" + +#. module: odex_takaful +#: model:ir.model.fields,field_description:odex_takaful.field_takaful_sponsor__additional_info +msgid "Additional info" +msgstr "معلومات إضافية" + +#. module: odex_takaful +#: model:ir.model.fields,field_description:odex_takaful.field_takaful_sponsor__type +msgid "Address Type" +msgstr "نوع العنوان" + +#. module: odex_takaful +#: model:ir.model.fields,field_description:odex_takaful.field_takaful_sponsor__affiliate_id +msgid "Affiliate" +msgstr "الشريك التابع" + +#. module: odex_takaful +#: model:ir.model,name:odex_takaful.model_res_config_settings +msgid "Affiliate Configuration Model" +msgstr "" + +#. module: odex_takaful +#: model:ir.model.fields,field_description:odex_takaful.field_takaful_sponsor__affiliate_key +#: model:ir.model.fields,field_description:odex_takaful.field_takaful_sponsor__res_affiliate_key +msgid "Affiliate key" +msgstr "مفتاح الشريك التابع" + +#. module: odex_takaful +#: code:addons/odex_takaful/models/takaful_notification.py:0 +#: model:ir.model.fields.selection,name:odex_takaful.selection__takaful_notification__notification_type__after_kafala_end +#, python-format +msgid "After Kafala End Date" +msgstr "بعد انتهاء تاريخ الكفالة" + +#. module: odex_takaful +#: model:ir.model.fields,field_description:odex_takaful.field_takaful_sponsor__age +msgid "Age" +msgstr "العمر" + +#. module: odex_takaful +#: model:ir.model.fields,field_description:odex_takaful.field_donations_details_lines__age_category_id +#: model:ir.model.fields,field_description:odex_takaful.field_replacement_wiz__age_category_id +#: model:ir.model.fields,field_description:odex_takaful.field_takaful_sponsorship__age_category_id +msgid "Age Category" +msgstr "الفئة العمرية" + +#. module: odex_takaful +#: code:addons/odex_takaful/wizards/transfer_deduction_wizard.py:0 +#: code:addons/odex_takaful/wizards/transfer_deduction_wizard.py:0 +#: code:addons/odex_takaful/wizards/transfer_deduction_wizard.py:0 +#: code:addons/odex_takaful/wizards/transfer_deduction_wizard.py:0 +#, python-format +msgid "All" +msgstr "" + +#. module: odex_takaful +#: model:ir.model.fields,help:odex_takaful.field_takaful_sponsor__lang +msgid "" +"All the emails and documents sent to this contact will be translated in this" +" language." +msgstr "" +"سيتم ترجمة كافة رسائل البريد الإلكتروني والمستندات المرسلة لجهة الاتصال " +"المختارة إلى هذه اللغة." + +#. module: odex_takaful +#: model:ir.model.fields,field_description:odex_takaful.field_donations_details_lines__allowed_payment_method_ids +msgid "Allowed Payment Method" +msgstr "طرق الدفع المسموحة" + +#. module: odex_takaful +#: model:ir.model.fields,field_description:odex_takaful.field_takaful_sponsorship__allowed_sponsor_ids +msgid "Allowed Sponsor" +msgstr "" + +#. module: odex_takaful +#: code:addons/odex_takaful/reports/month_payment_report.py:0 +#: code:addons/odex_takaful/reports/month_payment_report.py:0 +#: code:addons/odex_takaful/wizards/transfer_deduction_wizard.py:0 +#: model:ir.model.fields,field_description:odex_takaful.field_month_payment_line__amount +#: model:ir.model.fields,field_description:odex_takaful.field_sponsorship_scheduling_line__amount +#: model:ir.model.fields,field_description:odex_takaful.field_takaful_contribution__amount +#: model:ir.model.fields,field_description:odex_takaful.field_takaful_sponsor_operation__amount +#: model_terms:ir.ui.view,arch_db:odex_takaful.benefit_month_payment_report_pdf +#: model_terms:ir.ui.view,arch_db:odex_takaful.benefit_month_payment_share +#: model_terms:ir.ui.view,arch_db:odex_takaful.benefit_payment_report_pdf +#: model_terms:ir.ui.view,arch_db:odex_takaful.report_transfer_deduction_document +#, python-format +msgid "Amount" +msgstr "مبلغ" + +#. module: odex_takaful +#: model_terms:ir.ui.view,arch_db:odex_takaful.product_product_view_kanban +msgid "Amount :" +msgstr "المبلغ :" + +#. module: odex_takaful +#: model:ir.model.fields,help:odex_takaful.field_donation_extension_wizard__amount +msgid "Amount per month for the extension period" +msgstr "المبلغ لكل شهر لفترة التمديد" + +#. module: odex_takaful +#: model:ir.model.fields,field_description:odex_takaful.field_takaful_sponsorship__another_sponsors +#: model_terms:ir.ui.view,arch_db:odex_takaful.takaful_sponsorship_form +msgid "Another Sponsors" +msgstr "المهدي لهم" + +#. module: odex_takaful +#: model_terms:ir.ui.view,arch_db:odex_takaful.benefit_month_payment_form +msgid "Approve" +msgstr "تصديق الموارد البشرية" + +#. module: odex_takaful +#: model:ir.model.fields.selection,name:odex_takaful.selection__sponsorship_scheduling_line__status__approve_refund +#: model:ir.model.fields.selection,name:odex_takaful.selection__sponsorship_states__name__approve_refund +#: model:ir.model.fields.selection,name:odex_takaful.selection__takaful_sponsorship__state__approve_refund +#: model_terms:ir.ui.view,arch_db:odex_takaful.donations_details_lines_view_form +#: model_terms:ir.ui.view,arch_db:odex_takaful.takaful_sponsorship_form +#: model_terms:ir.ui.view,arch_db:odex_takaful.takaful_sponsorship_view_search +#: model_terms:ir.ui.view,arch_db:odex_takaful.view_sponsorship_scheduling_line_search +msgid "Approve Refund" +msgstr "موافقة الإرجاع" + +#. module: odex_takaful +#: model:ir.model.fields.selection,name:odex_takaful.selection__month_payment__state__approve +msgid "Approved" +msgstr "تم التصديق" + +#. module: odex_takaful +#: model:ir.model.fields,field_description:odex_takaful.field_takaful_sponsor__approved_amt +msgid "Approved Amount" +msgstr "" + +#. module: odex_takaful +#: model_terms:ir.ui.view,arch_db:odex_takaful.benefit_month_payment_form +msgid "Are you sure you want to Approve?" +msgstr "هل أنت متأكد أنك تريد الموافقة؟" + +#. module: odex_takaful +#: model_terms:ir.ui.view,arch_db:odex_takaful.benefit_month_payment_form +msgid "Are you sure you want to Cancel?" +msgstr "هل أنت متأكد أنك تريد الإلغاء؟" + +#. module: odex_takaful +#: model_terms:ir.ui.view,arch_db:odex_takaful.benefit_month_payment_form +msgid "Are you sure you want to Create lines Manually?" +msgstr "هل أنت متأكد أنك تريد إنشاء البنود يدوياً؟" + +#. module: odex_takaful +#: model_terms:ir.ui.view,arch_db:odex_takaful.benefit_month_payment_form +msgid "Are you sure you want to Refuse?" +msgstr "هل أنت متأكد أنك تريد الرفض؟" + +#. module: odex_takaful +#: model_terms:ir.ui.view,arch_db:odex_takaful.benefit_month_payment_form +msgid "Are you sure you want to Send Pay Notify?" +msgstr "هل أنت متأكد أنك تريد إرسال إشعار الدفع؟" + +#. module: odex_takaful +#: model_terms:ir.ui.view,arch_db:odex_takaful.benefit_month_payment_form +msgid "Are you sure you want to Submit?" +msgstr "هل أنت متأكد أنك تريد الإرسال؟" + +#. module: odex_takaful +#: model:ir.model.fields,field_description:odex_takaful.field_sponsorship_benefit_arrears__arrears_month_number +msgid "Arrears Months Number" +msgstr "عدد الأشهر المتأخرة" + +#. module: odex_takaful +#: model:ir.model.fields,field_description:odex_takaful.field_sponsorship_benefit_arrears__arrears_total +msgid "Arrears Total" +msgstr "إجمالي المتأخرات" + +#. module: odex_takaful +#: model:ir.model.fields,field_description:odex_takaful.field_donations_details_lines__message_attachment_count +#: model:ir.model.fields,field_description:odex_takaful.field_month_payment__message_attachment_count +#: model:ir.model.fields,field_description:odex_takaful.field_replacement_process__message_attachment_count +#: model:ir.model.fields,field_description:odex_takaful.field_sponsorship_cancellation__message_attachment_count +#: model:ir.model.fields,field_description:odex_takaful.field_sponsorship_payment__message_attachment_count +#: model:ir.model.fields,field_description:odex_takaful.field_takaful_sponsor__message_attachment_count +#: model:ir.model.fields,field_description:odex_takaful.field_takaful_sponsorship__message_attachment_count +msgid "Attachment Count" +msgstr "عدد المرفقات" + +#. module: odex_takaful +#: model:ir.model.fields,field_description:odex_takaful.field_donate_for_another_person__attachment_ids +#: model:ir.model.fields,field_description:odex_takaful.field_donation_extension_history__attachment_ids +#: model:ir.model.fields,field_description:odex_takaful.field_donations_details_lines__attachment_ids +#: model:ir.model.fields,field_description:odex_takaful.field_donations_items__attachment_ids +#: model:ir.model.fields,field_description:odex_takaful.field_grant_benefit_invoice__attachment_ids +#: model:ir.model.fields,field_description:odex_takaful.field_month_payment__attachment_ids +#: model:ir.model.fields,field_description:odex_takaful.field_month_payment_line__attachment_ids +#: model:ir.model.fields,field_description:odex_takaful.field_payment_details_lines__attachment_ids +#: model:ir.model.fields,field_description:odex_takaful.field_points_of_sale_custom__attachment_ids +#: model:ir.model.fields,field_description:odex_takaful.field_preferred_communication__attachment_ids +#: model:ir.model.fields,field_description:odex_takaful.field_refund_details_lines__attachment_ids +#: model:ir.model.fields,field_description:odex_takaful.field_refund_reasons__attachment_ids +#: model:ir.model.fields,field_description:odex_takaful.field_refund_wiz__attachment_ids +#: model:ir.model.fields,field_description:odex_takaful.field_replacement_process__attachment_ids +#: model:ir.model.fields,field_description:odex_takaful.field_replacement_process_line__attachment_ids +#: model:ir.model.fields,field_description:odex_takaful.field_replacement_reasons__attachment_ids +#: model:ir.model.fields,field_description:odex_takaful.field_sponsorship_benefit_arrears__attachment_ids +#: model:ir.model.fields,field_description:odex_takaful.field_sponsorship_cancellation__attachment_ids +#: model:ir.model.fields,field_description:odex_takaful.field_sponsorship_payment__attachment_ids +#: model:ir.model.fields,field_description:odex_takaful.field_sponsorship_reason_stop__attachment_ids +#: model:ir.model.fields,field_description:odex_takaful.field_sponsorship_scheduling_line__attachment_ids +#: model:ir.model.fields,field_description:odex_takaful.field_sponsorship_states__attachment_ids +#: model:ir.model.fields,field_description:odex_takaful.field_takaful_contribution__attachment_ids +#: model:ir.model.fields,field_description:odex_takaful.field_takaful_message_template__attachment_ids +#: model:ir.model.fields,field_description:odex_takaful.field_takaful_payment_method__attachment_ids +#: model:ir.model.fields,field_description:odex_takaful.field_takaful_push_notification__attachment_ids +#: model:ir.model.fields,field_description:odex_takaful.field_takaful_sponsor__attachment_takaful_sponsor_ids +#: model:ir.model.fields,field_description:odex_takaful.field_takaful_sponsor_operation__attachment_ids +#: model:ir.model.fields,field_description:odex_takaful.field_takaful_sponsorship__attachment_ids +msgid "Attachments" +msgstr "المرفقات" + +#. module: odex_takaful +#: model:ir.model.fields.selection,name:odex_takaful.selection__sponsorship_cancellation__cancel_type__sys +msgid "Automatically" +msgstr "تلقائياً" + +#. module: odex_takaful +#: model:ir.model.fields,help:odex_takaful.field_takaful_sponsor__receipt_reminder_email +msgid "" +"Automatically send a confirmation email to the vendor X days before the " +"expected receipt date, asking him to confirm the exact date." +msgstr "" +"قم بإرسال بريد التأكيد الإلكتروني إلى المورّد بعدد الأيام قبل تاريخ الإيصال " +"المتوقع، تطلب فيه تأكيد التاريخ بالتحديد." + +#. module: odex_takaful +#: code:addons/odex_takaful/models/takaful_sponorship_model.py:0 +#, python-format +msgid "Bail Receipts Number %s" +msgstr "مقبوضات الكفالة رقم %s" + +#. module: odex_takaful +#: model:ir.model.fields,field_description:odex_takaful.field_takaful_sponsor__bank_account_count +#: model:ir.model.fields,field_description:odex_takaful.field_takaful_sponsor__bank_id +#: model_terms:ir.ui.view,arch_db:odex_takaful.benefit_month_payment_report_pdf +#: model_terms:ir.ui.view,arch_db:odex_takaful.benefit_month_payment_share +msgid "Bank" +msgstr "البنك" + +#. module: odex_takaful +#: model:ir.model.fields,field_description:odex_takaful.field_takaful_sponsor__bank_entity_name +msgid "Bank Entity Name" +msgstr "اسم كيان البنك" + +#. module: odex_takaful +#: model:ir.model.fields,field_description:odex_takaful.field_benefits_representative__bank_journal_id +#: model:ir.model.fields,field_description:odex_takaful.field_external_benefits__bank_journal_id +#: model:ir.model.fields,field_description:odex_takaful.field_grant_benefit__bank_journal_id +#: model:ir.model.fields,field_description:odex_takaful.field_res_partner__bank_journal_id +#: model:ir.model.fields,field_description:odex_takaful.field_res_users__bank_journal_id +#: model:ir.model.fields,field_description:odex_takaful.field_takaful_sponsor__bank_journal_id +msgid "Bank Journal" +msgstr "يومية البنك" + +#. module: odex_takaful +#: code:addons/odex_takaful/reports/month_payment_report.py:0 +#: code:addons/odex_takaful/reports/month_payment_report.py:0 +#: model:ir.model.fields,field_description:odex_takaful.field_sponsorship_payment__bank_id +#, python-format +msgid "Bank Name" +msgstr "اسم البنك" + +#. module: odex_takaful +#: code:addons/odex_takaful/reports/month_payment_report.py:0 +#: code:addons/odex_takaful/reports/month_payment_report.py:0 +#, python-format +msgid "Bank Sheet" +msgstr "ورقة البنك" + +#. module: odex_takaful +#: model:ir.model.fields.selection,name:odex_takaful.selection__takaful_payment_method__payment_method__bank_transfer +#: model:ir.model.fields.selection,name:odex_takaful.selection__takaful_sponsorship__parent_payment_method__bank_transfer +#: model:ir.model.fields.selection,name:odex_takaful.selection__takaful_sponsorship__payment_method__bank +#: model_terms:ir.ui.view,arch_db:odex_takaful.view_sponsorship_scheduling_line_search +msgid "Bank Transfer" +msgstr "حوالة بنكية" + +#. module: odex_takaful +#: model:ir.model.fields,field_description:odex_takaful.field_payment_details_lines__bank_transfer_amount +msgid "Bank Transfer Amount" +msgstr "مبلغ الحوالة" + +#. module: odex_takaful +#: model:ir.model.fields,field_description:odex_takaful.field_takaful_sponsor__bank_ids +msgid "Banks" +msgstr "البنوك" + +#. module: odex_takaful +#: model:ir.model.fields,field_description:odex_takaful.field_takaful_sponsor__barcode +msgid "Barcode" +msgstr "باركود" + +#. module: odex_takaful +#: model_terms:ir.ui.view,arch_db:odex_takaful.takaful_sponsorship_form +msgid "Basic Information" +msgstr "البيانات الأساسية" + +#. module: odex_takaful +#: code:addons/odex_takaful/models/takaful_notification.py:0 +#: model:ir.model.fields.selection,name:odex_takaful.selection__takaful_notification__notification_type__before_cancel +#, python-format +msgid "Before Cancel" +msgstr "قبل الإلغاء" + +#. module: odex_takaful +#: code:addons/odex_takaful/models/takaful_notification.py:0 +#: model:ir.model.fields.selection,name:odex_takaful.selection__takaful_notification__notification_type__before_finish +#, python-format +msgid "Before Kafala End Date" +msgstr "قبل تاريخ إنتهاء الكفالة" + +#. module: odex_takaful +#: model:ir.model.fields,field_description:odex_takaful.field_grant_benefit_invoice__benefit_ids +#: model:ir.model.fields,field_description:odex_takaful.field_takaful_contribution__benefit_ids +#: model:ir.model.fields,field_description:odex_takaful.field_takaful_sponsor_operation__benefit_ids +msgid "Beneficiaries" +msgstr "المستفيدين" + +#. module: odex_takaful +#: model:ir.actions.act_window,name:odex_takaful.benefit_grant_due_invoice_action +msgid "Beneficiaries Due Payments" +msgstr "المدفوعات المستحقة للمستفيدين" + +#. module: odex_takaful +#: model:ir.model.fields,field_description:odex_takaful.field_donations_details_lines__benefit_ids +#: model:ir.model.fields,field_description:odex_takaful.field_takaful_sponsorship__benefit_ids +msgid "Beneficiaries Names" +msgstr "أسماء المستفيدين" + +#. module: odex_takaful +#: model:ir.model.fields,field_description:odex_takaful.field_takaful_sponsor__name_in_certificate +msgid "Beneficiaries Names In Certificate" +msgstr "أسماء المستفيدين في الشهادة" + +#. module: odex_takaful +#: model:ir.model.fields,field_description:odex_takaful.field_grant_benefit_invoice__benefit_type +#: model:ir.model.fields,field_description:odex_takaful.field_takaful_contribution__benefit_type +#: model:ir.model.fields,field_description:odex_takaful.field_takaful_sponsor_operation__benefit_type +msgid "Beneficiaries Type" +msgstr "نوع المستفيدين" + +#. module: odex_takaful +#: model:ir.model.fields,field_description:odex_takaful.field_takaful_sponsor__type_in_certificate +msgid "Beneficiaries Type In Certificate" +msgstr "نوع المستفيدين في الشهادة" + +#. module: odex_takaful +#: code:addons/odex_takaful/wizards/transfer_deduction_wizard.py:0 +#: model:ir.model.fields,field_description:odex_takaful.field_sponsorship_benefit_arrears__benefit_id +#: model:ir.model.fields,field_description:odex_takaful.field_sponsorship_scheduling_line__beneficiary_id +#: model:ir.model.fields,field_description:odex_takaful.field_takaful_contribution__benefit_id +#: model:ir.model.fields,field_description:odex_takaful.field_takaful_sponsor_operation__benefit_id +#: model_terms:ir.ui.view,arch_db:odex_takaful.report_transfer_deduction_document +#: model_terms:ir.ui.view,arch_db:odex_takaful.view_sponsorship_scheduling_line_search +#, python-format +msgid "Beneficiary" +msgstr "المستفيد" + +#. module: odex_takaful +#: model:res.groups,name:odex_takaful.group_beneficiary_department_access +msgid "Beneficiary - Department Access" +msgstr "" + +#. module: odex_takaful +#: model_terms:ir.ui.view,arch_db:odex_takaful.takaful_sponsorship_form +msgid "Beneficiary Filters" +msgstr " حقول التصفية" + +#. module: odex_takaful +#: model:ir.model.fields,field_description:odex_takaful.field_add_benefit_wizard__benefit_id +#: model:ir.model.fields,field_description:odex_takaful.field_donations_details_lines__benefit_id +#: model:ir.model.fields,field_description:odex_takaful.field_takaful_sponsorship__benefit_id +msgid "Beneficiary Name" +msgstr "اسم المستفيد" + +#. module: odex_takaful +#: model:ir.model.fields,field_description:odex_takaful.field_sponsorship_benefit_arrears__benefit_type +msgid "Beneficiary Type" +msgstr "نوع المستفيد" + +#. module: odex_takaful +#: model:ir.model.fields,field_description:odex_takaful.field_month_payment_line__benefit_id +msgid "Benefit" +msgstr "ملف الأسرة" + +#. module: odex_takaful +#: model_terms:ir.ui.view,arch_db:odex_takaful.donations_details_lines_view_form +msgid "Benefit Details" +msgstr "تفاصيل ملف الأسرة" + +#. module: odex_takaful +#: model:ir.model.fields,field_description:odex_takaful.field_donations_details_lines__benefit_family_code +msgid "Benefit Family Code" +msgstr "" + +#. module: odex_takaful +#: code:addons/odex_takaful/reports/month_payment_report.py:0 +#: code:addons/odex_takaful/reports/month_payment_report.py:0 +#: model:ir.model.fields,field_description:odex_takaful.field_donations_details_lines__benefit_id_number +#: model_terms:ir.ui.view,arch_db:odex_takaful.benefit_month_payment_report_pdf +#: model_terms:ir.ui.view,arch_db:odex_takaful.benefit_month_payment_share +#: model_terms:ir.ui.view,arch_db:odex_takaful.benefit_payment_report_pdf +#, python-format +msgid "Benefit ID Number" +msgstr "رقم هوية المستفيد" + +#. module: odex_takaful +#: code:addons/odex_takaful/models/donation_details_lines.py:0 +#, python-format +msgid "Benefit IDs changed in a donation item:+ Create a new donation +
""") + } + + @api.model + # @api.model_create_multi + def create(self, vals): + # Check if sequence_no is not already set + if vals.get('sequence_no', '/') == '/': + # Assign the next sequence number + vals['sequence_no'] = self.env['ir.sequence'].next_by_code('donations.details.lines.sequence') or '/' + if vals.get('display_type'): + vals.update({ + 'product_template_id': False, + 'donation_type': False, + }) + + record = super(DonationsDetailsLines, self).create(vals) + if record.benefit_ids == 1: + record.benefit_id = record.benefit_ids[0].id + print('Vals >>> ' , vals) + return record + + def write(self, vals): + res = False + for rec in self: + old_benefit = rec.benefit_id.name + old_benefits = rec.benefit_ids.mapped('name') # assuming benefit has a 'name' + old_benefits_set = set(old_benefits) + res |= super(DonationsDetailsLines, rec).write(vals) + rec.invalidate_cache() + rec = self.browse(rec.id) + + if 'display_type' in vals and self.filtered(lambda line: line.display_type != vals.get('display_type')): + raise UserError( + _("You cannot change the type of a sale quote line. Instead you should delete the current line and create a new line of the proper type.")) + if 'benefit_id' in vals: + new_benefit = rec.benefit_id.name or 'None' + sponsorship = self.env['takaful.sponsorship'].browse( + self.env.context.get(rec.sponsorship_id)) + if sponsorship and len(sponsorship) == 1: + message = _("Benefit changed from %s to %s in a donation item.") % ( + old_benefit or 'None', new_benefit) + sponsorship.message_post(body=message) + + # Auto-trigger state change when benefit is assigned to waiting line + + if 'benefit_ids' in vals: + new_benefits = rec.benefit_ids.mapped('name') + new_benefits_set = set(new_benefits) + + added = new_benefits_set - old_benefits_set + removed = old_benefits_set - new_benefits_set + + changes = [] + if added: + changes.append(_("Added: %s") % ', '.join(added)) + if removed: + changes.append(_("Removed: %s") % ', '.join(removed)) + + if changes: + # Find sponsorship + sponsorship = rec.sponsorship_id or self.env['takaful.sponsorship'].browse( + self.env.context.get(rec.sponsorship_id)) + + if sponsorship and len(sponsorship) == 1: + message = _("Benefit IDs changed in a donation item:+ Create a new donation +
""") + } + + def sol_by_cart(self, operation, product_id, sponsorship_id): + """ + Create Sale Order Line By + Cart Functionality + """ + + sol_object = self.env["donations.details.lines"] + sol_data = dict() + sol_data["product_template_id"] = product_id.id + sol_data["sponsorship_id"] = sponsorship_id.id + # sol_data["donation_amount"] = product_id.fixed_donation_amount + sol_data["donation_amount"] = product_id.list_price + # sol_data["donation_amount"] = product_id.list_price * product_id._quantity + sol_data["donation_qty"] = product_id._quantity + sol_data["donation_types"] = 'donation' + sol_data["name"] = product_id.name + + if operation == "add": + sol_object.create(sol_data) + return + + + sol_ = sol_object.search( + [('sponsorship_id', '=', sponsorship_id.id), ('product_template_id', '=', product_id.id), ]) # ("cart_flag", "=", True) + + + if operation == "update": + sol_.update(sol_data) + + if operation == "remove": + sol_.unlink() + return + + def user_input_qty_sol(self, _qty, product_id, sponsorship_id): + # sol_object = self.env["donations.details.lines"] + # product_object = self.env["product.template"] + + # donation_id = product_object.search([('id', '=', product_id)]) + # sol_data = dict() + # sol_data["product_template_id"] = donation_id.id + # sol_data["sponsorship_id"] = sponsorship_id + # sol_data["donation_amount"] = donation_id.fixed_donation_amount + # sol_data["donation_types"] = 'donation' + # sol_data["name"] = donation_id.name + # so = sol_object.create(sol_data) + sol_object = self.env["donations.details.lines"].sudo() + product_object = self.env["product.template"].sudo() + + product = product_object.browse(product_id) + if not product.exists(): + return + + existing = sol_object.search([ + ("sponsorship_id", "=", sponsorship_id), + ("product_template_id", "=", product_id), + ], limit=1) + + if _qty and _qty > 0: + if existing: + existing.write({"donation_qty": _qty}) + else: + sol_object.create({ + "product_template_id": product.id, + "sponsorship_id": sponsorship_id, + "donation_types": 'donation', + "name": product.name, + "donation_qty": _qty, + "donation_amount": product.lst_price + }) + else: + # remove if qty <= 0 + if existing: + existing.unlink() + return + + @api.depends('journal_entry_ids') + def _compute_journal_entry_count(self): + for rec in self: + rec.journal_entry_count = len(rec.journal_entry_ids.filtered(lambda r: r.move_type == 'out_invoice')) + + @api.depends('journal_entry_ids') + def _compute_journal_entry_count_vendor(self): + for rec in self: + rec.journal_entry_count_vendor = len(rec.journal_entry_ids.filtered(lambda r: r.move_type == 'in_invoice')) + + @api.depends('donations_details_lines') + def _compute_donation_count(self): + for rec in self: + rec.donations_count = len(rec.donations_details_lines.filtered(lambda r: r.display_type == False)) + len(rec.donations_details_lines_mechanism_ids.filtered(lambda r: r.display_type == False)) + + def action_view_journal_entries(self): + self.ensure_one() # Ensure the method is called on a single record + action = self.env.ref('account.action_move_out_invoice_type').read()[0] + action['domain'] = [('move_type', '=', 'out_invoice'), ('id', 'in', self.journal_entry_ids.ids)] + action['context'] = { + 'default_takaful_sponsorship_id': self.id, + 'create': False + } + return action + + def action_view_journal_entries_vendor(self): + self.ensure_one() # Ensure the method is called on a single record + action = self.env.ref('account.action_move_out_invoice_type').read()[0] + action['domain'] = [('move_type', '=', 'in_invoice'), ('id', 'in', self.journal_entry_ids.ids)] + action['context'] = { + 'default_takaful_sponsorship_id': self.id, + 'create': False + } + return action + + @api.depends('journal_entry_ids') + def _compute_refund_move_count(self): + for rec in self: + rec.refund_move_count = len(rec.journal_entry_ids.filtered(lambda r: r.move_type == 'out_refund')) + + def action_view_refund_moves(self): + self.ensure_one() + return { + 'name': _('Moves'), + 'type': 'ir.actions.act_window', + 'res_model': 'account.move', + 'view_mode': 'tree,form', + 'domain': [('id', 'in', self.journal_entry_ids.filtered(lambda r: r.move_type == 'out_refund').ids)], + } + + def action_open_donation_catalog(self): + """ Opens product catalog to link products to sponsorship """ + self.ensure_one() + return { + 'name': _('Donation Catalog'), + 'type': 'ir.actions.act_window', + 'res_model': 'product.template', + 'view_mode': 'tree', + 'view_id': self.env.ref('odex_takaful.view_product_template_tree_sponsorship').id, + 'context': { + 'sponsorship_id': self.id, 'create': False, 'edit': False, 'delete': False, + }, + 'domain': [('donation_category', '=', 'donation'), ('id', 'not in', self.donations_details_lines.mapped('product_template_id').ids)], + 'target': 'new', + } + + def _compute_related_move_lines_records(self): + for record in self: + record.related_move_lines_records_count = len(self.env['account.move'].search([ + ('takaful_sponsorship_id', '=', record.id), ('move_type', '=', 'out_refund') + ]).mapped('line_ids').ids) + + def action_open_related_move_lines_records(self): + """ Opens a tree view with related records filtered by a dynamic domain """ + move_lines = self.env['account.move'].search([ + ('takaful_sponsorship_id', '=', self.id), ('move_type','=','out_refund') + ]).mapped('line_ids').ids + + return { + 'name': _('Moves'), + 'type': 'ir.actions.act_window', + 'res_model': 'account.move.line', + 'view_mode': 'tree,form', + 'domain': [('id', 'in', move_lines)], + } + + @api.depends('branch_custom_id') + def _compute_manager_id(self): + for record in self: + if record.branch_custom_id: + department = record.branch_custom_id.branch + record.manager_id = department.manager_id if department else False + + def action_show_payment_details(self): + self.write({'show_payment_details': True}) + return True + + def action_confirm_payment(self): + pass + + def _default_branch_custom_id(self): + return self.env['branch.settings'].sudo().search([('branch', '=', self.env.user.department_id.id)], limit=1) + + # @api.constrains('payment_details_lines') + # def check_payment_amount(self): + # total_amount = 0 + # for rec in self.payment_details_lines: + # total_amount += rec.donation_amount + # if total_amount != self.total_sponsorship_amount: + # raise ValidationError( + # _('Total Payment Amount Should be Total Sponsorship Amount')) + + @api.constrains('donations_details_lines','donations_details_lines_mechanism_ids') + def check_donation_types(self): + # Search for an existing record + record_exist = self.env["donations.details.lines"].search( + [('donation_type', '=', 'sponsorship'), + ('sponsorship_id', '=', self.id)], + ) + + # Raise error if record already exists + if record_exist and len(record_exist) > 1: + raise ValidationError(_("You cannot Add more than one sponsorship")) + + @api.constrains('end_date') + def check_end_date(self): + if self.sponsorship_duration == "temporary" and not self.end_date: + raise ValidationError( + _(u'Please Select End Date')) + + elif self.sponsorship_duration == "temporary" and self.end_date: + start_date = trunc_datetime(parse(str(self.start_date))).date() + end_date = trunc_datetime(parse(str(self.end_date))).date() + if start_date >= end_date: + raise ValidationError( + _(u'End Date Must Be More Than Start Date in Months')) + + @api.depends('benefit_id.benefit_id') + @api.onchange('benefit_id') + def _compute_supporter_status(self): + for rec in self: + if rec.benefit_id: + if rec.benefit_id.benefit_id: + rec.supporter_status = 'yes' + else: + rec.supporter_status = 'no' + else: + rec.supporter_status = '' + @api.depends('donations_details_lines', 'donations_details_lines_mechanism_ids') + def _get_total_sponsorship_amount(self): + for rec in self: + rec.total_sponsorship_amount = ( + sum(line.total_donation_amount for line in rec.donations_details_lines) + + sum(line.total_donation_amount for line in rec.donations_details_lines_mechanism_ids) + ) + @api.depends('donations_details_lines', 'donations_details_lines_mechanism_ids') + def _get_total_waqf_and_donation_amount(self): + for rec in self: + rec.total_waqf_and_donation_amount = ( + sum(line.total_donation_amount for line in + rec.donations_details_lines.filtered(lambda line: line.donation_type != 'sponsorship')) + + sum(line.total_donation_amount for line in rec.donations_details_lines_mechanism_ids.filtered( + lambda line: line.donation_type != 'sponsorship')) + ) + @api.onchange('donations_details_lines') + def onchange_donations_details_lines(self): + for rec in self: + rec.benefit_ids = ( + rec.donations_details_lines.mapped('benefit_ids').ids + + rec.donations_details_lines_mechanism_ids.mapped('benefit_ids').ids + ) + @api.depends('gender','education_status','education_level','sponsorship_type','benefit_type','age_category_id') + def _compute_domain_ids(self): + # Create a domain + self.members_domain_ids = [(6, 0, [])] + if self.benefit_type == 'orphan' and self.sponsorship_type: + base_domain = \ + [ + '|', ('state', '=', 'second_approve'), '&', ('state', 'in', ('waiting_approve', 'first_approve')),('action_type', '=', 'suspended'), + ('member_status', '=', 'benefit'), + '|', + ('relationn.relation_type', '=', 'daughter'), + ('relationn.relation_type', '=', 'son') + ] + if self.gender: + if self.gender == 'female': + base_domain = [ + '|', ('state', '=', 'second_approve'), '&', + ('state', 'in', ('waiting_approve', 'first_approve')), ('action_type', '=', 'suspended'), + ('member_status', '=', 'benefit'), ('relationn.relation_type', '=', 'daughter')] + if self.gender == 'male': + base_domain = [ + '|', ('state', '=', 'second_approve'), '&',('state', 'in', ('waiting_approve', 'first_approve')), ('action_type', '=', 'suspended'), + ('member_status', '=', 'benefit'),('relationn.relation_type', '=', 'son')] + if self.education_status: + base_domain.append(('education_status', '=', self.education_status)) + if self.education_level: + base_domain.append(('education_levels', '=', self.education_level.id)) + if self.age_category_id: + base_domain.append(('age', '<=', self.age_category_id.max_age)) + base_domain.append(('age', '>=', self.age_category_id.min_age)) + self.members_domain_ids = self.env['family.member'].sudo().search(base_domain) + domain = {'benefit_id': [('id', 'in', self.members_domain_ids.ids)]} + # return {'domain': domain} + if self.benefit_type == 'widow' and self.sponsorship_type: + self.benefit_count = 0 + self.min_needs_percent = 0 + self.max_needs_percent = 0 + base_domain = ['|',('state','=','second_approve'),'&',('state','in',('waiting_approve','first_approve')),('action_type','=','suspended'),('member_status','=','benefit'),'|',('relationn.relation_type', '=', 'mother'),('relationn.relation_type', '=', 'replacement_mother')] + if self.education_status: + base_domain.append(('education_status', '=', self.education_status)) + if self.education_level: + base_domain.append(('education_levels', '=', self.education_level.id)) + if self.age_category_id: + base_domain.append(('age', '<=', self.age_category_id.max_age)) + base_domain.append(('age', '>=', self.age_category_id.min_age)) + self.members_domain_ids = self.env['family.member'].sudo().search(base_domain) + domain = {'benefit_id': [('id', 'in', self.members_domain_ids.ids)]} + # return {'domain': domain} + + # @api.depends('sponsorship_type') + # def onchange_benefit_type(self): + # # Create a domain + # if self.benefit_type and self.benefit_id and not self.benefit_id.benefit_type == self.benefit_type: + # self.benefit_id = False + # elif self.benefit_type and self.benefit_ids and not self.benefit_ids[0].benefit_type == self.benefit_type: + # self.benefit_ids = [(6, 0, [])] + # self.benefit_count = 0 + # self.min_needs_percent = 0 + # self.max_needs_percent = 0 + # + # if self.benefit_type and self.sponsorship_type == 'person': + # self.benefit_ids = [(6, 0, [])] + # self.benefit_count = 0 + # self.min_needs_percent = 0 + # self.max_needs_percent = 0 + # base_domain = [('state', 'in', ('second_approve', 'temporarily_suspended', 'suspended_first_approve'))] + # if self.gender: + # if self.gender == 'female': + # base_domain.append(('relationn.relation_type', '=','daughter')) + # if self.gender == 'male': + # base_domain.append(('relationn.relation_type', '=', 'son')) + # if self.education_status: + # base_domain.append(('education_status', '=', self.education_status)) + # if self.education_level: + # base_domain.append(('education_levels', '=', self.education_level.id)) + # benefit_ids = self.env['family.member'].sudo().search(base_domain) + # domain = {'benefit_id': [('id', 'in', benefit_ids.mapped('id'))]} + # return {'domain': domain} + # elif self.benefit_type and self.sponsorship_type == 'group': + # self.benefit_id = False + # benefit_ids = self.env['grant.benefit'].sudo().search( + # [('benefit_type', '=', self.benefit_type), ('state', '=', 'approve')], limit=self.benefit_count) + # # domain = {'benefit_ids': [('id', 'in', benefit_ids.filtered(lambda ben: ben.benefit_needs_percent > 0 and ben.benefit_needs_percent >= self.min_needs_percent and ben.benefit_needs_percent <= self.max_needs_percent).mapped('id'))]} + # domain = {'benefit_ids': [('id', 'in', benefit_ids.mapped('id'))]} + # return {'domain': domain} + + gender = fields.Selection(selection=[('male', 'Male'), ('female', 'Female')], string="Gender") + age_category_id = fields.Many2one('age.category',string='Age Category') + city_id = fields.Many2one( + 'res.country.city',string='District') + + benefit_count = fields.Integer(string='Sponsorship Beneficiaries Number',compute="_get_benefits_count") + + start_date = fields.Date(string="Sponsorship Start Date", copy=False) + end_date = fields.Date(string="Sponsorship End Date") + + min_needs_percent = fields.Float(string='Min Needs Percentage') + max_needs_percent = fields.Float(string='Max Needs Percentage') + + sponsorship_class = fields.Selection([ + ('partial', 'Partial Sponsorship'), + ('fully', 'Fully Sponsorship')], + string='Sponsorship Beneficiaries Classification', + tracking=True + ) + benefit_ids = fields.Many2many('family.member',string='Beneficiaries Names') + + with_orphan_ids = fields.Many2many( + 'grant.benefit',relation='takaful_sponsor_grant_benefit_rel', + string='Orphans Names Of Widow' + ) + + is_widow_orphan = fields.Boolean( + string='Widow with Her Orphans?', default=False) + + payment_option = fields.Selection([('month', 'Monthly'),('once', 'For Once')], string='Payment Option') + payment_journal_id = fields.Many2one('account.journal', string='Payment Method', domain="[('type', 'in', ['cash', 'bank'])]",) + + cancel_reason_id = fields.Many2one('sponsorship.cancellation', string='Cancellation Entry', + tracking=True) + reason = fields.Text(string="Cancellation Reason", + related="cancel_reason_id.note", store=True) + + state = fields.Selection([ + ('draft', 'Draft'), + ('confirmed', 'Confirmed'), + ('wait_pay', 'Enter Payment Details'), + ('paid', 'Paid'), + # ('progress', 'In Progress'), + ('partial_refund', 'Partial Refund'), + ('fully_refund', 'Fully Refund'), + # ('to_cancel', 'About To Cancel'), + ('approve_refund', 'Approve Refund'), + ('under_refund', 'Under Refund Procedure'), + ('under_replacement', 'Under Replacement'), + ('replacement_done', 'Replacement Done'), + ('canceled', 'Canceled'), + ('closed', 'Closed'), + ], string='state', default='draft', tracking=True, store=True, compute='_compute_state') + + has_delay = fields.Boolean(string='Has Payment Delay?', compute='_check_if_has_delay', related=False, readonly=True, + store=True) + due_days = fields.Integer(string='Overdue in Days', + compute='_check_if_has_delay', store=True) + contribution_value = fields.Float(string="Contribution Value") + load_amount = fields.Float(string="Load Amount Per Person") + currency_id = fields.Many2one('res.currency', string='Currency', + default=lambda self: self.env.company.currency_id, readonly=True) + total_contribution = fields.Float(string="Contributions Total", + compute='calculate_total_paid') + + total_voucher = fields.Float(string="Voucher Total", + compute='voucher_total_paid') + # New Added + to_renew = fields.Boolean(string='Need To Renew?', default=False) + overdue_amount = fields.Float( + string='Overdue Amount', compute='_compute_overdue_total_amount') + expected_cancel_date = fields.Date( + string='Expected Cancel Date', compute='_check_if_has_delay') + month_count = fields.Integer( + string='Sponsorship Months Count', compute='_compute_month_count') + paid_month_count = fields.Integer( + string='Paid Months Count', compute='_compute_paid_month_count') + next_due_date = fields.Date( + string='Next Payment Date', compute='_compute_next_due_date', store=True) + close_to_be_canceled_date = fields.Date(string='Close To Cancel Date') + + # NN + invoice_count = fields.Integer(string='Invoices', + compute='_compute_invoice_count') + last_invoice_date = fields.Date(string='Last Invoice') + voucher_ids = fields.One2many('account.move','sponsorship_id',string='Vouchers', copy=False) + record_type = fields.Selection([ + ('donation', 'Donation'), + ('sponsorship', 'Sponsorship'), + ], string="Record Type", required=True, default=lambda self: self._get_default_record_type(), copy=False) + is_donations_coordinator = fields.Boolean(string="Is Donations Coordinator", compute='_compute_is_coordinator') + is_sponsorship_coordinator = fields.Boolean(string="Is Sponsorship Coordinator", compute='_compute_is_coordinator') + amount_paid = fields.Float(string='Amount Paid', compute='_compute_amount_paid') + + @api.depends('payment_ids', 'payment_ids.move_id.state') + def _compute_amount_paid(self): + for rec in self: + amount_paid = 0 + for payment in rec.payment_ids: + if self.env.context.get('exclude_direct_debit', False) and payment.direct_debit: + continue + if payment.state == 'posted': + amount_paid += payment.amount + rec.amount_paid = amount_paid + + @api.depends('payment_ids') + def _compute_state(self): + for sponsorship in self: + if not sponsorship.payment_ids: + sponsorship.state = sponsorship.state + continue + if sponsorship.amount_paid >= sponsorship.total_sponsorship_amount: + sponsorship.state = 'paid' + + vendor_bill_vals = [] + benefit_journal_id = sponsorship.env.company.kafala_benefit_journal_id.id + sponsorship_lines = (sponsorship.donations_details_lines + sponsorship.donations_details_lines_mechanism_ids).filtered(lambda l: not l.direct_debit) + + if sponsorship.record_type == 'donation' and sponsorship.donation_mechanism == 'with_conditions': + family_ids = sponsorship_lines.family_id + for family in family_ids: + family_lines = sponsorship_lines.filtered(lambda l: l.family_id == family) + bill_values = { + 'takaful_sponsorship_id': sponsorship.id, + 'name': self.env['ir.sequence'].next_by_code('account.move.accrsp'), + 'move_type': 'in_invoice', + 'journal_id': benefit_journal_id, + 'date': fields.Date.today(), + 'invoice_date': fields.Date.today(), + 'partner_id': family.partner_id.id, + 'invoice_origin': sponsorship.code, + 'invoice_line_ids': [(0, 0, { + 'product_id': line.product_id.id, + 'price_unit': line.donation_amount, + 'quantity': 1, + 'name': _("Benefit Number %s") % (line.sequence_no), + 'analytic_account_id': sponsorship.branch_custom_id.branch.analytic_account_id.id, + }) for line in family_lines] + } + vendor_bill_vals.append(bill_values) + + bill_id = self.env['account.move'].sudo().create(vendor_bill_vals) + for line in bill_id.invoice_line_ids: + line.account_id = line._get_computed_account() + taxes = line._get_computed_taxes() + if taxes and line.move_id.fiscal_position_id: + taxes = line.move_id.fiscal_position_id.map_tax(taxes, partner=line.partner_id) + line.tax_ids = taxes + line.product_uom_id = line._get_computed_uom() + bill_id.action_post() + else: + sponsorship.state = 'wait_pay' + + def copy(self, default=None): + self.ensure_one() + default = dict(default or {}) + default["record_type"] = self.record_type + return super(TakafulSponsorship, self).copy(default) + + @api.onchange('sponsor_donor_type') + def _onchange_sponsor_donor_type(self): + for rec in self: + if rec.sponsor_donor_type == 'registered': + rec.sponsor_or_donor_type = 'registered' + elif rec.sponsor_donor_type == 'new_sponsor': + rec.sponsor_or_donor_type = 'new_sponsor' + # Clear sponsor_id and related fields when switching to new_sponsor + if rec.sponsor_id: + rec.sponsor_id = False + rec.sponsor_phone = False + else: + # Clear sponsor_id and related fields when switching to unknown or other types + if rec.sponsor_id: + rec.sponsor_id = False + rec.sponsor_phone = False + + @api.onchange('sponsor_or_donor_type') + def _onchange_sponsor_or_donor_type(self): + for rec in self: + # Clear sponsor_id and related fields when not 'registered' + if rec.sponsor_or_donor_type != 'registered' and rec.sponsor_id: + rec.sponsor_id = False + rec.sponsor_phone = False + + @api.onchange('sponsor_id') + def _onchange_sponsor_id(self): + """ + Smart logic: If user manually selects a different sponsor from the list + after creating a new sponsor, automatically change the type to 'registered' + """ + for rec in self: + if rec.sponsor_id: + # Get the newly created sponsor ID from context (if exists) + newly_created_sponsor_id = self.env.context.get('newly_created_sponsor_id', False) + + # If the selected sponsor is NOT the newly created one, change type to 'registered' + if newly_created_sponsor_id and rec.sponsor_id.id != newly_created_sponsor_id: + if rec.record_type == 'donation' and rec.sponsor_or_donor_type == 'new_sponsor': + rec.sponsor_or_donor_type = 'registered' + elif rec.record_type == 'sponsorship' and rec.sponsor_donor_type == 'new_sponsor': + rec.sponsor_donor_type = 'registered' + + # Update related fields from selected sponsor + rec.sponsor_phone = rec.sponsor_id.mobile + rec.preferred_communication = rec.sponsor_id.preferred_communication + + @api.model + def create(self, vals): + """Override create to validate new sponsor requirement before creating""" + # Check if creating with 'new_sponsor' but no sponsor_id + record_type = vals.get('record_type') + sponsor_or_donor_type = vals.get('sponsor_or_donor_type') + sponsor_donor_type = vals.get('sponsor_donor_type') + sponsor_id = vals.get('sponsor_id') + state = vals.get('state', 'draft') + print('Vals >>> ' , vals) + # Only validate when state is draft and saving (not during onchange) + if state == 'draft': + # Check for donation with new_sponsor + if record_type == 'donation' and sponsor_or_donor_type == 'new_sponsor' and not sponsor_id: + raise ValidationError(_( + 'يجب إنشاء مشترك جديد أولاً قبل الحفظ.\n' + 'اضغط على زر "إنشاء مشترك" لإضافة مشترك جديد.' + )) + # Check for sponsorship with new_sponsor + elif record_type == 'sponsorship' and sponsor_donor_type == 'new_sponsor' and not sponsor_id: + raise ValidationError(_( + 'يجب إنشاء كافل جديد أولاً قبل الحفظ.\n' + 'اضغط على زر "إنشاء مشترك" لإضافة كافل جديد.' + )) + + # If validation passed, create the record + return super(TakafulSponsorship, self).create(vals) + + def _get_default_record_type(self): + if self.env.user.has_group("odex_takaful.donation_officer_group"): + return "donation" + if self.env.user.has_group("odex_takaful.sponsorship_officer_group"): + return "sponsorship" + return "" + + @api.depends_context("uid") + @api.depends('sponsorship_creation_date') + def _compute_is_coordinator(self): + for record in self: + record.is_donations_coordinator = self.env.user.has_group('odex_takaful.group_donations_coordinator') + record.is_sponsorship_coordinator = self.env.user.has_group('odex_takaful.group_sponsorship_coordinator') + + @api.onchange('record_type') + def _onchange_record_type(self): + """ + Clears the One2many field when record_type is changed and data exists in the other field. + """ + if self.record_type == 'sponsorship': + self.donation_mechanism = False + elif self.record_type == 'donation': + self.donation_mechanism = 'without_conditions' + + if self.donations_details_lines_mechanism_ids: + self.donations_details_lines_mechanism_ids = [(5, 0, 0)] # Clears the field + elif self.donations_details_lines: + self.donations_details_lines = [(5, 0, 0)] # Clears the field + + + @api.model + def default_get(self, fields): + res = super(TakafulSponsorship, self).default_get(fields) + if self.env.user.has_group('odex_takaful.group_donations_coordinator'): + res.update({ + 'record_type': 'donation', + }) + elif self.env.user.has_group('odex_takaful.group_sponsorship_coordinator'): + res.update({ + 'record_type': 'sponsorship', + }) + return res + + # payment_ids = fields.One2many('account.payment','sponsorship_id',string='Payments', copy=False) + + # @api.depends('contribution_value', 'benefit_ids', 'sponsorship_type') + # def _compute_load_amount(self): + # """ Calculate load amount of sponsorship for a person """ + # for rec in self: + # if rec.benefit_ids and rec.contribution_value > 0 and rec.sponsorship_type == 'group': + # rec.load_amount = float( + # rec.contribution_value / len(rec.benefit_ids)) + # else: + # rec.load_amount = rec.contribution_value + @api.depends('benefit_ids') + def _get_benefits_count(self): + for rec in self: + rec.benefit_count = len(rec.benefit_ids) + + def voucher_total_paid(self): + self.total_voucher = len(self.voucher_ids) + + def calculate_total_paid(self): + """ Calculate Total Paid Invoices based on sponsorship """ + for rec in self: + paid_invoices = self.env['account.move'].sudo().search_count([ + ('sponsorship_id', '=', rec.id), + ('state', 'not in', ['draft','proforma']), + ]) + rec.total_contribution = paid_invoices + + def _compute_invoice_count(self): + """ Calculate Invoice count based on sponsorship """ + invoice_count = self.env['account.move'].search_count( + [('operation_id', '=', self.id), ('operation_type', '=', 'sponsorship')]) + if invoice_count > 0: + self.invoice_count = invoice_count + else: + self.invoice_count = 0 + + def create_next_invoice(self, next_date=None): + if not next_date: + next_date = get_first_day_of_next_month(datetime.datetime.today()) + + # Get journal from config + sudoConf = self.env['ir.config_parameter'].sudo() + journal_id = sudoConf.get_param( + 'odex_takaful_base.kafala_journal_id', default=False) + + if not journal_id: + # Raise an error + raise ValidationError( + _(u'No Journal for Sponsorships, Please configure it')) + + journal = self.env['account.journal'].search([('id', '=', journal_id)]) + # Create the Invoice staff + customer = self.sponsor_id + # account_receivable = self.env['account.account'].search([('user_type_id', '=', self.env.ref('account.data_account_type_receivable').id)], limit=1) + + company_id = self.env.user.company_id + + if self.benefit_type == 'orphan': + account_revenue = company_id.orphan_account_id + elif self.benefit_type == 'widow': + account_revenue = company_id.widow_account_id + + if not account_revenue: + # Raise an error + raise ValidationError( + _(u'Invalid Orphans or Widows account, Please configure it')) + + account_receivable = company_id.kafala_benefit_account_id + if not account_receivable: + # Raise an error + raise ValidationError( + _(u'Invalid From Account of Benefit Payments (Recievable Account), Please configure it')) + + Invoice = self.env["account.move"].sudo() + + currency_id = self.env.ref('base.main_company').currency_id + + invoice_id = Invoice.create({ + 'operation_id': self.id, + 'operation_type': 'sponsorship', + 'partner_id': customer.id, + 'reference_type': 'none', + 'journal_id': journal.id, + 'currency_id': journal.currency_id.id or company_id.currency_id.id or currency_id.id, + # journal.currency_id.id + 'name': u'إستحقاق كفالة' + ' - ' + self.code, + 'account_id': account_receivable.id, # account_id or + 'type': 'out_invoice', + 'comment': u'بغرض إستحقاق كفالة', + 'date_invoice': next_date, + }) + + product_id = self.env['product.product'].sudo().search( + [('default_code', '=', "sponsorship")], limit=1) + partner_id = self.sponsor_id + + # Update product: + product_id.sudo().write({ + "list_price": self.contribution_value, + "name": u'كفالة' + ' ' + self.code, + 'description_sale': u'كفالة رقم ' + self.code, + }) + + # Create line + InvoiceLine = self.env["account.move.line"] + InvoiceLine.create({ + 'product_id': product_id.id, + 'quantity': 1, + 'price_unit': self.contribution_value, + 'invoice_id': invoice_id.id, + 'name': u'كفالة رقم ' + self.code, + 'account_id': account_revenue.id, + # "invoice_line_tax_ids": [], + }) + + invoice_id.action_invoice_open() + + if invoice_id: + self.state = "wait_pay" + + return invoice_id + + def button_invoice_count(self): + """ It displays invoice based on sponsorship """ + return { + 'name': _('Invoices'), + 'domain': [('operation_id', '=', self.id), ('operation_type', '=', 'sponsorship')], + 'view_type': 'form', + 'res_model': 'account.move', + 'view_mode': 'tree,form', + 'type': 'ir.actions.act_window', + 'context': { + "create": False + } + } + + def button_payment(self): + """ Button to create invoice for sponsorship """ + out_invoice = self.create_next_invoice() + + return { + 'name': _('The Sponsorship Invoices'), + 'type': 'ir.actions.act_window', + 'res_model': 'account.move', + 'view_mode': 'form', + 'res_id': out_invoice.id if out_invoice else False + } + + # EE + def _compute_overdue_total_amount(self): + """ Calculate Total Overdue Amount""" + for rec in self: + overdue_kafala = 0 + # if rec.has_delay and rec.state in ['wait_pay', 'progress', 'to_cancel']: + if rec.has_delay and rec.state in ['wait_pay', 'to_cancel']: + # Get open invoices + open_invoices = self.env['account.move'].sudo().search( + [('state', '=', 'open'), ('operation_id', '=', rec.id), ('operation_type', '=', 'sponsorship')]) + for invoice in open_invoices: + if invoice.state == 'open': + overdue_kafala += invoice.residual_company_signed + rec.overdue_amount = overdue_kafala + + @api.depends("paid_month_count", "month_count", "last_invoice_date") + def _compute_next_due_date(self): + """ Find the Next Due Date for Sponsorship Payment""" + for rec in self: + next_due = None + if rec.end_date: + end_date = parse(str(rec.end_date)).date() + else: + end_date = None + + # if rec.state in ['draft', 'wait_pay', 'progress', 'to_cancel']: + if rec.state in ['draft', 'wait_pay', 'to_cancel']: + if rec.end_date and rec.paid_month_count < rec.month_count: + start_date = parse(str(rec.start_date)).date() + next_due = start_date + \ + relativedelta(months=(rec.paid_month_count + 1)) + else: + if rec.last_invoice_date: + last_invoice = parse(str(rec.last_invoice_date)).date() + next_due = last_invoice + relativedelta(months=1) + + if (next_due and end_date and next_due <= end_date) or (next_due and not rec.end_date): + rec.next_due_date = next_due + else: + rec.next_due_date = None + + if rec.state == "confirmed": + rec.next_due_date = parse(str(rec.start_date)).date() + + def _compute_paid_month_count(self): + """ Calculate Total Paid Months for the sponsorship """ + for rec in self: + invoice_count = self.env['account.move'].sudo().search_count([ + ('operation_type', '=', 'sponsorship'), + ('operation_id', '=', rec.id), + ('state', '=', 'paid'), + ]) + + if invoice_count > 0: + rec.paid_month_count = invoice_count + else: + rec.paid_month_count = 0 + + def _compute_month_count(self): + """ Calculate months count """ + for rec in self: + if rec.start_date and rec.end_date: + start = parse(str(rec.start_date)).date() + end = parse(str(rec.end_date)).date() + months = relativedelta(start, end) + rec.month_count = abs(months.months) + abs(months.years*12) + + def is_sponsorship_has_delay(self): + """ Find that if sponsorship package has overdue invoices""" + sudoConf = self.env['ir.config_parameter'].sudo() + allowed_days = int(sudoConf.get_param( + 'odex_takaful_base.allowed_pay_days')) + date_today = datetime.datetime.today().date() + + # Get open invoices + open_invoices = self.env['account.move'].sudo().search( + [('state', '=', 'open'), ('operation_id', '=', self.id), ('operation_type', '=', 'sponsorship')]) + for invoice in open_invoices: + payment_limt_date = parse( + str(invoice.date_due)) + timedelta(days=allowed_days) + if payment_limt_date.date() < date_today: + return payment_limt_date + + return False + + @api.depends('expected_cancel_date') + def _check_if_has_delay(self): + sudoConf = self.env['ir.config_parameter'].sudo() + cancel_kafala = int(sudoConf.get_param( + 'odex_takaful_base.cancel_kafala')) + date_today = datetime.datetime.today().date() + for rec in self: + delay_date = rec.is_sponsorship_has_delay() + if delay_date: + rec.has_delay = True + rec.due_days = (date_today - delay_date.date()).days + rec.expected_cancel_date = delay_date + \ + timedelta(days=(cancel_kafala)) + else: + rec.has_delay = False + rec.expected_cancel_date = None + rec.due_days = 0 + + @api.model + def create(self, vals): + # if vals.get('code', 'New') == 'New': + # vals['code'] = self.env['ir.sequence'].sudo().next_by_code('sponsorship.sequence') + + sponsor_phone = vals.get('sponsor_phone', False) + if sponsor_phone: + self._check_phone_numbers(sponsor_phone) + validated_sponsor_phone = self.phone_format(sponsor_phone) + vals.update({'sponsor_phone': validated_sponsor_phone}) + # Create the record + res = super(TakafulSponsorship, self).create(vals) + + + + return res + + def write(self, vals): + if 'sponsor_phone' in vals: + self._check_phone_numbers(vals['sponsor_phone']) + vals['sponsor_phone'] = self.phone_format(vals['sponsor_phone']) + res = super(TakafulSponsorship, self).write(vals) + return res + + def _check_phone_numbers(self, mobile_number): + for rec in self: + mobile = str(mobile_number).strip().replace(" ", "").replace("-", "") + if not re.fullmatch(SAUDI_MOBILE_PATTERN, mobile): + raise ValidationError(_('Enter a valid Saudi mobile number')) + + # @api.multi + def action_open_sponsorship_payement(self): + """Open Payments for a Sponsorship""" + pay = [] + pay_ids = self.voucher_ids.mapped('payment_id').ids + for line in self.voucher_ids: + pay.append(line.line_ids.filtered(lambda x : x.payment_id != False).mapped('payment_id').id) + domain = [('id','in',pay_ids)] + context = dict(self.env.context or {}) + context['default_sponsor_id'] = self.sponsor_id.id + context['default_sponsorship_id'] = self.id + return { + 'name': _('Sponsorship Payment'), + 'view_type': 'form', + 'view_mode': 'tree,form', + 'type': 'ir.actions.act_window', + 'res_model': 'account.payment', + 'target': 'current', + 'domain': domain, + } + + # @api.multi + def action_set_cancel(self): + """Make Cancellation For Sponsorship""" + domain = [] + context = dict(self.env.context or {}) + context['default_sponsor_id'] = self.sponsor_id.id + context['default_cancel_user_id'] = self.env.uid or SUPERUSER_ID + context['default_sponsorship_id'] = self.id + view = self.env.ref('odex_takaful.sponsorship_cancellation_form') + return { + 'name': _('Sponsorship Cancellation'), + 'view_mode': 'form', + 'view_type': 'form', + 'type': 'ir.actions.act_window', + 'res_model': 'sponsorship.cancellation', + 'view_id': view.id, + 'target': 'new', + 'domain': domain, + 'context': context, + } + + def action_set_close(self): + self.ensure_one() + self.state = 'closed' + + # @api.multi + def action_make_payement(self): + """Create Payment for Sponsorship Beneficiary""" + # Create necessary objects + if self.state == 'draft': + # Raise an error + raise ValidationError( + _(u'This Sponsorship is not confirmed')) + + self.sponsor_id.write({ + 'lang': 'ar_001', + }) + + domain = [] + context = dict(self.env.context or {}) + context['default_sponsor_id'] = self.sponsor_id.id + context['default_sponsorship_id'] = self.id + view = self.env.ref('odex_takaful.takaful_sponsorship_payment_form') + return { + 'name': _('Sponsorship Payment'), + 'view_mode': 'form', + 'view_type': 'form', + 'type': 'ir.actions.act_window', + 'res_model': 'sponsorship.payment', + 'view_id': view.id, + 'target': 'current', + 'domain': domain, + 'context': context, + } + + def action_confirm_data(self): + # In a model method or an automated action: + self.ensure_one() + # Check if donation details is empty + if not len(self.donations_details_lines) and not self.donations_details_lines_mechanism_ids: + raise ValidationError( + _("Please add at least one line in donation details!") + ) + #Check if The Total Amount is not Zero + if self.total_sponsorship_amount == 0: + raise ValidationError( + _("Please Check The Amount in donation Line!") + ) + + if not self.code: + self.code = self.env['ir.sequence'].sudo().next_by_code('sponsorship.sequence') + + if self.record_type == 'sponsorship': + for line in self.donations_details_lines_mechanism_ids: + if line.benefit_ids: + if len(line.benefit_ids) > 1: + for count, bf in enumerate(line.benefit_ids): + if count == 0: + line.benefit_id = bf.id + line.benefit_ids = bf.ids + line.benefits_count = 1 + else: + new_vals = { + 'benefit_ids': [(6, 0, [bf.id])], + 'benefit_id': bf.id, + 'record_type': line.record_type, + 'sponsorship_duration': line.sponsorship_duration, + 'product_template_id': line.product_template_id.id, + 'direct_debit': line.direct_debit, + 'payment_month_count': line.payment_month_count, + 'start_date': line.start_date, + 'donation_amount': line.donation_amount, + 'payment_option': line.payment_option, + 'donation_mechanism': 'with_conditions', + } + self.write({'donations_details_lines_mechanism_ids': [(0, 0, new_vals)]}) + + elif len(line.benefit_ids) == 1: + line.benefit_id = line.benefit_ids[0].id + + all_donation_lines = (self.donations_details_lines + self.donations_details_lines_mechanism_ids).filtered( + lambda r: r.display_type == False) + + + + for line in all_donation_lines.filtered(lambda r: r.record_type == 'sponsorship'): + for benefit in (line.benefit_id | line.benefit_ids): + if benefit.sponsor_related_id: + raise ValidationError(_("Cannot proceed with payment!\n\n" + "The following sponsorship lines contain beneficiaries that are already sponsored by other sponsors:\n" + "Lines: %s\n\n" + "Please choose different beneficiaries for these lines before proceeding with the payment." % line.sequence_no)) + + + if not all(all_donation_lines.mapped("sponsorships_computed")): + (self.donations_details_lines + self.donations_details_lines_mechanism_ids).compute_sponsorships_lines() + + if self.state == 'draft': + # Send SMS Notification + msg_template = self.env['takaful.message.template'].search( + [('template_name', '=', 'sponsorship_creation')], limit=1) + if self.start_date: + start_date = parse(str(self.start_date)).date() + start_by = _('Start Date') + start_text = start_by + ' ' + start_date.strftime('%d, %b %Y') + + subject = msg_template.title + message = msg_template.body + '\n' + _('Sponsorship Number') + ' %s' % self.code + '\n' + _( + 'Contribution Value') + ' %s' % str(self.contribution_value) + '\n' + start_text + user_id = self.sponsor_id.user_id + push = self.env['takaful.push.notification'].sudo().create({ + 'user_id': user_id.id, + 'title': subject, + 'body': message, + }) + + push.sudo().send_sms_notification() + + self.state = "confirmed" + for line_state in all_donation_lines: + line_state.state = 'confirmed' + faal_kheer_partner_id = self.env.company.faal_kheer_partner_id + # if self.sponsor_or_donor_type != 'registered': + # return + if self.sponsor_or_donor_type in ["registered", "new_sponsor"]: + partner_id = self.sponsor_id + elif self.sponsor_or_donor_type == "unknown": + partner_id = faal_kheer_partner_id + else: + partner_id = faal_kheer_partner_id + + sudoConf = self.env['ir.config_parameter'].sudo() + kafala_journal_id = sudoConf.get_param('odex_takaful_base.kafala_journal_id', default=False) + if not kafala_journal_id: + raise ValidationError( + _(''' Please set income journal in settings (kafala_journal_id Payment Journal)''')) + Invoice = self.env["account.move"].sudo() + invoice_values = { + 'takaful_sponsorship_id': self.id, + 'move_type': 'out_invoice', + 'journal_id': int(kafala_journal_id), + 'date': fields.Date.today(), + 'partner_id': partner_id.id, + 'invoice_origin': self.code, + } + invoice_line_vals = [(0, 0, { + 'product_id': line.product_id.id, + 'price_unit': line.total_donation_amount, + 'quantity': 1, + 'name': _("Sponsorship Entitlement Number %s") % line.sequence_no, + 'analytic_account_id': line.sponsorship_id.branch_custom_id.branch.analytic_account_id.id, + }) for line in all_donation_lines] + + current_invoice = self.journal_entry_ids.filtered(lambda r: r.move_type == 'out_invoice' and r.state == 'draft') + if current_invoice: + invoice_values['invoice_line_ids'] = [(5, 0, 0)] + invoice_line_vals + current_invoice.sudo().write(invoice_values) + invoice_id = current_invoice + else: + invoice_values.update({'invoice_line_ids': invoice_line_vals, 'name': self.env['ir.sequence'].next_by_code('account.move.accrsp')}) + invoice_id = Invoice.create(invoice_values) + + for line in invoice_id.invoice_line_ids: + line.account_id = line._get_computed_account() + taxes = line._get_computed_taxes() + if taxes and line.move_id.fiscal_position_id: + taxes = line.move_id.fiscal_position_id.map_tax(taxes, partner=line.partner_id) + line.tax_ids = taxes + line.product_uom_id = line._get_computed_uom() + + invoice_id.sudo().action_post() + + # Search for the notification message for 'create_kafala' + notification = self.env['takaful.notification'].sudo().search( + [('notification_type', '=', 'create_kafala'), ('message_type_ids.tool_type', '=', 'app')], + limit=1 + ) + + if not notification: + raise ValidationError(_("No Whatsapp notification of type 'Create Kafala' found.")) + else: + pass + #self.action_send_whatsapp() + + + def action_send_whatsapp(self): + config = self.env['ir.config_parameter'].sudo() + account_sid = config.get_param('odex_takaful.twilio_account_sid') + auth_token = config.get_param('odex_takaful.twilio_auth_token') + from_whatsapp = config.get_param('odex_takaful.twilio_from_whatsapp') + + if not account_sid or not auth_token or not from_whatsapp: + raise ValidationError(_("Twilio configuration is missing. Please configure Twilio SID, Auth Token, and WhatsApp number in General Configurations.")) + + from_cleaned_mobile = re.sub(r'[^\d+]', '', from_whatsapp) + from_whatsapp_number = f'whatsapp:{from_cleaned_mobile}' + # Search for the notification message for 'create_kafala' + notification = self.env['takaful.notification'].sudo().search( + [('notification_type', '=', 'create_kafala'), ('message_type_ids.tool_type', '=', 'app')], + limit=1 + ) + + if not notification: + raise ValidationError(_("No notification of type 'Create Kafala' found.")) + + # Use the message from the notification + amount = self.total_sponsorship_amount if hasattr(self, 'total_sponsorship_amount') else 0.0 + message = notification.message or _("No message found in 'Create Kafala' notification.") + message = notification.message.replace('[Amount]', f"{amount:.2f}") + message = re.sub(r'<[^>]+>', '', message).strip() + + for partner in self: + mobile = partner.sponsor_id.mobile if partner.sponsor_id else partner.member_id.mobile + + if mobile: + # Clean the number (keep + and digits only) + cleaned_mobile = re.sub(r'[^\d+]', '', mobile) + to_whatsapp_number = f'whatsapp:{cleaned_mobile}' + url = f"https://api.twilio.com/2010-04-01/Accounts/{account_sid}/Messages.json" + + payload = { + 'From': from_whatsapp_number, + 'To': to_whatsapp_number, + 'Body': message, + } + + response = requests.post( + url, + data=payload, + auth=(account_sid, auth_token) + ) + + if response.status_code != 201: + raise ValidationError(_("Failed to send WhatsApp message: %s") % response.text) + + + # @api.multi + def print_makfuleen_report(self): + """ Method to print Makfuleen report """ + datas = dict(self.env.context) + return self.env.ref('odex_takaful.makfuleen_report_pdf_act').report_action(self, data=datas) + + # @api.multi + def process_sponsor_payments_scheduler(self): + domain = [] + context = dict(self.env.context or {}) + context["create"] = False + context["edit"] = False + flags = {'initial_mode': 'readonly'} # default is 'edit' + return { + 'name': _('Move Entries'), + 'domain': domain, + 'view_type': 'form', + 'res_model': 'account.move', + 'view_mode': 'tree,form', + 'type': 'ir.actions.act_window', + 'flags': flags, + 'context': context, + } + + # """ + # contribute = self.env['takaful.contribution'].sudo().create({ + # 'name': u'مساهمة مالية لكمبيوتر مكتبي', + # 'sponsor_id': self.sponsor_id.id, + # 'benefit_id': self.benefit_id.id or False, + # 'amount': self.contribution_value, + # }) + # + # contribute.sudo().create_entry() + # """ + + # @api.multi + def monthly_create_sponsorship_invoice_scheduler(self): + sponsorships = self.env['takaful.sponsorship'].sudo().search( + [('state', 'in', ['wait_pay', 'to_cancel'])]) + # [('state', 'in', ['wait_pay', 'progress', 'to_cancel'])]) + for rec in sponsorships: + if rec.last_invoice_date: + today = trunc_datetime(datetime.datetime.today()).date() + invoice_date = parse(str(rec.last_invoice_date)) + last_invoice = trunc_datetime(invoice_date).date() + if today != last_invoice: + rec.sudo().create_next_invoice() + + + # @api.multi + def process_sponsorship_workflow_scheduler(self): + # _logger.info("Hi, Manage Sponsorship Workflow Scheduler")s + # Part: Processing state + sudoConf = self.env['ir.config_parameter'].sudo() + notifications = sudoConf.get_param( + 'odex_takaful_base.notification_ids') + + cancel_number = 1 + finish_number = 1 + cancel_message_type_ids = [] + finish_message_type_ids = [] + if notifications: + notification_ids = self.env['takaful.notification'].sudo().search( + [('id', 'in', literal_eval(notifications))]) + for rec in notification_ids: + if rec.notification_type == "before_cancel": + cancel_number = rec.duration + cancel_message_type_ids = rec.message_type_ids + + if rec.notification_type == "before_finish": + finish_number = rec.duration + finish_message_type_ids = rec.message_type_ids + + sponsorships = self.env['takaful.sponsorship'].sudo().search( + [('state', 'in', ['wait_pay', 'to_cancel'])]) + # [('state', 'in', ['wait_pay', 'progress', 'to_cancel'])]) + + date_today = datetime.datetime.today().date() + for rec in sponsorships: + # For colse (Finishing the sponsorships) + partner_id = rec.sponsor_id + if rec.end_date: + end_date = datetime.datetime.strptime( + rec.end_date, '%Y-%m-%d').date() + if end_date == date_today: + rec.sudo().write({"state": "closed", }) + # Send Close Notification + sponsorship_close_template = self.env['takaful.message.template'].sudo().search( + [('template_name', '=', 'sponsorship_close')], limit=1) + + subject = sponsorship_close_template.title + message = sponsorship_close_template.body + user_id = self.env['res.users'].sudo().search( + [('partner_id', '=', partner_id.id)], limit=1) + + push = self.env['takaful.push.notification'].sudo().create({ + 'user_id': user_id.id, + 'title': subject, + 'body': message, + }) + + push.sudo().send_sms_notification() + push.sudo().send_email_notification() + else: + before_close_date = end_date - \ + timedelta(days=finish_number) + if before_close_date == date_today and not rec.to_renew: + rec.to_renew = True + # Send About to Close Notification + sponsorship_to_close_template = self.env['takaful.message.template'].sudo().search( + [('template_name', '=', 'sponsorship_to_close')], limit=1) + + subject = sponsorship_to_close_template.title + message = sponsorship_to_close_template.body + + user_id = self.env['res.users'].sudo().search( + [('partner_id', '=', partner_id.id)], limit=1) + push = self.env['takaful.push.notification'].sudo().create({ + 'user_id': user_id.id, + 'title': subject, + 'body': message, + }) + for msg in finish_message_type_ids: + if msg.tool_type == "sms": + push.sudo().send_sms_notification() + + elif msg.tool_type == "email": + push.sudo().send_email_notification() + + # For Cancel or about to cancel sponsorships + if rec.expected_cancel_date: + cancel_date = datetime.datetime.strptime( + rec.expected_cancel_date, '%Y-%m-%d').date() + if cancel_date == date_today: + # Create Automatic cancellation record + sp_cancel = self.env['sponsorship.cancellation'].sudo().create({ + 'sponsorship_id': self.id, + 'cancel_type': "sys", + 'cancel_user_id': self.env.uid or SUPERUSER_ID, + 'note': _('Overdue in Sponsorships Payment of Total %s') % str(rec.overdue_amount) + }) + # Confirm cancellation and Send Notifications + sp_cancel.sudo().do_cancel_action() + else: + before_cancel_date = cancel_date - \ + timedelta(days=cancel_number) + if rec.state != "to_cancel" and before_cancel_date == date_today: + rec.sudo().write({"state": "to_cancel", }) + rec.close_to_be_canceled_date = before_cancel_date + # Send About to Cancel Notification + sponsorship_to_cancel_template = self.env['takaful.message.template'].sudo().search( + [('template_name', '=', 'sponsorship_to_cancel')], limit=1) + + subject = sponsorship_to_cancel_template.title + message = sponsorship_to_cancel_template.body + '\n' + _('Overdue Amount:') + ' %s' % str( + rec.overdue_amount) + + user_id = self.env['res.users'].sudo().search( + [('partner_id', '=', partner_id.id)], limit=1) + push = self.env['takaful.push.notification'].sudo().create({ + 'user_id': user_id.id, + 'title': subject, + 'body': message, + }) + for msg in cancel_message_type_ids: + if msg.tool_type == "sms": + push.sudo().send_sms_notification() + + elif msg.tool_type == "email": + push.sudo().send_email_notification() + else: + rec.close_to_be_canceled_date = None + + # _logger.info("Bye, Manage Sponsorship Workflow Scheduler") + + # @api.multi + def get_voucher_lines(self): + """ + prepare voucher lines from details lines + for voucher creation + """ + self.ensure_one() + if self.benefit_type == "orphan": + if not self.env.user.company_id.widow_account_id: + raise ValidationError( + _(''' Please set orphan restricted income account in settings ''')) + account_id = self.env.user.company_id.orphan_account_id.id + elif self.benefit_type == "widow": + if not self.env.user.company_id.widow_account_id: + raise ValidationError( + _(''' Please set widow restricted income account in settings ''')) + account_id = self.env.user.company_id.widow_account_id.id + + lines = [ + { + 'name': self.code, + 'account_id': account_id, + 'price_unit': self.contribution_value, + 'quantity': 1, # only one service + 'analytic_account_id': self.branch_custom_id.branch.analytic_account_id.id, + } + ] + lines = [(0, 0, x) for x in lines] + return lines + + # @api.multi + def open_account_voucher(self): + self.ensure_one() + lines = self.get_voucher_lines() + journal_id = False + sudoConf = self.env['ir.config_parameter'].sudo() + journal_id = sudoConf.get_param('odex_takaful_base.kafala_journal_id', default=False) + if not journal_id: + raise ValidationError( + _(''' Please set income journal in settings (kafala_journal_id Payment Journal)''')) + + company_id = self.env.user.company_id.id + p = self.sponsor_id if not company_id else self.sponsor_id.with_company(company_id) + + rec_account = p.property_account_receivable_id + pay_account = p.property_account_payable_id + if not rec_account and not pay_account: + raise ValidationError( + _(''' Please set donor's payable and receivable accounts first ''')) + + periods = self.env['fiscalyears.periods'].search( + [('state', '=', 'open'), + ('date_from', '<=', fields.Datetime.now()), + ('date_to', '>=', fields.Datetime.now())]) + + if not periods: + raise ValidationError( + _('No fiscal year periods in this date.')) + + data = { + # 'name': self.code, + # 'ref': self.code, + # 'move_type': 'out_receipt', + # 'date': fields.Datetime.now(), + 'invoice_date': fields.Datetime.now(), + 'invoice_date_due': fields.Datetime.now(), + 'narration': self.code, + 'company_id': self.env.user.company_id.id, + 'partner_id': self.sponsor_id.id, + 'journal_id': int(journal_id), + # 'account_id': self.sponsor_id.property_account_receivable_id.id, + 'line_ids': lines, + # 'pay_now': 'pay_now', + # 'payment_journal_id':self.payment_journal_id.id, + 'sponsorship_id':self.id, + } + voucher_id = self.env['account.move'].create(data) + self.voucher_ids = [(4,voucher_id.id)] + + def action_open_voucher_payement(self): + """Open Payments for a voucher""" + domain = [('sponsorship_id', '=', self.id or False)] + context = dict(self.env.context or {}) + + return { + 'name': _('voucher Payment'), + 'view_type': 'form', + 'view_mode': 'tree,form', + 'views': [(self.env.ref( + 'account.view_move_tree').id, 'tree'), + (self.env.ref('account.view_move_form').id, 'form')], + 'type': 'ir.actions.act_window', + 'res_model': 'account.move', + 'target': 'current', + 'domain': domain, + 'context': context, + } + def create_new_sponsor(self): + return { + 'name': _('Add New Sponsor'), + 'type': 'ir.actions.act_window', + 'res_model': 'res.partner', + 'view_mode': 'form', + 'view_id': self.env.ref('odex_takaful.view_takaful_sponsor_form').id, + 'target': 'new', + 'context': { + 'default_company_type': 'person', + 'parent_model': self._name, # Pass current model's name + 'parent_id': self.id, # Pass current record's ID # Pass the current record ID + 'default_is_sponsor_portal': True, + 'default_is_donor': True, + 'sponsor_contact': True, + }, + } + + def action_refund(self): + refund_amount = sum(self.sponsorship_scheduling_line_ids.mapped('amount')) - sum(self.sponsorship_scheduling_line_ids.mapped('refunded_amount')) + return { + 'type': 'ir.actions.act_window', + 'name': 'Refund Wizard', + 'res_model': 'refund.wiz', + 'view_mode': 'form', + 'target': 'new', + 'context': { + 'default_refund_amount': refund_amount, + + }, } + + def action_register_payment(self): + invoice_id = self.env['account.move'].sudo().search([ + ('takaful_sponsorship_id', '=', self.id), + ('move_type', '=', 'out_invoice'), + ('state', '=', 'posted'), + ('payment_state', 'in', ['not_paid', 'partial'])], limit=1, order='id') + if not invoice_id: + raise ValidationError(_("No invoice found for this sponsorship.")) + sponsorship_line_ids = (self.donations_details_lines + self.donations_details_lines_mechanism_ids).filtered(lambda l: not l.direct_debit) + amount = sum(sponsorship_line_ids.mapped('total_donation_amount')) - self.with_context(exclude_direct_debit=True).amount_paid + + return { + 'name': _('Register Payment'), + 'res_model': 'account.payment.register', + 'view_mode': 'form', + 'context': { + 'active_model': 'account.move', + 'active_ids': invoice_id.ids, + 'default_amount': amount, + 'dont_redirect_to_payments': True, + 'sponsorship_line_ids': sponsorship_line_ids.ids, + 'sponsorship_payment': True, + 'sponsorship_id': self.id, + 'sponsorship_payment_skip_compute_amount': True, + 'default_sponsorship_payment': True, + 'force_sponsorship_line_partner_id': self.sponsor_id.id, + }, + 'target': 'new', + 'type': 'ir.actions.act_window', + } + show_register_payment = fields.Boolean(string='Show Register Payment', compute='_compute_show_register_payment') + + def _compute_show_register_payment(self): + for rec in self: + sponsorship_line_ids = (rec.donations_details_lines | rec.donations_details_lines_mechanism_ids).filtered(lambda l: not l.direct_debit) + rec.show_register_payment = rec.with_context(exclude_direct_debit=True).amount_paid < sum(sponsorship_line_ids.mapped('total_donation_amount')) + + def action_reset_to_draft(self): + for rec in self: + if rec.state != 'confirmed': + raise ValidationError(_("You can only reset to draft a confirmed sponsorship.")) + move_ids = rec.journal_entry_ids.filtered(lambda l: l.move_type == 'out_invoice') + move_ids.sudo().button_draft() + self.write({'state': 'draft'}) + all_donation_lines = (self.donations_details_lines + self.donations_details_lines_mechanism_ids).filtered( + lambda r: r.display_type == False) + for line in all_donation_lines: + line.state = 'draft' + + +class AnotherSponsors(models.Model): + _name = "donate.for.another.person" + + sponsor_name = fields.Char(string="Sponsor Name") + sponsor_phone = fields.Char(string="Sponsor Phone") + sponsor_id_number = fields.Char(string="Sponsor ID Number") + sponsorship_id = fields.Many2one('takaful.sponsorship') + receive_messages = fields.Boolean(string='Receive messages?') + note = fields.Char(string='Note') + +class RefundDetailsLines(models.TransientModel): + _name = 'refund.details.lines' + _description = "Refund Destails Lines" + + refund_date = fields.Datetime(string='Refund Date') + sponsorship_id = fields.Many2one( + 'takaful.sponsorship', + string='Sponsorship', + ) + sponsorship_scheduling_line = fields.Many2one( + 'sponsorship.scheduling.line', + string='Schedule Details Lines', + ) + sponsorship_scheduling_line_ids = fields.Many2many('sponsorship.scheduling.line','refund_details_scheduling_rel','refund_id','schedule_id') + + sequence_no = fields.Char(related="sponsorship_scheduling_line.sequence_no") + + payment_details_line = fields.Many2one( + 'payment.details.lines', + string='Payment Details Lines', + ) + + sponsor_id = fields.Many2one( + 'res.partner', + string='Sponsor', + related='sponsorship_id.sponsor_id' + ) + refund_amount = fields.Float(string='Refund Amount') + currency_id = fields.Many2one('res.currency', string='Currency', + default=lambda self: self.env.company.currency_id, readonly=True) + refund_reason = fields.Many2one( + 'refund.reasons', + string='Refund Reason', + ) + payment_method_id = fields.Many2one('takaful.payment.method', string="Payment Method") + + payment_method = fields.Selection( + selection=[ + ("cash", "Cash"), + ("card", "Card"), + ("check", "Check"), + ("credit_card", "Credit Card"), + ("bank", "Bank Transfer"), + ("direct_debit", "Direct Debit") + ] + , related="payment_method_id.payment_method" + ) + journal_id = fields.Many2one( + 'account.journal', + string="Refund Account Journal", + ) + + attachment_ids = fields.Many2many('ir.attachment', 'rel_refund_details_attachment', 'refund_details_id', 'attachment_id', + string='Attachments') + + invoiced = fields.Boolean(copy=False, readonly=True) + +class PaymentDetailsLines(models.Model): + _name = "payment.details.lines" + + donation_amount = fields.Float(string='Donation Amount') + remaining_amount = fields.Float(string='Remaining Amount') + currency_id = fields.Many2one('res.currency', string='Currency', + default=lambda self: self.env.company.currency_id, readonly=True) + donation_date = fields.Date(string='Donation Date',default=lambda self: fields.Date.today(), readonly=True) + payment_date = fields.Datetime(string='Payment Date', default=fields.Datetime.now) + note = fields.Char(string='Note') + journal_id = fields.Many2one('account.journal', string="Journal") + points_of_sale = fields.Many2one('points.of.sale.custom', string="Point OF sale") + sponsorship_id = fields.Many2one('takaful.sponsorship') + sponsorship_scheduling_line_id = fields.Many2one('sponsorship.scheduling.line') + sponsorship_scheduling_line_ids = fields.Many2many('sponsorship.scheduling.line') + bank_id = fields.Many2one('res.partner.bank',string="Sponsor Bank Number", domain=lambda self: self._available_banks()) + bank_journal_id = fields.Many2one( + 'account.journal', + string="Sponsor Bank Journal", + readonly=False, + domain="[('type', '=', 'bank')]" + ) + bank_name = fields.Char( + string="Sponsor Bank Name", + related="bank_id.bank_id.name" + ) + charity_journal_id = fields.Many2one('account.journal', string="charity Bank",related = 'points_of_sale.journal_id') + name = fields.Char(string="Ref.",readonly=True) + check_number = fields.Char(string='Check Number') + account_payment_method = fields.Many2one('account.payment.method.line',domain="[('payment_type','=','inbound')]",string='Account Payment Method') + branch_custom_id = fields.Many2one('branch.settings', string="Branch",related='sponsorship_id.branch_custom_id') + sponsor_account_number = fields.Char(string='Sponsor Account Number') + sa_iban = fields.Char('SA',default='SA',readonly=True) + charity_bank_id = fields.Many2one('account.journal', string="charity Bank") + bank_transfer_amount = fields.Float(string='Bank Transfer Amount') + direct_debit_amount = fields.Float(string='Direct Debit Amount') + payment_attachment = fields.Many2many('ir.attachment', 'rel_attachment_payment_details', 'payment_id','attachment_id', string='Payment Attachment') + direct_debit_start_date = fields.Date(string='Direct Debit Start Date') + direct_debit_end_date = fields.Date(string='Direct Debit End Date') + sponsorship_scheduling_ref = fields.Char('Scheduling Sequences', compute='_compute_sponsorship_scheduling_ref') + is_fully_refund = fields.Boolean(string='Is Fully Refund') + is_partial_refund = fields.Boolean(string='Is Partial Refund') + payment_method_id = fields.Many2one('takaful.payment.method', string="Payment Method") + payment_method = fields.Selection(selection=[("cash", "Cash"),("card", "Card"),("check", "Check"),("credit_card", "Credit Card"),("bank", "Bank Transfer"),("direct_debit", "Direct Debit")], related="payment_method_id.payment_method") + + def action_send_whatsapp(self): + notification = self.env['takaful.notification'].sudo().search( + [('notification_type', '=', 'partial_payment'), ('message_type_ids.tool_type', '=', 'app')], + limit=1 + ) + if not notification: + raise ValidationError(_("No notification of type 'Create Kafala' found.")) + + config = self.env['ir.config_parameter'].sudo() + account_sid = config.get_param('odex_takaful.twilio_account_sid') + auth_token = config.get_param('odex_takaful.twilio_auth_token') + from_whatsapp = config.get_param('odex_takaful.twilio_from_whatsapp') + + if not account_sid or not auth_token or not from_whatsapp: + raise ValidationError(_("Twilio configuration is missing. Please configure Twilio SID, Auth Token, and WhatsApp number in General Configurations.")) + + from_cleaned_mobile = re.sub(r'[^\d+]', '', from_whatsapp) + from_whatsapp_number = f'whatsapp:{from_cleaned_mobile}' + # Search for the notification message for 'create_kafala' + + + # Use the message from the notification + amount = self.donation_amount if hasattr(self, 'donation_amount') else 0.0 + message = notification.message.replace('[Amount]', f"{amount:.2f}") + + for partner in self: + mobile = partner.sponsorship_id.sponsor_id.mobile if partner.sponsorship_id.sponsor_id else partner.sponsorship_id.member_id.mobile + if mobile: + # Clean the number (keep + and digits only) + cleaned_mobile = re.sub(r'[^\d+]', '', mobile) + to_whatsapp_number = f'whatsapp:{cleaned_mobile}' + url = f"https://api.twilio.com/2010-04-01/Accounts/{account_sid}/Messages.json" + + payload = { + 'From': from_whatsapp_number, + 'To': to_whatsapp_number, + 'Body': message, + } + + response = requests.post( + url, + data=payload, + auth=(account_sid, auth_token) + ) + + if response.status_code != 201: + raise ValidationError(_("Failed to send WhatsApp message: %s") % response.text) + + + + def _available_banks(self): + active_model = self._context.get('active_model', False) + active_id = self._context.get('active_id', False) + bank_ids = [] + if active_id: + if active_model == "takaful.sponsorship": + bank_ids = self.env[active_model].browse(active_id).sponsor_id.bank_ids.ids + elif active_model == "sponsorship.scheduling.line": + bank_ids = self.env[active_model].browse(active_id).sponsorship_id.sponsor_id.bank_ids.ids + return [('id', 'in', bank_ids)] + + def print_report_name(self): + sponsorship_scheduling_line_id = self.sponsorship_scheduling_line_id or self.sponsorship_scheduling_line_ids + return "%s - %s" % (self.name, sponsorship_scheduling_line_id.beneficiary_id.name) + + @api.depends('sponsorship_scheduling_line_id', 'sponsorship_scheduling_line_ids') + def _compute_sponsorship_scheduling_ref(self): + for rec in self: + sponsorship_scheduling_lines = rec.sponsorship_scheduling_line_id or rec.sponsorship_scheduling_line_ids + rec.sponsorship_scheduling_ref = ', '.join(sponsorship_scheduling_lines.mapped('sequence_no')) + + @api.onchange('sponsor_account_number') + def onchange_sponsor_account_number(self): + if self.sponsor_account_number: + # Check if the value is numeric before anything else + if not self.sponsor_account_number.isdigit(): + raise ValidationError(_("The account number should contain only digits.")) + + # Check if the account number contains exactly 22 digits + if len(self.sponsor_account_number) != 22: + raise ValidationError(_("The IBAN number must contain exactly 22 digits.")) + + @api.onchange('branch_custom_id') + def _onchange_branch_custom_id(self): + domain = [] + for rec in self: + domain = [ + ('branch_custom_ids', 'in', [rec.branch_custom_id.id]) ] + return {'domain': {'points_of_sale': domain}} + + @api.model + def create(self, vals): + res = super(PaymentDetailsLines, self).create(vals) + res.create_journal_entry() + if not res.name or res.name == _('New'): + res.name = self.env['ir.sequence'].sudo().next_by_code('payment.details.sequence') or _('New') + sponsorship_lines = res.sponsorship_scheduling_line_id or res.sponsorship_scheduling_line_ids + sponsorship_lines.sudo().write({ 'status': 'paid' }) # Change the status to 'paid' + if all(res.sponsorship_id.sponsorship_scheduling_line_ids.mapped(lambda r: r.status == 'paid')): + res.sponsorship_id.sudo().write({ 'state': 'paid' }) + else: + res.sponsorship_id.sudo().write({ 'state': 'wait_pay' }) + res.action_send_whatsapp() + return res + + @api.onchange('payment_method') + def onchange_journal_id(self): + for rec in self: + # Build the dynamic domain + domain = [] + if rec.payment_method == 'cash': + cash_payment = self.env['takaful.payment.method'].search([('payment_method', '=', 'cash')], limit=1) + if cash_payment: + rec.journal_id = cash_payment.journal_id if cash_payment.journal_id else False + domain = [ + ('type','=','cash') + ] + if rec.payment_method == 'check': + domain = [ + '|',('type', '=', 'cash'),('type', '=', 'bank') + ] + return {'domain': {'journal_id': domain}} + + def create_journal_entry(self): + self.ensure_one() + payment_method_journal_id = self.journal_id.id + if not payment_method_journal_id: + raise ValidationError( + _(''' Please set Journal in Payment Details ''')) + Invoice = self.env["account.move"].sudo() + invoice_values = { + 'takaful_sponsorship_id': self.sponsorship_id.id, + 'name': self.env['ir.sequence'].next_by_code('account.move.payment.details.sequence'), + 'move_type': 'entry', + 'journal_id': int(payment_method_journal_id), + 'date': fields.Date.today(), + # 'branch_id': TODO there is no res.branch in takaful.sponsorship model + } + lines_name = _("Bail Receipts Number %s") % self.sponsorship_scheduling_ref + account_receivable_id = self.sponsorship_id.sponsor_id.property_account_receivable_id.id + if self.sponsorship_id.sponsor_or_donor_type != 'registered': + sponsorship_lines = self.sponsorship_scheduling_line_id or self.sponsorship_scheduling_line_ids + account_receivable_id = sponsorship_lines.donation_detail_linked_id.product_template_id.property_account_income_id.id + line_ids = [ + (0, 0, { + 'account_id': self.journal_id.default_account_id.id, + 'name': lines_name, + 'debit': self.donation_amount, + 'credit': 0.0, + }), + (0, 0, { + 'account_id': account_receivable_id, + 'partner_id': self.sponsorship_id.sponsor_id.id, + 'name': lines_name, + 'analytic_account_id': self.branch_custom_id.branch.analytic_account_id.id if self.sponsorship_id.sponsor_or_donor_type != 'registered' else False, + 'debit': 0.0, + 'credit': self.donation_amount, + }), + ] + invoice_values['line_ids'] = line_ids + invoice_id = Invoice.create(invoice_values) + invoice_id.action_post() + + def action_confirm(self): + """ + Logic to confirm the payment details. + """ + # Example logic: Validate the fields and mark them as confirmed + for record in self: + if record.payment_method_id.payment_method in ('direct_debit', 'bank') and not record.bank_id: + raise ValidationError("Bank is required for Direct Debit and Bank Transfer methods.") + + # Close the wizard + return {'type': 'ir.actions.act_window_close'} + + def action_refund(self): + return { + 'type': 'ir.actions.act_window', + 'name': 'Refund Wizard', + 'res_model': 'refund.wiz', + 'view_mode': 'form', + 'target': 'new', + } diff --git a/odex25_takaful/odex_takaful/models/takaful_sponsor_operation.py b/odex25_takaful/odex_takaful/models/takaful_sponsor_operation.py new file mode 100644 index 000000000..431f2e960 --- /dev/null +++ b/odex25_takaful/odex_takaful/models/takaful_sponsor_operation.py @@ -0,0 +1,74 @@ +# -*- coding: utf-8 -*- + +from odoo import models, fields, _ +from dateutil.parser import parse + + +class TakafulSponsorOperation(models.Model): + _name = 'takaful.sponsor.operation' + # _rec_name = 'sponsor_id' + + name = fields.Char(string="Operation Name") + title = fields.Char(string="Operation Title") + sponsor_id = fields.Many2one( + 'res.partner', + string='The Sponsor', + ondelete='set null' + ) + benefit_ids = fields.Many2many( + 'grant.benefit', + string='Beneficiaries' + ) + benefit_id = fields.Many2one( + 'grant.benefit', + string='Beneficiary', + ondelete='set null' + ) + benefit_type = fields.Selection([ + ('orphan', 'Orphans'), + ('widow', 'Widows'), + ('general', 'General')], + string='Beneficiaries Type', + compute='_compute_benefit_type_value', + related=False, + readonly=True, + ) + operation_type = fields.Selection([ + ('sponsorship', 'Sponsorship'), + ('contribution', 'Needs Contribution'), + ('gift', 'Financial Gift')], + string='Operation Type', + ) + date = fields.Date(string="Date", default=fields.Date.today) + operation_on = fields.Datetime(string="Operation Time", default=fields.Datetime.now) + month = fields.Integer(string="The Month", compute='_compute_period_filter') + origin_id = fields.Integer(readonly=True) + period_code = fields.Char(string="Period Code", compute='_compute_period_filter') + amount = fields.Float(string="Amount") + currency_id = fields.Many2one('res.currency', string='Currency', + default=lambda self: self.env.company.currency_id, readonly=True) + + def _compute_period_filter(self): + """ Extract period code from date """ + for rec in self: + if rec.date: + date = parse(str(rec.date)).date() + rec.period_code = date.strftime("%Y_%m") + rec.month = int(date.strftime("%m")) + + def _compute_benefit_type_value(self): + for rec in self: + b_type = [] + if rec.benefit_ids: + for i in rec.benefit_ids: + b_type.append(i.benefit_type) + if rec.benefit_id: + b_type.append(rec.benefit_id.benefit_type) + if 'orphan' in b_type and 'widow' not in b_type: + rec.benefit_type = 'orphan' + if 'widow' in b_type and 'orphan' not in b_type: + rec.benefit_type = 'widow' + if 'widow' in b_type and 'orphan' in b_type: + rec.benefit_type = 'general' + if b_type == []: + rec.benefit_type = '' diff --git a/odex25_takaful/odex_takaful/models/takaful_sponsorship_cancellation_model.py b/odex25_takaful/odex_takaful/models/takaful_sponsorship_cancellation_model.py new file mode 100644 index 000000000..643bb81d0 --- /dev/null +++ b/odex25_takaful/odex_takaful/models/takaful_sponsorship_cancellation_model.py @@ -0,0 +1,110 @@ +# -*- coding: utf-8 -*- +from odoo import models, fields, api, _ +from odoo import SUPERUSER_ID + + +class SponsorshipStopReason(models.Model): + _name = "sponsorship.reason.stop" + _description = "Sponsorship Stop Reason" + _order = 'sequence' + + sequence = fields.Integer(help="Determine the display order", index=True, + string='Sequence') + name = fields.Char(string='Reason', required=True) + +class SponsorshipCancellation(models.Model): + _name = 'sponsorship.cancellation' + _inherit = ['mail.thread', 'mail.activity.mixin'] + _description = "Sponsorship Cancellation" + _rec_name = "code" + + sponsorship_id = fields.Many2one("takaful.sponsorship", string="Sponsorship") + code = fields.Char(string="Sponsorship Number", related="sponsorship_id.code",store=True) + sponsor_id = fields.Many2one(string="The Sponsor", related="sponsorship_id.sponsor_id",store=True) + create_date = fields.Date(string='Create Date', readonly=True, default=fields.Date.today) + confirm_date = fields.Date(string='Confirm Date', readonly=True) + cancel_type = fields.Selection([ + ('user', 'Manually'), + ('sys', 'Automatically'), + ], string='Cancellation Type', default="user", readonly=True) + cancel_user_id = fields.Many2one('res.users', 'Cancelled By', readonly=True) + confirm_user_id = fields.Many2one('res.users', 'Confirmed By', readonly=True) + reason_id = fields.Many2one('sponsorship.reason.stop', string='Cancellation Reason') + note = fields.Text(string='Comment') + + state = fields.Selection([ + ('draft', 'Draft'), + ('cancel', 'Cancelled'), + ], string='state', default="draft") + + + # @api.multi + def do_cancel_action(self): + """Confirm cancellation for Sponsorship""" + for rec in self: + if rec.sponsorship_id: + rec.confirm_user_id = self.env.uid or SUPERUSER_ID + rec.confirm_date = fields.Date.today() + rec.state = "cancel" + + # Send SMS and Email Notifications + canceled_template = self.env['takaful.message.template'].sudo().search( + [('template_name', '=', 'sponsorship_canceled')], limit=1) + + subject = canceled_template.title + message = canceled_template.body + partner_id = rec.sponsor_id + user_id = self.env['res.users'].sudo().search([('partner_id', '=', partner_id.id)], limit=1) + + push = self.env['takaful.push.notification'].sudo().create({ + 'user_id': user_id.id, + 'title': subject, + 'body': message, + }) + + push.sudo().send_sms_notification() + push.sudo().send_email_notification() + + month_count = 0 + residual_amount = 0 + + # Get other open invoices + open_invoices = self.env['account.move'].sudo().search([('state', '=', 'open'), ('operation_id', '=', rec.sponsorship_id.id), ('operation_type', '=', 'sponsorship')]) + for inv in open_invoices: + # Get residual amount + month_count += 1 + residual_amount += inv.residual_company_signed + # Enable Removing for journal_id + if inv.journal_id: + inv.journal_id.sudo().write({"update_posted": True,}) + + inv.sudo().action_cancel() + + rec.sponsorship_id.journal_entry_ids.button_draft() + rec.sponsorship_id.journal_entry_ids.button_cancel() + rec.sponsorship_id.state = "canceled" + rec.sponsorship_id.cancel_reason_id = self.id + + # Moving the arrears + if month_count >0 and rec.sponsorship_id.sponsorship_type =='person': + arrears_id = self.env['sponsorship.benefit.arrears'].sudo().create({ + 'sponsorship_id': rec.sponsorship_id.id, + 'benefit_id': rec.sponsorship_id.benefit_id.id, + 'sponsor_id': rec.sponsorship_id.sponsor_id.id, + 'arrears_month_number': month_count, + 'arrears_total': residual_amount, + }) + elif month_count >0 and rec.sponsorship_id.sponsorship_type =='group': + for ben in rec.sponsorship_id.benefit_ids: + arrears_id = self.env['sponsorship.benefit.arrears'].sudo().create({ + 'sponsorship_id': rec.sponsorship_id.id, + 'benefit_id': ben.id, + 'sponsor_id': rec.sponsorship_id.sponsor_id.id, + 'arrears_month_number': month_count, + 'arrears_total': rec.sponsorship_id.load_amount * month_count, + }) + + + + + diff --git a/odex25_takaful/odex_takaful/models/takaful_sponsorship_payment_model.py b/odex25_takaful/odex_takaful/models/takaful_sponsorship_payment_model.py new file mode 100644 index 000000000..6fe9d1b9c --- /dev/null +++ b/odex25_takaful/odex_takaful/models/takaful_sponsorship_payment_model.py @@ -0,0 +1,217 @@ +# -*- coding: utf-8 -*- +from odoo import models, fields, api, _ +from dateutil.parser import parse +from odoo.exceptions import UserError,ValidationError, Warning + +import logging + +_logger = logging.getLogger(__name__) + + +class SponsorshipPayment(models.Model): + _name = 'sponsorship.payment' + _inherit = ['mail.thread', 'mail.activity.mixin'] + _description = "Payments for Sponsorship system in Takaful project" + _rec_name = 'code' + _order = 'date desc' + + sponsorship_id = fields.Many2one( + 'takaful.sponsorship', + string='Sponsorship' + ) + + sponsor_id = fields.Many2one( + 'res.partner', + string='Sponsor Name' + ) + code = fields.Char(string="Sponsorship Number", related="sponsorship_id.code",store=True) + + payment_month_number = fields.Integer(string="Sponsorships Number To Pay") + month_amount = fields.Float(string="Sponsorship Amount", related="sponsorship_id.contribution_value",store=True, readonly=True) + amount = fields.Float(string="Total Amount", compute="get_amount_month", store=True) + currency_id = fields.Many2one('res.currency', string='Currency', + default=lambda self: self.env.company.currency_id, readonly=True) + iban = fields.Char(string='IBAN / Account Number', tracking=True) + transfer_receipt = fields.Binary(string='Transfer Receipt') + bank_id = fields.Many2one('res.bank', string="Bank Name") + has_bank_account = fields.Boolean(string="Has Another Account?") + payment_method = fields.Char(string='Method Of Payment', store=False) + + user_id = fields.Many2one('res.users',string="Issued By", default=lambda self: self.env.user) + + state = fields.Selection([ + ('draft', 'Draft'), + ('financial', 'Financial'), + ('paid', 'Paid'), + ], string='state', default="draft", tracking=True) + + date = fields.Date('Date', readonly=True,default=fields.Date.today()) + invoice_ids = fields.Many2many('account.move', string="Invoices") + is_invoiced = fields.Boolean(string='Is Invoiced?', compute='check_is_invoiced') + + def check_is_invoiced(self): + for rec in self: + if rec.invoice_ids and rec.state == "financial": + total_paid = 0 + for invoice in rec.invoice_ids: + if invoice.state == 'paid': + payments = self.env['account.payment'].sudo().search([('invoice_ids', 'in', [invoice.id])]) + # if len(payments) > 0: + for payment in payments: + total_paid += payment.amount + + if total_paid >0 and total_paid >= rec.amount: + rec.is_invoiced = True + rec.state = "paid" + else: + rec.is_invoiced = False + + elif rec.invoice_ids and rec.state == "paid": + rec.is_invoiced = True + + else: + rec.is_invoiced = False + + @api.onchange('sponsor_id') + def onchange_sponsor_id(self): + res = {} + sponsorships = self.env['takaful.sponsorship'].sudo().search([('sponsor_id', '=', self.sponsor_id.id)]) + sponsorships_ids = [] + for record in sponsorships: + sponsorships_ids.append(record.id) + + res['domain'] = {'sponsorship_id': [('id', 'in', sponsorships_ids)]} + return res + + @api.onchange('has_bank_account', 'payment_method') + def onchange_bank_account(self): + for rec in self: + if rec.payment_method and rec.payment_method != "cash" and not rec.has_bank_account: + self.bank_id = self.sponsor_id.bank_id.id + self.iban = self.sponsor_id.iban + else: + self.bank_id = None + self.iban = '' + + # @api.constrains('month_amount') + # def check_month_amount(self): + # if int(self.month_amount) <= 0: + # raise ValidationError( + # _(u'Month Amount Is Invalid')) + + @api.constrains('payment_month_number') + def check_payment_month_number(self): + if int(self.month_amount) <= 0: + raise ValidationError( + _(u'Payment Month Number should be at least for one month')) + + @api.depends('month_amount', 'payment_month_number') + def get_amount_month(self): + for rec in self: + rec.amount = rec.month_amount * rec.payment_month_number + + def action_pay(self): + # Check for already sponsored beneficiaries only for sponsorship records + + count = 0 + invoices = [] + if self.sponsorship_id.state in ['confirmed','wait_pay','progress' , 'to_cancel']: + if self.sponsorship_id.next_due_date: + next_date = parse(str(self.sponsorship_id.next_due_date)).date() + while (count < self.payment_month_number): + count +=1 + invoice_id = self.sponsorship_id.sudo().create_next_invoice(next_date) + invoices.append(invoice_id.id) + try: + next_date = next_date.replace(month=(next_date.month +1)) + except Exception as e: + next_date = next_date.replace(year=(next_date.year +1), month=1) + + # Update invoices Ids + for _id in invoices: + self.write({'invoice_ids': [(4, _id)]}) + + self.state = 'financial' + self.sponsorship_id.sudo().donations_details_lines_mechanism_ids.filtered(lambda line: line.benefit_id).write({'state': 'active'}) + self.sponsorship_id.sudo().donations_details_lines_mechanism_ids.filtered(lambda line: not line.benefit_id).write({'state': 'waiting'}) + all_lines = self.sponsorship_id.sudo().donations_details_lines_mechanism_ids + self.sponsorship_id.sudo().donations_details_lines_ids + payment_method_ids = all_lines.mapped('payment_method_id') + invoice_id = self.env['account.move'].search([('takaful_sponsorship_id', '=', self.sponsorship_id.id)], limit=1) + if invoice_id and payment_method_ids and invoice_id.state == 'posted': + receivable_lines = invoice_id.line_ids.filtered( + lambda l: l.account_id.account_type == 'asset_receivable' and not l.reconciled + ) + + if not receivable_lines: + _logger.warning(f"No receivable lines found for invoice {invoice_id.name}") + return + + for payment_method_id in payment_method_ids: + + if not payment_method_id.journal_id: + continue + + lines_with_method = all_lines.filtered(lambda l: l.payment_method_id == payment_method_id) + payment_amount = sum(lines_with_method.mapped('donation_amount')) + + if payment_amount <= 0: + continue + + payment_method_line = self.env['account.payment.method.line'].search([ + ('journal_id', '=', payment_method_id.journal_id.id), + ('payment_type', '=', 'inbound') + ], limit=1) + + if not payment_method_line: + _logger.warning( + f"No inbound payment method found for journal {payment_method_id.journal_id.name}. " + f"Skipping payment creation for payment method {payment_method_id.name}" + ) + continue + + payment_register_vals = { + 'payment_date': fields.Date.today(), + 'amount': payment_amount, + 'journal_id': payment_method_id.journal_id.id, + 'payment_method_line_id': payment_method_line.id, + 'communication': f"{self.sponsorship_id.code} - {payment_method_id.name}", + } + + if payment_method_id.bank_id: + payment_register_vals['partner_bank_id'] = payment_method_id.bank_id.id + + payment_register = self.env['account.payment.register'].with_context( + active_model='account.move', + active_ids=[invoice_id.id] + ).create(payment_register_vals) + + payment_register.action_create_payments() + + + # @api.multi + def open_account_invoice_action(self): + """Open Sponsorship Payments Entries""" + domain = [] + if self.invoice_ids: + domain = [('id', 'in', self.invoice_ids.ids)] + + if self.is_invoiced is True: + self.state ="paid" + + context = dict(self.env.context or {}) + context["create"] = False + context["edit"] = False + flags = {'initial_mode': 'readonly'} # default is 'edit' + return { + 'name': _('Financial'), + 'domain': domain, + 'view_type': 'form', + 'res_model': 'account.move', + 'view_mode': 'tree,form', + 'type': 'ir.actions.act_window', + 'flags': flags, + 'context': context, + } + + + diff --git a/odex25_takaful/odex_takaful/reports/__init__.py b/odex25_takaful/odex_takaful/reports/__init__.py new file mode 100644 index 000000000..1e17cf25d --- /dev/null +++ b/odex25_takaful/odex_takaful/reports/__init__.py @@ -0,0 +1,3 @@ +# -*- coding: utf-8 -*- +from . import takaful_reports +from . import month_payment_report \ No newline at end of file diff --git a/odex25_takaful/odex_takaful/reports/month_payment_report.py b/odex25_takaful/odex_takaful/reports/month_payment_report.py new file mode 100644 index 000000000..2fa9396a5 --- /dev/null +++ b/odex25_takaful/odex_takaful/reports/month_payment_report.py @@ -0,0 +1,177 @@ +# -*- coding: utf-8 -*- + +from odoo import api, fields, models, tools, _ +from odoo.exceptions import ValidationError, UserError + +from datetime import datetime, timedelta, date +from odoo.tools import DEFAULT_SERVER_DATE_FORMAT +from dateutil.parser import parse + +class BenefitREP(models.AbstractModel): + _name = 'report.odex_takaful.benefit_payment_report_pdf' + + def get_result(self, data=None): + form = data + domain = [] + if form['benefit_ids']: + domain += [('benefit_id', 'in', form['benefit_ids'])] + if form['date_from'] and form['date_to']: + domain = [('month_id.date', '>=', form['date_from']), ('month_id.date', '<=', form['date_to'])] + payment = self.env['month.payment.line'].sudo().search(domain) + return payment + + @api.model + def get_report_values(self, docids, data=None): + record = self.get_result(data) + date_to, date_from = '', '' + if data['date_from'] and data['date_to']: + date_from = data['date_from'] + date_to = data['date_to'] + if not record: + raise ValidationError(_("Sorry, there are no results for this selection !")) + return { + 'date_from': date_from, + 'date_to': date_to, + 'docs': record, + } + + +class BenefitMonth(models.AbstractModel): + _name = 'report.odex_takaful.benefit_month_payment_report_pdf' + + def get_result(self, data=None): + form = data + domain = [] + if form['benefit_ids']: + domain += [('benefit_id', 'in', form['benefit_ids'])] + if form['date_from'] and form['date_to']: + domain += [('month_id.date', '>=', form['date_from']), ('month_id.date', '<=', form['date_to'])] + + payment = self.env['month.payment.line'].sudo().search(domain) + month_payment = payment.mapped('month_id') + li = [] + for y in month_payment: + date = parse(str(y.date)) + li.append({'name': y.name , 'code': y.code, 'month_payment': date.strftime("%m-%Y"), 'payment': payment.filtered(lambda r: r.month_id == y)}) + return li + + @api.model + def get_report_values(self, docids, data=None): + record = self.get_result(data) + # if record.get('data'): + # gender = record.get('gender').title() + # record.update({'gender': _(gender)}) + date_to, date_from = '', '' + if data['date_from'] and data['date_to']: + date_from = data['date_from'] + date_to = data['date_to'] + if not record: + raise ValidationError(_("Sorry, there are no results for this selection !")) + return { + 'date_from': date_from, + 'date_to': date_to, + 'docs': record, + } + + +class MonthReportXlsx(models.AbstractModel): + _name = "report.odex_takaful.benefit_month_payment_report_xlsx" + _inherit = 'report.report_xlsx.abstract' + + @api.model + def generate_xlsx_report(self, workbook, data, objs): + docs = objs + sheet = workbook.add_worksheet(_('Bank Sheet')) + if self.env.user.lang != 'en_US': + sheet.right_to_left() + format0 = workbook.add_format( + {'bottom': True, 'bg_color': '#b8bcbf', 'right': True, 'left': True, 'top': True, 'align': 'center', }) + format1 = workbook.add_format({'bottom': True, 'right': True, 'left': True, 'top': True, 'align': 'center', }) + format2 = workbook.add_format( + {'font_size': 14, 'bottom': True, 'right': True, 'left': True, 'top': True, 'align': 'center', + 'bold': True, 'bg_color': '#0f80d6', 'font_color': 'white'}) + for doc in docs: + + format2.set_align('center') + sheet.merge_range('A9:L9', + (_("Month Payment Sheet")) + " - " + doc.name + " / " + doc.code, format2) + sheet.set_column('B:D', 15) + sheet.set_column('E:F', 10) + row = 10 + clm = 0 + labels = [(_("#")), (_("Benefit Name")), (_("Benefit Type")), (_("Benefit ID Number")), (_("Birth Date")), + (_("Sponsorship Number")), (_("The Sponsor")), + (_("Amount")), (_("Iban")), (_("Bank Name")), (_("Responsible Name")), (_("Responsible ID Number"))] + + for res in labels: + sheet.write(row, clm, res, format0) + clm += 1 + row = 11 + seq = 0 + for rec in doc.line_ids: + seq += 1 + clm = 0 + sheet.write(row, clm, seq, format1) + sheet.write(row, clm + 1, rec.benefit_id.name, format1) + sheet.write(row, clm + 2, rec.benefit_id.benefit_type, format1) + sheet.write(row, clm + 3, rec.benefit_id.id_number, format1) + sheet.write(row, clm + 4, rec.benefit_id.birth_date, format1) + sheet.write(row, clm + 5, rec.s_code, format1) + sheet.write(row, clm + 6, rec.sponsor_id.name, format1) + sheet.write(row, clm + 7, rec.amount, format1) + sheet.write(row, clm + 8, rec.benefit_id.iban, format1) + sheet.write(row, clm + 9, rec.benefit_id.bank_id.name, format1) + sheet.write(row, clm + 10, rec.responsible_id.name, format1) + sheet.write(row, clm + 11, rec.responsible_id.id_number, format1) + + row += 1 + row += 3 + + +class BankSheetReportXlsx(models.AbstractModel): + _name = "report.odex_takaful.benefit_month_payment_bank_sheet" + _inherit = 'report.report_xlsx.abstract' + + @api.model + def generate_xlsx_report(self, workbook, data, objs): + docs = objs + sheet = workbook.add_worksheet('Bank Sheet') + if self.env.user.lang != 'en_US': + sheet.right_to_left() + format0 = workbook.add_format( + {'bottom': True, 'bg_color': '#b8bcbf', 'right': True, 'left': True, 'top': True, 'align': 'center', }) + format1 = workbook.add_format({'bottom': True, 'right': True, 'left': True, 'top': True, 'align': 'center', }) + format2 = workbook.add_format( + {'font_size': 14, 'bottom': True, 'right': True, 'left': True, 'top': True, 'align': 'center', + 'bold': True, 'bg_color': '#0f80d6', 'font_color': 'white'}) + for doc in docs: + + format2.set_align('center') + sheet.merge_range('A9:F9', + (_("Bank Sheet")) + " - " + doc.name + " / " + doc.code, format2) + sheet.set_column('B:D', 15) + sheet.set_column('E:F', 10) + row = 9 + clm = 0 + labels = [(_("#")), (_("Bank Name")), (_("Account Number")), (_("Amount")), + (_("Benefit Name")), (_("Benefit ID Number")), (_("Responsible Name")), (_("Responsible ID Number"))] + + for res in labels: + sheet.write(row, clm, res, format0) + clm += 1 + row = 10 + seq = 0 + for rec in doc.line_ids: + seq += 1 + clm = 0 + sheet.write(row, clm, seq, format1) + sheet.write(row, clm + 1, rec.benefit_id.bank_id.name, format1) + sheet.write(row, clm + 2, rec.benefit_id.iban, format1) + sheet.write(row, clm + 3, rec.amount, format1) + sheet.write(row, clm + 4, rec.benefit_id.name, format1) + sheet.write(row, clm + 5, rec.benefit_id.id_number, format1) + sheet.write(row, clm + 6, rec.responsible_id.name, format1) + sheet.write(row, clm + 7, rec.responsible_id.id_number, format1) + + row += 1 + row += 3 diff --git a/odex25_takaful/odex_takaful/reports/month_payment_template.xml b/odex25_takaful/odex_takaful/reports/month_payment_template.xml new file mode 100644 index 000000000..ccbdf7bcb --- /dev/null +++ b/odex25_takaful/odex_takaful/reports/month_payment_template.xml @@ -0,0 +1,369 @@ + +| # | +Benefit Name | +Benefit Type | +Benefit ID Number | +Sponsorship Number | +Month Payment | +Payment Code | +Amount | +Date | +Status | +
|---|---|---|---|---|---|---|---|---|---|
|
+ |
+ + + | +
+
+ |
+
+ + + | ++ + | ++ + | ++ + | ++ + | ++ + | +
+
+ |
+
| # | +Benefit Name | +Benefit Type | +Sponsorship Number | +The Sponsor | +Amount | + +Benefit ID Number | +IBAN | +Bank | +Responsible Name | +Responsible ID Number | +Status | +
|---|---|---|---|---|---|---|---|---|---|---|---|
|
+ |
+ + + + | +
+
+ |
+ + + | ++ + | + ++ + | + ++ + | ++ + + | ++ + + | ++ + | ++ + | +
+
+ |
+
| # | +Benefit Name | +Benefit Type | +Benefit ID Number | +Birth Date | +Sponsorship Number | +The Sponsor | +Amount | +IBAN | +Bank | +Responsible Name | +Responsible ID Number | +Status | +
|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
+ |
+ + + | +
+
+ |
+ + + + | ++ + + | ++ + + | ++ + | + ++ + | ++ + + | ++ + + | ++ + | ++ + | +
+
+ |
+
| Start Date | ++ | Payment Method | ++ |
| End Date | ++ | Branches | ++ |
| Sponsors | ++ | Benefit Members | ++ |
| Sponsor | +Sponsor Mobile | +Sponsorship Creator | +Sponsorship Creator Branch | +Sponsorship Branch | +Beneficiary | +Sponsorship Creation Date | +Sponsorship Number | +Sponsor Bank | +Charity Bank | +Sponsor Account Number | +Payment Method | +Donation Type | +Donation Name | +Direct Debit Start | +Direct Debit End | +Donation Date | +Amount | +Total Amount | +
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| + | + | + | + | + | + | + | + | + | + | + | + | + | + | + | + | + | + + | ++ + | +
Total lines found:
+No sponsorship scheduling lines found for the selected criteria.
++ No extension history found +
++ Extension history will appear here when donations are extended. +
++ No extension history found +
++ Replacement Log will appear here when Benefit donations are replaced. +
++ Create your first Replacement Process +
+| # | +Sponsorship | +Start Date | +End Date | +Sponsorship Type | +Sponsorship Value | +Sponsorship State | +Makfool Name/Makfuleen Names | +Total Payment | +
|---|---|---|---|---|---|---|---|---|
|
+ |
+ + + | ++ + | ++ + | + +
+
+ |
+
+ + + | + +
+
+ |
+
+
+ + + + |
+
+ + + | + +
| Kafalat Overdue Count | +Total Overdues | +
|---|---|
| + + | ++ + | +
| # | +Sponsorship | +Contribution Value | +Sponsorship Duration | +Sponsorship Type | +Benefit Type | +Start Date | +End Date | +Overdue Amount | +Expected Cancel Date | +Status | + +
|---|---|---|---|---|---|---|---|---|---|---|
|
+ |
+
+ + + | + ++ + | + +
+
+ |
+
+
+
+ |
+
+
+
+ |
+
+ + + | + ++ + | + ++ + | + ++ + | + +
+
+ |
+
+
| Canceled Kafalat Count | +From Date | +To Date | +
|---|---|---|
| + + | ++ + | ++ + | +
| # | +Sponsorship | +The Sponsor | +Cancel Date | +Cancel Type | +Cancel Reason | +Notes | +
|---|---|---|---|---|---|---|
|
+ |
+ + + | ++ + | + ++ + | + +
+
+ |
+
+ + + | + ++ + | + +
Create the Sponsorship Cancellation +
+Create the Sponsorship Payment +
++ Create a new Sponsorship Scheduling Line +
++ Track and manage sponsorship payment schedules for beneficiaries. +
++ Create a Sponsorship States +
++ Create a Donation Item +
++ Create a points of sale +
+No Any Financial Contribution! +
+No Due Payments for Beneficiaries +
+No Any Sponsorships Arrears +
+Create a Month Payment +
+Create the Month Payment Line +
+No Notification Messege +
+No Message Template +
+No Any Sponsor Operations +
+").css({position:"fixed",top:0,left:-1*l(y).scrollLeft(),height:1, +width:1,overflow:"hidden"}).append(l("").css({position:"absolute",top:1,left:1,width:100,overflow:"scroll"}).append(l("").css({width:"100%",height:10}))).appendTo("body"),d=c.children(),e=d.children();b.barWidth=d[0].offsetWidth-d[0].clientWidth;b.bScrollOversize=100===e[0].offsetWidth&&100!==d[0].clientWidth;b.bScrollbarLeft=1!==Math.round(e.offset().left);b.bBounding=c[0].getBoundingClientRect().width?!0:!1;c.remove()}l.extend(a.oBrowser,u.__browser);a.oScroll.iBarWidth=u.__browser.barWidth} +function Gb(a,b,c,d,e,h){var f=!1;if(c!==q){var g=c;f=!0}for(;d!==e;)a.hasOwnProperty(d)&&(g=f?b(g,a[d],d,a):a[d],f=!0,d+=h);return g}function cb(a,b){var c=u.defaults.column,d=a.aoColumns.length;c=l.extend({},u.models.oColumn,c,{nTh:b?b:A.createElement("th"),sTitle:c.sTitle?c.sTitle:b?b.innerHTML:"",aDataSort:c.aDataSort?c.aDataSort:[d],mData:c.mData?c.mData:d,idx:d});a.aoColumns.push(c);c=a.aoPreSearchCols;c[d]=l.extend({},u.models.oSearch,c[d]);Ia(a,d,l(b).data())}function Ia(a,b,c){b=a.aoColumns[b]; +var d=a.oClasses,e=l(b.nTh);if(!b.sWidthOrig){b.sWidthOrig=e.attr("width")||null;var h=(e.attr("style")||"").match(/width:\s*(\d+[pxem%]+)/);h&&(b.sWidthOrig=h[1])}c!==q&&null!==c&&(Eb(c),P(u.defaults.column,c,!0),c.mDataProp===q||c.mData||(c.mData=c.mDataProp),c.sType&&(b._sManualType=c.sType),c.className&&!c.sClass&&(c.sClass=c.className),c.sClass&&e.addClass(c.sClass),h=b.sClass,l.extend(b,c),Y(b,c,"sWidth","sWidthOrig"),h!==b.sClass&&(b.sClass=h+" "+b.sClass),c.iDataSort!==q&&(b.aDataSort=[c.iDataSort]), +Y(b,c,"aDataSort"));var f=b.mData,g=ma(f),k=b.mRender?ma(b.mRender):null;c=function(m){return"string"===typeof m&&-1!==m.indexOf("@")};b._bAttrSrc=l.isPlainObject(f)&&(c(f.sort)||c(f.type)||c(f.filter));b._setter=null;b.fnGetData=function(m,n,p){var t=g(m,n,q,p);return k&&n?k(t,n,m,p):t};b.fnSetData=function(m,n,p){return ha(f)(m,n,p)};"number"!==typeof f&&(a._rowReadObject=!0);a.oFeatures.bSort||(b.bSortable=!1,e.addClass(d.sSortableNone));a=-1!==l.inArray("asc",b.asSorting);c=-1!==l.inArray("desc", +b.asSorting);b.bSortable&&(a||c)?a&&!c?(b.sSortingClass=d.sSortableAsc,b.sSortingClassJUI=d.sSortJUIAscAllowed):!a&&c?(b.sSortingClass=d.sSortableDesc,b.sSortingClassJUI=d.sSortJUIDescAllowed):(b.sSortingClass=d.sSortable,b.sSortingClassJUI=d.sSortJUI):(b.sSortingClass=d.sSortableNone,b.sSortingClassJUI="")}function sa(a){if(!1!==a.oFeatures.bAutoWidth){var b=a.aoColumns;db(a);for(var c=0,d=b.length;cm[n])d(g.length+m[n],k);else if("string"===typeof m[n]){var p=0;for(f=g.length;p b&&a[e]--; -1!=d&&c===q&&a.splice(d,1)}function va(a,b,c,d){var e=a.aoData[b],h,f=function(k,m){for(;k.childNodes.length;)k.removeChild(k.firstChild);k.innerHTML=T(a,b,m,"display")};if("dom"!==c&&(c&&"auto"!==c||"dom"!==e.src)){var g=e.anCells;if(g)if(d!==q)f(g[d],d);else for(c=0,h=g.length;c ").appendTo(d));var k=0;for(b=g.length;k=a.fnRecordsDisplay()?0:d,a.iInitDisplayStart=-1);c=F(a,"aoPreDrawCallback","preDraw",[a]);if(-1!==l.inArray(!1,c))V(a,!1);else{c=[];var e=0;d=a.asStripeClasses;var h=d.length,f=a.oLanguage,g="ssp"==Q(a),k=a.aiDisplay,m=a._iDisplayStart,n=a.fnDisplayEnd();a.bDrawing=!0;if(a.bDeferLoading)a.bDeferLoading=!1,a.iDraw++,V(a,!1);else if(!g)a.iDraw++;else if(!a.bDestroying&&!b){Kb(a);return}if(0!==k.length)for(b=g?a.aoData.length:n,f=g?0:m;f",{"class":h?d[0]:""}).append(l(" ",{valign:"top",colSpan:na(a),"class":a.oClasses.sRowEmpty}).html(e))[0];F(a,"aoHeaderCallback","header",[l(a.nTHead).children("tr")[0], +ib(a),m,n,k]);F(a,"aoFooterCallback","footer",[l(a.nTFoot).children("tr")[0],ib(a),m,n,k]);d=l(a.nTBody);d.children().detach();d.append(l(c));F(a,"aoDrawCallback","draw",[a]);a.bSorted=!1;a.bFiltered=!1;a.bDrawing=!1}}function ka(a,b){var c=a.oFeatures,d=c.bFilter;c.bSort&&Lb(a);d?ya(a,a.oPreviousSearch):a.aiDisplay=a.aiDisplayMaster.slice();!0!==b&&(a._iDisplayStart=0);a._drawHold=b;ja(a);a._drawHold=!1}function Mb(a){var b=a.oClasses,c=l(a.nTable);c=l("").insertBefore(c);var d=a.oFeatures, +e=l("",{id:a.sTableId+"_wrapper","class":b.sWrapper+(a.nTFoot?"":" "+b.sNoFooter)});a.nHolding=c[0];a.nTableWrapper=e[0];a.nTableReinsertBefore=a.nTable.nextSibling;for(var h=a.sDom.split(""),f,g,k,m,n,p,t=0;t ")[0];m=h[t+1];if("'"==m||'"'==m){n="";for(p=2;h[t+p]!=m;)n+=h[t+p],p++;"H"==n?n=b.sJUIHeader:"F"==n&&(n=b.sJUIFooter);-1!=n.indexOf(".")?(m=n.split("."),k.id=m[0].substr(1,m[0].length-1),k.className=m[1]):"#"==n.charAt(0)?k.id=n.substr(1, +n.length-1):k.className=n;t+=p}e.append(k);e=l(k)}else if(">"==g)e=e.parent();else if("l"==g&&d.bPaginate&&d.bLengthChange)f=Nb(a);else if("f"==g&&d.bFilter)f=Ob(a);else if("r"==g&&d.bProcessing)f=Pb(a);else if("t"==g)f=Qb(a);else if("i"==g&&d.bInfo)f=Rb(a);else if("p"==g&&d.bPaginate)f=Sb(a);else if(0!==u.ext.feature.length)for(k=u.ext.feature,p=0,m=k.length;p ',g=d.sSearch;g=g.match(/_INPUT_/)?g.replace("_INPUT_",f):g+f;b=l("",{id:h.f?null:c+"_filter","class":b.sFilter}).append(l("").append(g));var k=function(n){var p=this.value?this.value:"";e.return&&"Enter"!==n.key||p==e.sSearch||(ya(a,{sSearch:p,bRegex:e.bRegex,bSmart:e.bSmart,bCaseInsensitive:e.bCaseInsensitive,"return":e.return}), +a._iDisplayStart=0,ja(a))};h=null!==a.searchDelay?a.searchDelay:"ssp"===Q(a)?400:0;var m=l("input",b).val(e.sSearch).attr("placeholder",d.sSearchPlaceholder).on("keyup.DT search.DT input.DT paste.DT cut.DT",h?mb(k,h):k).on("mouseup",function(n){setTimeout(function(){k.call(m[0],n)},10)}).on("keypress.DT",function(n){if(13==n.keyCode)return!1}).attr("aria-controls",c);l(a.nTable).on("search.dt.DT",function(n,p){if(a===p)try{m[0]!==A.activeElement&&m.val(e.sSearch)}catch(t){}});return b[0]}function ya(a, +b,c){var d=a.oPreviousSearch,e=a.aoPreSearchCols,h=function(g){d.sSearch=g.sSearch;d.bRegex=g.bRegex;d.bSmart=g.bSmart;d.bCaseInsensitive=g.bCaseInsensitive;d.return=g.return},f=function(g){return g.bEscapeRegex!==q?!g.bEscapeRegex:g.bRegex};eb(a);if("ssp"!=Q(a)){Vb(a,b.sSearch,c,f(b),b.bSmart,b.bCaseInsensitive,b.return);h(b);for(b=0;b =b.length)a.aiDisplay= +g.slice();else{if(k||c||d||f.length>b.length||0!==b.indexOf(f)||a.bSorted)a.aiDisplay=g.slice();b=a.aiDisplay;for(c=0;c ",{"class":a.oClasses.sInfo,id:c?null:b+"_info"});c||(a.aoDrawCallback.push({fn:ac,sName:"information"}),d.attr("role","status").attr("aria-live","polite"),l(a.nTable).attr("aria-describedby",b+"_info"));return d[0]}function ac(a){var b=a.aanFeatures.i;if(0!==b.length){var c=a.oLanguage,d=a._iDisplayStart+1,e=a.fnDisplayEnd(),h=a.fnRecordsTotal(), +f=a.fnRecordsDisplay(),g=f?c.sInfo:c.sInfoEmpty;f!==h&&(g+=" "+c.sInfoFiltered);g+=c.sInfoPostFix;g=bc(a,g);c=c.fnInfoCallback;null!==c&&(g=c.call(a.oInstance,a,d,e,h,f,g));l(b).html(g)}}function bc(a,b){var c=a.fnFormatNumber,d=a._iDisplayStart+1,e=a._iDisplayLength,h=a.fnRecordsDisplay(),f=-1===e;return b.replace(/_START_/g,c.call(a,d)).replace(/_END_/g,c.call(a,a.fnDisplayEnd())).replace(/_MAX_/g,c.call(a,a.fnRecordsTotal())).replace(/_TOTAL_/g,c.call(a,h)).replace(/_PAGE_/g,c.call(a,f?1:Math.ceil(d/ +e))).replace(/_PAGES_/g,c.call(a,f?1:Math.ceil(h/e)))}function Aa(a){var b=a.iInitDisplayStart,c=a.aoColumns;var d=a.oFeatures;var e=a.bDeferLoading;if(a.bInitialised){Mb(a);Jb(a);xa(a,a.aoHeader);xa(a,a.aoFooter);V(a,!0);d.bAutoWidth&&db(a);var h=0;for(d=c.length;h ",{name:c+"_length","aria-controls":c,"class":b.sLengthSelect});for(var f=0,g=h.length;f ").addClass(b.sLength);a.aanFeatures.l||(k[0].id=c+"_length");k.children().append(a.oLanguage.sLengthMenu.replace("_MENU_",e[0].outerHTML));l("select",k).val(a._iDisplayLength).on("change.DT",function(m){pb(a,l(this).val());ja(a)});l(a.nTable).on("length.dt.DT",function(m,n,p){a===n&&l("select",k).val(p)});return k[0]}function Sb(a){var b=a.sPaginationType,c=u.ext.pager[b],d="function"===typeof c,e=function(f){ja(f)};b=l("").addClass(a.oClasses.sPaging+ +b)[0];var h=a.aanFeatures;d||c.fnInit(a,b,e);h.p||(b.id=a.sTableId+"_paginate",a.aoDrawCallback.push({fn:function(f){if(d){var g=f._iDisplayStart,k=f._iDisplayLength,m=f.fnRecordsDisplay(),n=-1===k;g=n?0:Math.ceil(g/k);k=n?1:Math.ceil(m/k);m=c(g,k);var p;n=0;for(p=h.p.length;n h&&(d=0)):"first"==b?d=0:"previous"==b?(d=0<=e?d-e:0,0>d&&(d=0)):"next"==b?d+e
",{id:a.aanFeatures.r?null:a.sTableId+"_processing","class":a.oClasses.sProcessing}).html(a.oLanguage.sProcessing).append(" ").insertBefore(a.nTable)[0]}function V(a, +b){a.oFeatures.bProcessing&&l(a.aanFeatures.r).css("display",b?"block":"none");F(a,null,"processing",[a,b])}function Qb(a){var b=l(a.nTable),c=a.oScroll;if(""===c.sX&&""===c.sY)return a.nTable;var d=c.sX,e=c.sY,h=a.oClasses,f=b.children("caption"),g=f.length?f[0]._captionSide:null,k=l(b[0].cloneNode(!1)),m=l(b[0].cloneNode(!1)),n=b.children("tfoot");n.length||(n=null);k=l("",{"class":h.sScrollWrapper}).append(l("",{"class":h.sScrollHead}).css({overflow:"hidden",position:"relative",border:0, +width:d?d?K(d):null:"100%"}).append(l("",{"class":h.sScrollHeadInner}).css({"box-sizing":"content-box",width:c.sXInner||"100%"}).append(k.removeAttr("id").css("margin-left",0).append("top"===g?f:null).append(b.children("thead"))))).append(l("",{"class":h.sScrollBody}).css({position:"relative",overflow:"auto",width:d?K(d):null}).append(b));n&&k.append(l("",{"class":h.sScrollFoot}).css({overflow:"hidden",border:0,width:d?d?K(d):null:"100%"}).append(l("",{"class":h.sScrollFootInner}).append(m.removeAttr("id").css("margin-left", +0).append("bottom"===g?f:null).append(b.children("tfoot")))));b=k.children();var p=b[0];h=b[1];var t=n?b[2]:null;if(d)l(h).on("scroll.DT",function(v){v=this.scrollLeft;p.scrollLeft=v;n&&(t.scrollLeft=v)});l(h).css("max-height",e);c.bCollapse||l(h).css("height",e);a.nScrollHead=p;a.nScrollBody=h;a.nScrollFoot=t;a.aoDrawCallback.push({fn:Ja,sName:"scrolling"});return k[0]}function Ja(a){var b=a.oScroll,c=b.sX,d=b.sXInner,e=b.sY;b=b.iBarWidth;var h=l(a.nScrollHead),f=h[0].style,g=h.children("div"),k= +g[0].style,m=g.children("table");g=a.nScrollBody;var n=l(g),p=g.style,t=l(a.nScrollFoot).children("div"),v=t.children("table"),x=l(a.nTHead),w=l(a.nTable),r=w[0],C=r.style,G=a.nTFoot?l(a.nTFoot):null,ba=a.oBrowser,L=ba.bScrollOversize;U(a.aoColumns,"nTh");var O=[],I=[],H=[],fa=[],Z,Ba=function(D){D=D.style;D.paddingTop="0";D.paddingBottom="0";D.borderTopWidth="0";D.borderBottomWidth="0";D.height=0};var X=g.scrollHeight>g.clientHeight;if(a.scrollBarVis!==X&&a.scrollBarVis!==q)a.scrollBarVis=X,sa(a); +else{a.scrollBarVis=X;w.children("thead, tfoot").remove();if(G){X=G.clone().prependTo(w);var ca=G.find("tr");var Ca=X.find("tr");X.find("[id]").removeAttr("id")}var Ua=x.clone().prependTo(w);x=x.find("tr");X=Ua.find("tr");Ua.find("th, td").removeAttr("tabindex");Ua.find("[id]").removeAttr("id");c||(p.width="100%",h[0].style.width="100%");l.each(Pa(a,Ua),function(D,W){Z=ta(a,D);W.style.width=a.aoColumns[Z].sWidth});G&&da(function(D){D.style.width=""},Ca);h=w.outerWidth();""===c?(C.width="100%",L&& +(w.find("tbody").height()>g.offsetHeight||"scroll"==n.css("overflow-y"))&&(C.width=K(w.outerWidth()-b)),h=w.outerWidth()):""!==d&&(C.width=K(d),h=w.outerWidth());da(Ba,X);da(function(D){var W=y.getComputedStyle?y.getComputedStyle(D).width:K(l(D).width());H.push(D.innerHTML);O.push(W)},X);da(function(D,W){D.style.width=O[W]},x);l(X).css("height",0);G&&(da(Ba,Ca),da(function(D){fa.push(D.innerHTML);I.push(K(l(D).css("width")))},Ca),da(function(D,W){D.style.width=I[W]},ca),l(Ca).height(0));da(function(D, +W){D.innerHTML=''+H[W]+"";D.childNodes[0].style.height="0";D.childNodes[0].style.overflow="hidden";D.style.width=O[W]},X);G&&da(function(D,W){D.innerHTML=''+fa[W]+"";D.childNodes[0].style.height="0";D.childNodes[0].style.overflow="hidden";D.style.width=I[W]},Ca);Math.round(w.outerWidth())g.offsetHeight||"scroll"==n.css("overflow-y")?h+b:h,L&&(g.scrollHeight>g.offsetHeight||"scroll"==n.css("overflow-y"))&& +(C.width=K(ca-b)),""!==c&&""===d||ea(a,1,"Possible column misalignment",6)):ca="100%";p.width=K(ca);f.width=K(ca);G&&(a.nScrollFoot.style.width=K(ca));!e&&L&&(p.height=K(r.offsetHeight+b));c=w.outerWidth();m[0].style.width=K(c);k.width=K(c);d=w.height()>g.clientHeight||"scroll"==n.css("overflow-y");e="padding"+(ba.bScrollbarLeft?"Left":"Right");k[e]=d?b+"px":"0px";G&&(v[0].style.width=K(c),t[0].style.width=K(c),t[0].style[e]=d?b+"px":"0px");w.children("colgroup").insertBefore(w.children("thead")); +n.trigger("scroll");!a.bSorted&&!a.bFiltered||a._drawHold||(g.scrollTop=0)}}function da(a,b,c){for(var d=0,e=0,h=b.length,f,g;e ").appendTo(g.find("tbody"));g.find("thead, tfoot").remove();g.append(l(a.nTHead).clone()).append(l(a.nTFoot).clone());g.find("tfoot th, tfoot td").css("width","");m=Pa(a,g.find("thead")[0]); +for(v=0;v ").css({width:w.sWidthOrig,margin:0,padding:0,border:0,height:1}));if(a.aoData.length)for(v=0;v ").css(h||e?{position:"absolute",top:0,left:0,height:1,right:0,overflow:"hidden"}:{}).append(g).appendTo(p);h&&f?g.width(f):h? +(g.css("width","auto"),g.removeAttr("width"),g.width() ").css("width",K(a)).appendTo(b||A.body);b=a[0].offsetWidth;a.remove();return b}function dc(a,b){var c=ec(a,b);if(0>c)return null;var d=a.aoData[c];return d.nTr?d.anCells[b]:l(" ").html(T(a,c,b,"display"))[0]}function ec(a,b){for(var c,d=-1,e=-1,h=0,f=a.aoData.length;h d&&(d=c.length,e=h);return e}function K(a){return null===a?"0px":"number"==typeof a?0>a?"0px":a+"px":a.match(/\d$/)?a+"px":a}function oa(a){var b= +[],c=a.aoColumns;var d=a.aaSortingFixed;var e=l.isPlainObject(d);var h=[];var f=function(n){n.length&&!Array.isArray(n[0])?h.push(n):l.merge(h,n)};Array.isArray(d)&&f(d);e&&d.pre&&f(d.pre);f(a.aaSorting);e&&d.post&&f(d.post);for(a=0;a G?1:0;if(0!==C)return"asc"===r.dir?C:-C}C=c[n];G=c[p];return C G?1:0}):f.sort(function(n,p){var t,v=g.length, +x=e[n]._aSortData,w=e[p]._aSortData;for(t=0;t G?1:0})}a.bSorted=!0}function gc(a){var b=a.aoColumns,c=oa(a);a=a.oLanguage.oAria;for(var d=0,e=b.length;d /g,"");var k=h.nTh;k.removeAttribute("aria-sort");h.bSortable&&(0 e?e+1:3))}e=0;for(h=d.length;e e?e+1:3))}a.aLastSort=d}function fc(a,b){var c=a.aoColumns[b],d=u.ext.order[c.sSortDataType],e;d&&(e=d.call(a.oInstance,a,b,ua(a,b)));for(var h,f=u.ext.type.order[c.sType+"-pre"],g=0,k=a.aoData.length;g =e.length?[0,m[1]]:m)}));b.search!==q&&l.extend(a.oPreviousSearch,$b(b.search));if(b.columns){f=0;for(d=b.columns.length;f =c&&(b=c-d);b-=b%d;if(-1===d||0>b)b=0;a._iDisplayStart=b}function lb(a,b){a=a.renderer;var c=u.ext.renderer[b]; +return l.isPlainObject(a)&&a[b]?c[a[b]]||c._:"string"===typeof a?c[a]||c._:c._}function Q(a){return a.oFeatures.bServerSide?"ssp":a.ajax||a.sAjaxSource?"ajax":"dom"}function Ea(a,b){var c=ic.numbers_length,d=Math.floor(c/2);b<=c?a=pa(0,b):a<=d?(a=pa(0,c-2),a.push("ellipsis"),a.push(b-1)):(a>=b-1-d?a=pa(b-(c-2),b):(a=pa(a-d+2,a+d-1),a.push("ellipsis"),a.push(b-1)),a.splice(0,0,"ellipsis"),a.splice(0,0,0));a.DT_el="span";return a}function bb(a){l.each({num:function(b){return Xa(b,a)},"num-fmt":function(b){return Xa(b, +a,vb)},"html-num":function(b){return Xa(b,a,Ya)},"html-num-fmt":function(b){return Xa(b,a,Ya,vb)}},function(b,c){M.type.order[b+a+"-pre"]=c;b.match(/^html\-/)&&(M.type.search[b+a]=M.type.search.html)})}function jc(a,b,c,d,e){return y.moment?a[b](e):y.luxon?a[c](e):d?a[d](e):a}function Za(a,b,c){if(y.moment){var d=y.moment.utc(a,b,c,!0);if(!d.isValid())return null}else if(y.luxon){d=b?y.luxon.DateTime.fromFormat(a,b):y.luxon.DateTime.fromISO(a);if(!d.isValid)return null;d.setLocale(c)}else b?(kc|| +alert("DataTables warning: Formatted date without Moment.js or Luxon - https://datatables.net/tn/17"),kc=!0):d=new Date(a);return d}function wb(a){return function(b,c,d,e){0===arguments.length?(d="en",b=c=null):1===arguments.length?(d="en",c=b,b=null):2===arguments.length&&(d=c,c=b,b=null);var h="datetime-"+c;u.ext.type.order[h]||(u.ext.type.detect.unshift(function(f){return f===h?h:!1}),u.ext.type.order[h+"-asc"]=function(f,g){f=f.valueOf();g=g.valueOf();return f===g?0:f g?-1:1});return function(f,g){if(null===f||f===q)"--now"===e?(f=new Date,f=new Date(Date.UTC(f.getFullYear(),f.getMonth(),f.getDate(),f.getHours(),f.getMinutes(),f.getSeconds()))):f="";if("type"===g)return h;if(""===f)return"sort"!==g?"":Za("0000-01-01 00:00:00",null,d);if(null!==c&&b===c&&"sort"!==g&&"type"!==g&&!(f instanceof Date))return f;var k=Za(f,b,d);if(null===k)return f;if("sort"===g)return k;f=null===c?jc(k,"toDate","toJSDate", +"")[a]():jc(k,"format","toFormat","toISOString",c);return"display"===g?$a(f):f}}}function lc(a){return function(){var b=[Wa(this[u.ext.iApiIndex])].concat(Array.prototype.slice.call(arguments));return u.ext.internal[a].apply(this,b)}}var u=function(a,b){if(this instanceof u)return l(a).DataTable(b);b=a;this.$=function(f,g){return this.api(!0).$(f,g)};this._=function(f,g){return this.api(!0).rows(f,g).data()};this.api=function(f){return f?new B(Wa(this[M.iApiIndex])):new B(this)};this.fnAddData=function(f, +g){var k=this.api(!0);f=Array.isArray(f)&&(Array.isArray(f[0])||l.isPlainObject(f[0]))?k.rows.add(f):k.row.add(f);(g===q||g)&&k.draw();return f.flatten().toArray()};this.fnAdjustColumnSizing=function(f){var g=this.api(!0).columns.adjust(),k=g.settings()[0],m=k.oScroll;f===q||f?g.draw(!1):(""!==m.sX||""!==m.sY)&&Ja(k)};this.fnClearTable=function(f){var g=this.api(!0).clear();(f===q||f)&&g.draw()};this.fnClose=function(f){this.api(!0).row(f).child.hide()};this.fnDeleteRow=function(f,g,k){var m=this.api(!0); +f=m.rows(f);var n=f.settings()[0],p=n.aoData[f[0][0]];f.remove();g&&g.call(this,n,p);(k===q||k)&&m.draw();return p};this.fnDestroy=function(f){this.api(!0).destroy(f)};this.fnDraw=function(f){this.api(!0).draw(f)};this.fnFilter=function(f,g,k,m,n,p){n=this.api(!0);null===g||g===q?n.search(f,k,m,p):n.column(g).search(f,k,m,p);n.draw()};this.fnGetData=function(f,g){var k=this.api(!0);if(f!==q){var m=f.nodeName?f.nodeName.toLowerCase():"";return g!==q||"td"==m||"th"==m?k.cell(f,g).data():k.row(f).data()|| +null}return k.data().toArray()};this.fnGetNodes=function(f){var g=this.api(!0);return f!==q?g.row(f).node():g.rows().nodes().flatten().toArray()};this.fnGetPosition=function(f){var g=this.api(!0),k=f.nodeName.toUpperCase();return"TR"==k?g.row(f).index():"TD"==k||"TH"==k?(f=g.cell(f).index(),[f.row,f.columnVisible,f.column]):null};this.fnIsOpen=function(f){return this.api(!0).row(f).child.isShown()};this.fnOpen=function(f,g,k){return this.api(!0).row(f).child(g,k).show().child()[0]};this.fnPageChange= +function(f,g){f=this.api(!0).page(f);(g===q||g)&&f.draw(!1)};this.fnSetColumnVis=function(f,g,k){f=this.api(!0).column(f).visible(g);(k===q||k)&&f.columns.adjust().draw()};this.fnSettings=function(){return Wa(this[M.iApiIndex])};this.fnSort=function(f){this.api(!0).order(f).draw()};this.fnSortListener=function(f,g,k){this.api(!0).order.listener(f,g,k)};this.fnUpdate=function(f,g,k,m,n){var p=this.api(!0);k===q||null===k?p.row(g).data(f):p.cell(g,k).data(f);(n===q||n)&&p.columns.adjust();(m===q||m)&& +p.draw();return 0};this.fnVersionCheck=M.fnVersionCheck;var c=this,d=b===q,e=this.length;d&&(b={});this.oApi=this.internal=M.internal;for(var h in u.ext.internal)h&&(this[h]=lc(h));this.each(function(){var f={},g=1 /g,">").replace(/"/g, +"""):a},kc=!1,zc=",",Ac=".";if(Intl)try{for(var Ha=(new Intl.NumberFormat).formatToParts(100000.1),ra=0;ra").appendTo(t));r.nTHead=H[0];var fa=t.children("tbody");0===fa.length&&(fa=l("").insertAfter(H));r.nTBody=fa[0];H=t.children("tfoot");0===H.length&&0 ").appendTo(t));0===H.length||0===H.children().length?t.addClass(C.sNoFooter):0 /g,Dc=/^\d{2,4}[\.\/\-]\d{1,2}[\.\/\-]\d{1,2}([T ]{1}\d{1,2}[:\.]\d{2}([\.:]\d{2})?)?$/,Ec=/(\/|\.|\*|\+|\?|\||\(|\)|\[|\]|\{|\}|\\|\$|\^|\-)/g,vb=/['\u00A0,$£€¥%\u2009\u202F\u20BD\u20a9\u20BArfkɃΞ]/gi,aa=function(a){return a&&!0!==a&&"-"!== +a?!1:!0},nc=function(a){var b=parseInt(a,10);return!isNaN(b)&&isFinite(a)?b:null},oc=function(a,b){xb[b]||(xb[b]=new RegExp(ob(b),"g"));return"string"===typeof a&&"."!==b?a.replace(/\./g,"").replace(xb[b],"."):a},yb=function(a,b,c){var d="string"===typeof a;if(aa(a))return!0;b&&d&&(a=oc(a,b));c&&d&&(a=a.replace(vb,""));return!isNaN(parseFloat(a))&&isFinite(a)},pc=function(a,b,c){return aa(a)?!0:aa(a)||"string"===typeof a?yb(a.replace(Ya,""),b,c)?!0:null:null},U=function(a,b,c){var d=[],e=0,h=a.length; +if(c!==q)for(;e a.length)){var b=a.slice().sort();for(var c=b[0], +d=1,e=b.length;d ")[0],Bc=Sa.textContent!==q,Cc=/<.*?>/g,mb=u.util.throttle,tc=[],N=Array.prototype,Fc=function(a){var b,c=u.settings,d=l.map(c,function(h,f){return h.nTable});if(a){if(a.nTable&&a.oApi)return[a];if(a.nodeName&&"table"===a.nodeName.toLowerCase()){var e= +l.inArray(a,d);return-1!==e?[c[e]]:null}if(a&&"function"===typeof a.settings)return a.settings().toArray();"string"===typeof a?b=l(a):a instanceof l&&(b=a)}else return[];if(b)return b.map(function(h){e=l.inArray(this,d);return-1!==e?c[e]:null}).toArray()};var B=function(a,b){if(!(this instanceof B))return new B(a,b);var c=[],d=function(f){(f=Fc(f))&&c.push.apply(c,f)};if(Array.isArray(a))for(var e=0,h=a.length;e a?new B(b[a],this[a]):null},filter:function(a){var b=[];if(N.filter)b=N.filter.call(this,a,this);else for(var c=0,d=this.length;c ").addClass(g),l("td",k).addClass(g).html(f)[0].colSpan=na(a),e.push(k[0]))};h(c,d);b._details&&b._details.detach();b._details=l(e);b._detailsShow&&b._details.insertAfter(b.nTr)},wc=u.util.throttle(function(a){Da(a[0])}, +500),Cb=function(a,b){var c=a.context;c.length&&(a=c[0].aoData[b!==q?b:a[0]])&&a._details&&(a._details.remove(),a._detailsShow=q,a._details=q,l(a.nTr).removeClass("dt-hasChild"),wc(c))},xc=function(a,b){var c=a.context;if(c.length&&a.length){var d=c[0].aoData[a[0]];d._details&&((d._detailsShow=b)?(d._details.insertAfter(d.nTr),l(d.nTr).addClass("dt-hasChild")):(d._details.detach(),l(d.nTr).removeClass("dt-hasChild")),F(c[0],null,"childRow",[b,a.row(a[0])]),Ic(c[0]),wc(c))}},Ic=function(a){var b=new B(a), +c=a.aoData;b.off("draw.dt.DT_details column-sizing.dt.DT_details destroy.dt.DT_details");0g){var n=l.map(d,function(p,t){return p.bVisible?t:null});return[n[n.length+g]]}return[ta(a,g)];case "name":return l.map(e,function(p,t){return p===m[1]?t:null});default:return[]}if(f.nodeName&&f._DT_CellIndex)return[f._DT_CellIndex.column];g=l(h).filter(f).map(function(){return l.inArray(this,h)}).toArray();if(g.length||!f.nodeName)return g; +g=l(f).closest("*[data-dt-column]");return g.length?[g.data("dt-column")]:[]},a,c)};z("columns()",function(a,b){a===q?a="":l.isPlainObject(a)&&(b=a,a="");b=Ab(b);var c=this.iterator("table",function(d){return Kc(d,a,b)},1);c.selector.cols=a;c.selector.opts=b;return c});J("columns().header()","column().header()",function(a,b){return this.iterator("column",function(c,d){return c.aoColumns[d].nTh},1)});J("columns().footer()","column().footer()",function(a,b){return this.iterator("column",function(c, +d){return c.aoColumns[d].nTf},1)});J("columns().data()","column().data()",function(){return this.iterator("column-rows",yc,1)});J("columns().dataSrc()","column().dataSrc()",function(){return this.iterator("column",function(a,b){return a.aoColumns[b].mData},1)});J("columns().cache()","column().cache()",function(a){return this.iterator("column-rows",function(b,c,d,e,h){return Fa(b.aoData,h,"search"===a?"_aFilterData":"_aSortData",c)},1)});J("columns().nodes()","column().nodes()",function(){return this.iterator("column-rows", +function(a,b,c,d,e){return Fa(a.aoData,e,"anCells",b)},1)});J("columns().visible()","column().visible()",function(a,b){var c=this,d=this.iterator("column",function(e,h){if(a===q)return e.aoColumns[h].bVisible;var f=e.aoColumns,g=f[h],k=e.aoData,m;if(a!==q&&g.bVisible!==a){if(a){var n=l.inArray(!0,U(f,"bVisible"),h+1);f=0;for(m=k.length;f d;return!0};u.isDataTable=u.fnIsDataTable=function(a){var b=l(a).get(0),c=!1;if(a instanceof u.Api)return!0;l.each(u.settings,function(d,e){d=e.nScrollHead?l("table",e.nScrollHead)[0]:null;var h=e.nScrollFoot? +l("table",e.nScrollFoot)[0]:null;if(e.nTable===b||d===b||h===b)c=!0});return c};u.tables=u.fnTables=function(a){var b=!1;l.isPlainObject(a)&&(b=a.api,a=a.visible);var c=l.map(u.settings,function(d){if(!a||a&&l(d.nTable).is(":visible"))return d.nTable});return b?new B(c):c};u.camelToHungarian=P;z("$()",function(a,b){b=this.rows(b).nodes();b=l(b);return l([].concat(b.filter(a).toArray(),b.find(a).toArray()))});l.each(["on","one","off"],function(a,b){z(b+"()",function(){var c=Array.prototype.slice.call(arguments); +c[0]=l.map(c[0].split(/\s/),function(e){return e.match(/\.dt\b/)?e:e+".dt"}).join(" ");var d=l(this.tables().nodes());d[b].apply(d,c);return this})});z("clear()",function(){return this.iterator("table",function(a){Ma(a)})});z("settings()",function(){return new B(this.context,this.context)});z("init()",function(){var a=this.context;return a.length?a[0].oInit:null});z("data()",function(){return this.iterator("table",function(a){return U(a.aoData,"_aData")}).flatten()});z("destroy()",function(a){a=a|| +!1;return this.iterator("table",function(b){var c=b.oClasses,d=b.nTable,e=b.nTBody,h=b.nTHead,f=b.nTFoot,g=l(d);e=l(e);var k=l(b.nTableWrapper),m=l.map(b.aoData,function(p){return p.nTr}),n;b.bDestroying=!0;F(b,"aoDestroyCallback","destroy",[b]);a||(new B(b)).columns().visible(!0);k.off(".DT").find(":not(tbody *)").off(".DT");l(y).off(".DT-"+b.sInstance);d!=h.parentNode&&(g.children("thead").detach(),g.append(h));f&&d!=f.parentNode&&(g.children("tfoot").detach(),g.append(f));b.aaSorting=[];b.aaSortingFixed= +[];Va(b);l(m).removeClass(b.asStripeClasses.join(" "));l("th, td",h).removeClass(c.sSortable+" "+c.sSortableAsc+" "+c.sSortableDesc+" "+c.sSortableNone);e.children().detach();e.append(m);h=b.nTableWrapper.parentNode;f=a?"remove":"detach";g[f]();k[f]();!a&&h&&(h.insertBefore(d,b.nTableReinsertBefore),g.css("width",b.sDestroyWidth).removeClass(c.sTable),(n=b.asDestroyStripes.length)&&e.children().each(function(p){l(this).addClass(b.asDestroyStripes[p%n])}));c=l.inArray(b,u.settings);-1!==c&&u.settings.splice(c, +1)})});l.each(["column","row","cell"],function(a,b){z(b+"s().every()",function(c){var d=this.selector.opts,e=this;return this.iterator(b,function(h,f,g,k,m){c.call(e[b](f,"cell"===b?g:d,"cell"===b?d:q),f,g,k,m)})})});z("i18n()",function(a,b,c){var d=this.context[0];a=ma(a)(d.oLanguage);a===q&&(a=b);c!==q&&l.isPlainObject(a)&&(a=a[c]!==q?a[c]:a._);return a.replace("%d",c)});u.version="1.12.1";u.settings=[];u.models={};u.models.oSearch={bCaseInsensitive:!0,sSearch:"",bRegex:!1,bSmart:!0,"return":!1}; +u.models.oRow={nTr:null,anCells:null,_aData:[],_aSortData:null,_aFilterData:null,_sFilterRow:null,_sRowStripe:"",src:null,idx:-1};u.models.oColumn={idx:null,aDataSort:null,asSorting:null,bSearchable:null,bSortable:null,bVisible:null,_sManualType:null,_bAttrSrc:!1,fnCreatedCell:null,fnGetData:null,fnSetData:null,mData:null,mRender:null,nTh:null,nTf:null,sClass:null,sContentPadding:null,sDefaultContent:null,sName:null,sSortDataType:"std",sSortingClass:null,sSortingClassJUI:null,sTitle:null,sType:null, +sWidth:null,sWidthOrig:null};u.defaults={aaData:null,aaSorting:[[0,"asc"]],aaSortingFixed:[],ajax:null,aLengthMenu:[10,25,50,100],aoColumns:null,aoColumnDefs:null,aoSearchCols:[],asStripeClasses:null,bAutoWidth:!0,bDeferRender:!1,bDestroy:!1,bFilter:!0,bInfo:!0,bLengthChange:!0,bPaginate:!0,bProcessing:!1,bRetrieve:!1,bScrollCollapse:!1,bServerSide:!1,bSort:!0,bSortMulti:!0,bSortCellsTop:!1,bSortClasses:!0,bStateSave:!1,fnCreatedRow:null,fnDrawCallback:null,fnFooterCallback:null,fnFormatNumber:function(a){return a.toString().replace(/\B(?=(\d{3})+(?!\d))/g, +this.oLanguage.sThousands)},fnHeaderCallback:null,fnInfoCallback:null,fnInitComplete:null,fnPreDrawCallback:null,fnRowCallback:null,fnServerData:null,fnServerParams:null,fnStateLoadCallback:function(a){try{return JSON.parse((-1===a.iStateDuration?sessionStorage:localStorage).getItem("DataTables_"+a.sInstance+"_"+location.pathname))}catch(b){return{}}},fnStateLoadParams:null,fnStateLoaded:null,fnStateSaveCallback:function(a,b){try{(-1===a.iStateDuration?sessionStorage:localStorage).setItem("DataTables_"+ +a.sInstance+"_"+location.pathname,JSON.stringify(b))}catch(c){}},fnStateSaveParams:null,iStateDuration:7200,iDeferLoading:null,iDisplayLength:10,iDisplayStart:0,iTabIndex:0,oClasses:{},oLanguage:{oAria:{sSortAscending:": activate to sort column ascending",sSortDescending:": activate to sort column descending"},oPaginate:{sFirst:"First",sLast:"Last",sNext:"Next",sPrevious:"Previous"},sEmptyTable:"No data available in table",sInfo:"Showing _START_ to _END_ of _TOTAL_ entries",sInfoEmpty:"Showing 0 to 0 of 0 entries", +sInfoFiltered:"(filtered from _MAX_ total entries)",sInfoPostFix:"",sDecimal:"",sThousands:",",sLengthMenu:"Show _MENU_ entries",sLoadingRecords:"Loading...",sProcessing:"",sSearch:"Search:",sSearchPlaceholder:"",sUrl:"",sZeroRecords:"No matching records found"},oSearch:l.extend({},u.models.oSearch),sAjaxDataProp:"data",sAjaxSource:null,sDom:"lfrtip",searchDelay:null,sPaginationType:"simple_numbers",sScrollX:"",sScrollXInner:"",sScrollY:"",sServerMethod:"GET",renderer:null,rowId:"DT_RowId"};E(u.defaults); +u.defaults.column={aDataSort:null,iDataSort:-1,asSorting:["asc","desc"],bSearchable:!0,bSortable:!0,bVisible:!0,fnCreatedCell:null,mData:null,mRender:null,sCellType:"td",sClass:"",sContentPadding:"",sDefaultContent:null,sName:"",sSortDataType:"std",sTitle:null,sType:null,sWidth:null};E(u.defaults.column);u.models.oSettings={oFeatures:{bAutoWidth:null,bDeferRender:null,bFilter:null,bInfo:null,bLengthChange:null,bPaginate:null,bProcessing:null,bServerSide:null,bSort:null,bSortMulti:null,bSortClasses:null, +bStateSave:null},oScroll:{bCollapse:null,iBarWidth:0,sX:null,sXInner:null,sY:null},oLanguage:{fnInfoCallback:null},oBrowser:{bScrollOversize:!1,bScrollbarLeft:!1,bBounding:!1,barWidth:0},ajax:null,aanFeatures:[],aoData:[],aiDisplay:[],aiDisplayMaster:[],aIds:{},aoColumns:[],aoHeader:[],aoFooter:[],oPreviousSearch:{},aoPreSearchCols:[],aaSorting:null,aaSortingFixed:[],asStripeClasses:null,asDestroyStripes:[],sDestroyWidth:0,aoRowCallback:[],aoHeaderCallback:[],aoFooterCallback:[],aoDrawCallback:[], +aoRowCreatedCallback:[],aoPreDrawCallback:[],aoInitComplete:[],aoStateSaveParams:[],aoStateLoadParams:[],aoStateLoaded:[],sTableId:"",nTable:null,nTHead:null,nTFoot:null,nTBody:null,nTableWrapper:null,bDeferLoading:!1,bInitialised:!1,aoOpenRows:[],sDom:null,searchDelay:null,sPaginationType:"two_button",iStateDuration:0,aoStateSave:[],aoStateLoad:[],oSavedState:null,oLoadedState:null,sAjaxSource:null,sAjaxDataProp:null,jqXHR:null,json:q,oAjaxData:q,fnServerData:null,aoServerParams:[],sServerMethod:null, +fnFormatNumber:null,aLengthMenu:null,iDraw:0,bDrawing:!1,iDrawError:-1,_iDisplayLength:10,_iDisplayStart:0,_iRecordsTotal:0,_iRecordsDisplay:0,oClasses:{},bFiltered:!1,bSorted:!1,bSortCellsTop:null,oInit:null,aoDestroyCallback:[],fnRecordsTotal:function(){return"ssp"==Q(this)?1*this._iRecordsTotal:this.aiDisplayMaster.length},fnRecordsDisplay:function(){return"ssp"==Q(this)?1*this._iRecordsDisplay:this.aiDisplay.length},fnDisplayEnd:function(){var a=this._iDisplayLength,b=this._iDisplayStart,c=b+ +a,d=this.aiDisplay.length,e=this.oFeatures,h=e.bPaginate;return e.bServerSide?!1===h||-1===a?b+d:Math.min(b+a,this._iRecordsDisplay):!h||c>d||-1===a?d:c},oInstance:null,sInstance:null,iTabIndex:0,nScrollHead:null,nScrollFoot:null,aLastSort:[],oPlugins:{},rowIdFn:null,rowId:null};u.ext=M={buttons:{},classes:{},build:"bs4/dt-1.12.1/r-2.3.0",errMode:"alert",feature:[],search:[],selector:{cell:[],column:[],row:[]},internal:{},legacy:{ajax:null},pager:{},renderer:{pageButton:{},header:{}},order:{},type:{detect:[], +search:{},order:{}},_unique:0,fnVersionCheck:u.fnVersionCheck,iApiIndex:0,oJUIClasses:{},sVersion:u.version};l.extend(M,{afnFiltering:M.search,aTypes:M.type.detect,ofnSearch:M.type.search,oSort:M.type.order,afnSortData:M.order,aoFeatures:M.feature,oApi:M.internal,oStdClasses:M.classes,oPagination:M.pager});l.extend(u.ext.classes,{sTable:"dataTable",sNoFooter:"no-footer",sPageButton:"paginate_button",sPageButtonActive:"current",sPageButtonDisabled:"disabled",sStripeOdd:"odd",sStripeEven:"even",sRowEmpty:"dataTables_empty", +sWrapper:"dataTables_wrapper",sFilter:"dataTables_filter",sInfo:"dataTables_info",sPaging:"dataTables_paginate paging_",sLength:"dataTables_length",sProcessing:"dataTables_processing",sSortAsc:"sorting_asc",sSortDesc:"sorting_desc",sSortable:"sorting",sSortableAsc:"sorting_desc_disabled",sSortableDesc:"sorting_asc_disabled",sSortableNone:"sorting_disabled",sSortColumn:"sorting_",sFilterInput:"",sLengthSelect:"",sScrollWrapper:"dataTables_scroll",sScrollHead:"dataTables_scrollHead",sScrollHeadInner:"dataTables_scrollHeadInner", +sScrollBody:"dataTables_scrollBody",sScrollFoot:"dataTables_scrollFoot",sScrollFootInner:"dataTables_scrollFootInner",sHeaderTH:"",sFooterTH:"",sSortJUIAsc:"",sSortJUIDesc:"",sSortJUI:"",sSortJUIAscAllowed:"",sSortJUIDescAllowed:"",sSortJUIWrapper:"",sSortIcon:"",sJUIHeader:"",sJUIFooter:""});var ic=u.ext.pager;l.extend(ic,{simple:function(a,b){return["previous","next"]},full:function(a,b){return["first","previous","next","last"]},numbers:function(a,b){return[Ea(a,b)]},simple_numbers:function(a,b){return["previous", +Ea(a,b),"next"]},full_numbers:function(a,b){return["first","previous",Ea(a,b),"next","last"]},first_last_numbers:function(a,b){return["first",Ea(a,b),"last"]},_numbers:Ea,numbers_length:7});l.extend(!0,u.ext.renderer,{pageButton:{_:function(a,b,c,d,e,h){var f=a.oClasses,g=a.oLanguage.oPaginate,k=a.oLanguage.oAria.paginate||{},m,n,p=0,t=function(x,w){var r,C=f.sPageButtonDisabled,G=function(I){Ta(a,I.data.action,!0)};var ba=0;for(r=w.length;ba ").appendTo(x);t(O,L)}else{m=null;n=L;O=a.iTabIndex;switch(L){case "ellipsis":x.append('…');break;case "first":m=g.sFirst;0===e&&(O=-1,n+=" "+C);break;case "previous":m=g.sPrevious;0===e&&(O=-1,n+=" "+C);break;case "next":m=g.sNext;if(0===h||e===h-1)O=-1,n+=" "+C;break;case "last":m=g.sLast;if(0===h||e===h-1)O=-1,n+=" "+C;break;default:m=a.fnFormatNumber(L+1),n=e===L?f.sPageButtonActive:""}null!==m&&(O=l("",{"class":f.sPageButton+" "+n,"aria-controls":a.sTableId, +"aria-label":k[L],"data-dt-idx":p,tabindex:O,id:0===c&&"string"===typeof L?a.sTableId+"_"+L:null}).html(m).appendTo(x),sb(O,{action:L},G),p++)}}};try{var v=l(b).find(A.activeElement).data("dt-idx")}catch(x){}t(l(b).empty(),d);v!==q&&l(b).find("[data-dt-idx="+v+"]").trigger("focus")}}});l.extend(u.ext.type.detect,[function(a,b){b=b.oLanguage.sDecimal;return yb(a,b)?"num"+b:null},function(a,b){if(a&&!(a instanceof Date)&&!Dc.test(a))return null;b=Date.parse(a);return null!==b&&!isNaN(b)||aa(a)?"date": +null},function(a,b){b=b.oLanguage.sDecimal;return yb(a,b,!0)?"num-fmt"+b:null},function(a,b){b=b.oLanguage.sDecimal;return pc(a,b)?"html-num"+b:null},function(a,b){b=b.oLanguage.sDecimal;return pc(a,b,!0)?"html-num-fmt"+b:null},function(a,b){return aa(a)||"string"===typeof a&&-1!==a.indexOf("<")?"html":null}]);l.extend(u.ext.type.search,{html:function(a){return aa(a)?a:"string"===typeof a?a.replace(mc," ").replace(Ya,""):""},string:function(a){return aa(a)?a:"string"===typeof a?a.replace(mc," "): +a}});var Xa=function(a,b,c,d){if(0!==a&&(!a||"-"===a))return-Infinity;b&&(a=oc(a,b));a.replace&&(c&&(a=a.replace(c,"")),d&&(a=a.replace(d,"")));return 1*a};l.extend(M.type.order,{"date-pre":function(a){a=Date.parse(a);return isNaN(a)?-Infinity:a},"html-pre":function(a){return aa(a)?"":a.replace?a.replace(/<.*?>/g,"").toLowerCase():a+""},"string-pre":function(a){return aa(a)?"":"string"===typeof a?a.toLowerCase():a.toString?a.toString():""},"string-asc":function(a,b){return ab?1:0},"string-desc":function(a, +b){return ab?-1:0}});bb("");l.extend(!0,u.ext.renderer,{header:{_:function(a,b,c,d){l(a.nTable).on("order.dt.DT",function(e,h,f,g){a===h&&(e=c.idx,b.removeClass(d.sSortAsc+" "+d.sSortDesc).addClass("asc"==g[e]?d.sSortAsc:"desc"==g[e]?d.sSortDesc:c.sSortingClass))})},jqueryui:function(a,b,c,d){l("").addClass(d.sSortJUIWrapper).append(b.contents()).append(l("").addClass(d.sSortIcon+" "+c.sSortingClassJUI)).appendTo(b);l(a.nTable).on("order.dt.DT",function(e,h,f,g){a===h&&(e=c.idx, +b.removeClass(d.sSortAsc+" "+d.sSortDesc).addClass("asc"==g[e]?d.sSortAsc:"desc"==g[e]?d.sSortDesc:c.sSortingClass),b.find("span."+d.sSortIcon).removeClass(d.sSortJUIAsc+" "+d.sSortJUIDesc+" "+d.sSortJUI+" "+d.sSortJUIAscAllowed+" "+d.sSortJUIDescAllowed).addClass("asc"==g[e]?d.sSortJUIAsc:"desc"==g[e]?d.sSortJUIDesc:c.sSortingClassJUI))})}}});var $a=function(a){Array.isArray(a)&&(a=a.join(","));return"string"===typeof a?a.replace(/&/g,"&").replace(/ h?"-":"",g=parseFloat(h);if(isNaN(g))return $a(h);g=g.toFixed(c);h=Math.abs(g);g=parseInt(h,10);h=c?b+(h-g).toFixed(c).substring(2):"";0===g&&0===parseFloat(h)&&(f="");return f+(d||"")+g.toString().replace(/\B(?=(\d{3})+(?!\d))/g,a)+h+(e||"")}}},text:function(){return{display:$a,filter:$a}}}; +l.extend(u.ext.internal,{_fnExternApiFunc:lc,_fnBuildAjax:Qa,_fnAjaxUpdate:Kb,_fnAjaxParameters:Tb,_fnAjaxUpdateDraw:Ub,_fnAjaxDataSrc:za,_fnAddColumn:cb,_fnColumnOptions:Ia,_fnAdjustColumnSizing:sa,_fnVisibleToColumnIndex:ta,_fnColumnIndexToVisible:ua,_fnVisbleColumns:na,_fnGetColumns:Ka,_fnColumnTypes:eb,_fnApplyColumnDefs:Hb,_fnHungarianMap:E,_fnCamelToHungarian:P,_fnLanguageCompat:la,_fnBrowserDetect:Fb,_fnAddData:ia,_fnAddTr:La,_fnNodeToDataIndex:function(a,b){return b._DT_RowIndex!==q?b._DT_RowIndex: +null},_fnNodeToColumnIndex:function(a,b,c){return l.inArray(c,a.aoData[b].anCells)},_fnGetCellData:T,_fnSetCellData:Ib,_fnSplitObjNotation:hb,_fnGetObjectDataFn:ma,_fnSetObjectDataFn:ha,_fnGetDataMaster:ib,_fnClearTable:Ma,_fnDeleteIndex:Na,_fnInvalidate:va,_fnGetRowElements:gb,_fnCreateTr:fb,_fnBuildHead:Jb,_fnDrawHead:xa,_fnDraw:ja,_fnReDraw:ka,_fnAddOptionsHtml:Mb,_fnDetectHeader:wa,_fnGetUniqueThs:Pa,_fnFeatureHtmlFilter:Ob,_fnFilterComplete:ya,_fnFilterCustom:Xb,_fnFilterColumn:Wb,_fnFilter:Vb, +_fnFilterCreateSearch:nb,_fnEscapeRegex:ob,_fnFilterData:Yb,_fnFeatureHtmlInfo:Rb,_fnUpdateInfo:ac,_fnInfoMacros:bc,_fnInitialise:Aa,_fnInitComplete:Ra,_fnLengthChange:pb,_fnFeatureHtmlLength:Nb,_fnFeatureHtmlPaginate:Sb,_fnPageChange:Ta,_fnFeatureHtmlProcessing:Pb,_fnProcessingDisplay:V,_fnFeatureHtmlTable:Qb,_fnScrollDraw:Ja,_fnApplyToChildren:da,_fnCalculateColumnWidths:db,_fnThrottle:mb,_fnConvertToWidth:cc,_fnGetWidestNode:dc,_fnGetMaxLenString:ec,_fnStringToCss:K,_fnSortFlatten:oa,_fnSort:Lb, +_fnSortAria:gc,_fnSortListener:rb,_fnSortAttachListener:kb,_fnSortingClasses:Va,_fnSortData:fc,_fnSaveState:Da,_fnLoadState:hc,_fnImplementState:tb,_fnSettingsFromNode:Wa,_fnLog:ea,_fnMap:Y,_fnBindAction:sb,_fnCallbackReg:R,_fnCallbackFire:F,_fnLengthOverflow:qb,_fnRenderer:lb,_fnDataSource:Q,_fnRowAttributes:jb,_fnExtend:ub,_fnCalculateEnd:function(){}});l.fn.dataTable=u;u.$=l;l.fn.dataTableSettings=u.settings;l.fn.dataTableExt=u.ext;l.fn.DataTable=function(a){return l(this).dataTable(a).api()}; +l.each(u,function(a,b){l.fn.DataTable[a]=b});return u}); + + +/*! + DataTables Bootstrap 4 integration + ©2011-2017 SpryMedia Ltd - datatables.net/license +*/ +var $jscomp=$jscomp||{};$jscomp.scope={};$jscomp.findInternal=function(a,b,c){a instanceof String&&(a=String(a));for(var e=a.length,d=0;d <'col-sm-12 col-md-6'f>><'row'<'col-sm-12'tr>><'row'<'col-sm-12 col-md-5'i><'col-sm-12 col-md-12'p>>", +renderer:"bootstrap"});a.extend(d.ext.classes,{sWrapper:"dataTables_wrapper dt-bootstrap4",sFilterInput:"form-control form-control-sm",sLengthSelect:"custom-select custom-select-sm form-control form-control-sm",sProcessing:"dataTables_processing card",sPageButton:"paginate_button page-item"});d.ext.renderer.pageButton.bootstrap=function(f,l,A,B,m,t){var u=new d.Api(f),C=f.oClasses,n=f.oLanguage.oPaginate,D=f.oLanguage.oAria.paginate||{},h,k,v=0,y=function(q,w){var x,E=function(p){p.preventDefault(); +a(p.currentTarget).hasClass("disabled")||u.page()==p.data.action||u.page(p.data.action).draw("page")};var r=0;for(x=w.length;r ",{"class":C.sPageButton+" "+k,id:0===A&&"string"===typeof g?f.sTableId+"_"+g:null}).append(a("",{href:"#","aria-controls":f.sTableId,"aria-label":D[g],"data-dt-idx":v,tabindex:f.iTabIndex,"class":"page-link"}).html(h)).appendTo(q);f.oApi._fnBindAction(F,{action:g},E);v++}}}};try{var z=a(l).find(c.activeElement).data("dt-idx")}catch(q){}y(a(l).empty().html(' ').children("ul"),B);z!==e&&a(l).find("[data-dt-idx="+z+"]").trigger("focus")};return d}); + + +/*! + SpryMedia Ltd. + + This source file is free software, available under the following license: + MIT license - http://datatables.net/license/mit + + This source file is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY + or FITNESS FOR A PARTICULAR PURPOSE. See the license files for details. + + For details please refer to: http://www.datatables.net + Responsive 2.3.0 + 2014-2022 SpryMedia Ltd - datatables.net/license +*/ +var $jscomp=$jscomp||{};$jscomp.scope={};$jscomp.findInternal=function(b,k,m){b instanceof String&&(b=String(b));for(var n=b.length,p=0;p
td, >th", +f).each(function(e){e=c.column.index("toData",e);!1===a.s.current[e]&&b(this).css("display","none")})});c.on("destroy.dtr",function(){c.off(".dtr");b(c.table().body()).off(".dtr");b(k).off("resize.dtr orientationchange.dtr");c.cells(".dtr-control").nodes().to$().removeClass("dtr-control");b.each(a.s.current,function(f,l){!1===l&&a._setColumnVis(f,!0)})});this.c.breakpoints.sort(function(f,l){return f.width l.width?-1:0});this._classLogic();this._resizeAuto();d=this.c.details;!1!== +d.type&&(a._detailsInit(),c.on("column-visibility.dtr",function(){a._timer&&clearTimeout(a._timer);a._timer=setTimeout(function(){a._timer=null;a._classLogic();a._resizeAuto();a._resize(!0);a._redrawChildren()},100)}),c.on("draw.dtr",function(){a._redrawChildren()}),b(c.table().node()).addClass("dtr-"+d.type));c.on("column-reorder.dtr",function(f,l,h){a._classLogic();a._resizeAuto();a._resize(!0)});c.on("column-sizing.dtr",function(){a._resizeAuto();a._resize()});c.on("column-calc.dt",function(f, +l){f=a.s.current;for(var h=0;h h-d[q].minWidth?(r=!0,l[q]=!1):l[q]=!0,h-=d[q].minWidth)}f=!1;e=0;for(g=d.length;e =q&&f(h,c[e].name);else if("not-"===r)for(e=0,r=c.length;e g?c.columns().eq(0).length+ +g:g;if(c.cell(this).index().column!==l)return}l=c.row(b(this).closest("tr"));"click"===f.type?a._detailsDisplay(l,!1):"mousedown"===f.type?b(this).css("outline","none"):"mouseup"===f.type&&b(this).trigger("blur").css("outline","")}})},_detailsObj:function(a){var c=this,d=this.s.dt;return b.map(this.s.columns,function(g,f){if(!g.never&&!g.control)return g=d.settings()[0].aoColumns[f],{className:g.sClass,columnIndex:f,data:d.cell(a,f).render(c.c.orthogonal),hidden:d.column(f).visible()&&!c.s.current[f], +rowIndex:a,title:null!==g.sTitle?g.sTitle:b(d.column(f).header()).text()}})},_find:function(a){for(var c=this.c.breakpoints,d=0,g=c.length;d ").append(h).appendTo(f)}b(" ").append(l).appendTo(g);"inline"===this.c.details.type&&b(d).addClass("dtr-inline collapsed");b(d).find("[name]").removeAttr("name");b(d).css("position", +"relative");d=b("").css({width:1,height:1,overflow:"hidden",clear:"both"}).append(d);d.insertBefore(a.table().node());l.each(function(e){e=a.column.index("fromVisible",e);c[e].minWidth=this.offsetWidth||0});d.remove()}},_responsiveOnlyHidden:function(){var a=this.s.dt;return b.map(this.s.current,function(c,d){return!1===a.column(d).visible()?!0:c})},_setColumnVis:function(a,c){var d=this.s.dt,g=c?"":"none";b(d.column(a).header()).css("display",g).toggleClass("dtr-hidden",!c);b(d.column(a).footer()).css("display", +g).toggleClass("dtr-hidden",!c);d.column(a).nodes().to$().css("display",g).toggleClass("dtr-hidden",!c);b.isEmptyObject(A)||d.cells(null,a).indexes().each(function(f){y(d,f.row,f.column)})},_tabIndexes:function(){var a=this.s.dt,c=a.cells({page:"current"}).nodes().to$(),d=a.settings()[0],g=this.c.details.target;c.filter("[data-dtr-keyboard]").removeData("[data-dtr-keyboard]");"number"===typeof g?a.cells(null,g,{page:"current"}).nodes().to$().attr("tabIndex",d.iTabIndex).data("dtr-keyboard",1):("td:first-child, th:first-child"=== +g&&(g=">td:first-child, >th:first-child"),b(g,a.rows({page:"current"}).nodes()).attr("tabIndex",d.iTabIndex).data("dtr-keyboard",1))}});u.breakpoints=[{name:"desktop",width:Infinity},{name:"tablet-l",width:1024},{name:"tablet-p",width:768},{name:"mobile-l",width:480},{name:"mobile-p",width:320}];u.display={childRow:function(a,c,d){if(c){if(b(a.node()).hasClass("parent"))return a.child(d(),"child").show(),!0}else{if(a.child.isShown())return a.child(!1),b(a.node()).removeClass("parent"),!1;a.child(d(), +"child").show();b(a.node()).addClass("parent");return!0}},childRowImmediate:function(a,c,d){if(!c&&a.child.isShown()||!a.responsive.hasHidden())return a.child(!1),b(a.node()).removeClass("parent"),!1;a.child(d(),"child").show();b(a.node()).addClass("parent");return!0},modal:function(a){return function(c,d,g){if(d)b("div.dtr-modal-content").empty().append(g());else{var f=function(){l.remove();b(m).off("keypress.dtr")},l=b('').append(b('').append(b('').append(g())).append(b(' ×').click(function(){f()}))).append(b('').click(function(){f()})).appendTo("body"); +b(m).on("keyup.dtr",function(h){27===h.keyCode&&(h.stopPropagation(),f())})}a&&a.header&&b("div.dtr-modal-content").prepend(""+a.header(c)+"
")}}};var A={};u.renderer={listHiddenNodes:function(){return function(a,c,d){var g=b(''),f=!1;b.each(d,function(l,h){h.hidden&&(b("
'+ +h.title+" ").append(b('').append(p(a,h.rowIndex,h.columnIndex))).appendTo(g),f=!0)});return f?g:!1}},listHidden:function(){return function(a,c,d){return(a=b.map(d,function(g){var f=g.className?'class="'+g.className+'"':"";return g.hidden?"'+g.title+' '+g.data+" ":""}).join(""))?b('').append(a):!1}},tableAll:function(a){a=b.extend({tableClass:""},a);return function(c,d,g){c=b.map(g,function(f){return"
"}).join("");return b(' '+f.title+": "+f.data+" ').append(c)}}};u.defaults={breakpoints:u.breakpoints,auto:!0,details:{display:u.display.childRow,renderer:u.renderer.listHidden(), +target:0,type:"inline"},orthogonal:"display"};var C=b.fn.dataTable.Api;C.register("responsive()",function(){return this});C.register("responsive.index()",function(a){a=b(a);return{column:a.data("dtr-index"),row:a.parent().data("dtr-index")}});C.register("responsive.rebuild()",function(){return this.iterator("table",function(a){a._responsive&&a._responsive._classLogic()})});C.register("responsive.recalc()",function(){return this.iterator("table",function(a){a._responsive&&(a._responsive._resizeAuto(), +a._responsive._resize())})});C.register("responsive.hasHidden()",function(){var a=this.context[0];return a._responsive?-1!==b.inArray(!1,a._responsive._responsiveOnlyHidden()):!1});C.registerPlural("columns().responsiveHidden()","column().responsiveHidden()",function(){return this.iterator("column",function(a,c){return a._responsive?a._responsive._responsiveOnlyHidden()[c]:!1},1)});u.version="2.3.0";b.fn.dataTable.Responsive=u;b.fn.DataTable.Responsive=u;b(m).on("preInit.dt.dtr",function(a,c,d){"dt"=== +a.namespace&&(b(c.nTable).hasClass("responsive")||b(c.nTable).hasClass("dt-responsive")||c.oInit.responsive||z.defaults.responsive)&&(a=c.oInit.responsive,!1!==a&&new u(c,b.isPlainObject(a)?a:{}))});return u}); + + +/*! Bootstrap 4 integration for DataTables' Responsive + * ©2016 SpryMedia Ltd - datatables.net/license + */ + +(function( factory ){ + if ( typeof define === 'function' && define.amd ) { + // AMD + define( ['jquery', 'datatables.net-bs4', 'datatables.net-responsive'], function ( $ ) { + return factory( $, window, document ); + } ); + } + else if ( typeof exports === 'object' ) { + // CommonJS + module.exports = function (root, $) { + if ( ! root ) { + root = window; + } + + if ( ! $ || ! $.fn.dataTable ) { + $ = require('datatables.net-bs4')(root, $).$; + } + + if ( ! $.fn.dataTable.Responsive ) { + require('datatables.net-responsive')(root, $); + } + + return factory( $, root, root.document ); + }; + } + else { + // Browser + factory( jQuery, window, document ); + } +}(function( $, window, document, undefined ) { +'use strict'; +var DataTable = $.fn.dataTable; + + +var _display = DataTable.Responsive.display; +var _original = _display.modal; +var _modal = $( + '
'+ + '' +); + +_display.modal = function ( options ) { + return function ( row, update, render ) { + if ( ! $.fn.modal ) { + _original( row, update, render ); + } + else { + if ( ! update ) { + if ( options && options.header ) { + var header = _modal.find('div.modal-header'); + var button = header.find('button').detach(); + + header + .empty() + .append( ''+ + ''+ + ''+ + ''+options.header( row )+'
' ) + .append( button ); + } + + _modal.find( 'div.modal-body' ) + .empty() + .append( render() ); + + _modal + .appendTo( 'body' ) + .modal(); + } + } + }; +}; + + +return DataTable.Responsive; +})); + + diff --git a/odex25_takaful/takaful_portal_benefit/static/js/families_loan.js b/odex25_takaful/takaful_portal_benefit/static/js/families_loan.js new file mode 100644 index 000000000..f4459f69a --- /dev/null +++ b/odex25_takaful/takaful_portal_benefit/static/js/families_loan.js @@ -0,0 +1,174 @@ +$(document).ready(function () { + // get all food food surplus + $.ajax({ + url: '/services/loans', + type: 'GET', + dataType: 'json', + processData: false, + success: function (response) { + if (response.status && response.data.length > 0) { + loans = response.data[0].loans; + console.log(loans); + loans.forEach((element, i) => { + $('.families_loans_row').append(` +++ + `) + }); + } + else { + $('.families_loans_row').append(`+++ ${element.name} +
++
+ + تبرع بقرض للاسرة + +- +
++ + ${element.description} + +
- +
++ + ${element.benefits_total} أفراد + +
- +
++ + ${element.project_name} + +
- +
++ + بحاجة ل ${element.loan_amount} + +
لايوجد أسر لعرضها
`) + + } + }, + error: function (error) { + $(".families_feedback").text(error.msg).addClass('alert alert-danger') + } + }); + + $("#good_loan_form").on("submit", function (event) { + event.preventDefault(); + + var amount = $("#loan_amount").val(); + + var name_op = zakat_sacrifices_text; + + var encodedAmount = encodeURIComponent(loan_amount); + var encodedNameOp = encodeURIComponent(name_op); + + var redirectURL = "/dashboard/payment/paycard?name_op=" + encodedNameOp + "&required_amount=" + encodedAmount; + + window.location.href = redirectURL; + }); + + + + + //set the family id + $('.families_loans_row').on('click', '.families_loan_link', function () { + $('.loans_modal').modal('show'); + $("#family_id").val($(this).data('id')); + $("#loan_amount").val($(this).data('amount')); + console.log($("#family_id").val()); + }); + + $('.new_donor').hide(); //hide the feedback div + $('form#good_loan_form').on('submit', function (evt) { + evt.preventDefault(); + var form_data = $(this).serialize(); + var id = $("#family_id").val(); + var food_surplus_api = `/services/create_loan?id=${id}`; + console.log(food_surplus_api); + $.ajax({ + url: food_surplus_api, + type: "POST", + data: form_data, + dataType: 'json', + success: function (response) { + if (response.status) { + $('.new_donor').show(); + $(".new_donor").text(response.msg).addClass('alert alert-success') + setTimeout(function () { + $('.new_donor').hide(); + location.reload(); + // $('.zakat_modal').modal('hide'); + }, 3000); + } else { + $('.new_donor').show(); + $(".new_donor").text(response.msg).addClass('alert alert-danger form_error') + // setTimeout(function () { + // $('.new_donor').hide(); + // // location.reload(); + // }, 3000); + } + }, + error: function (err) { + $('.new_donor').show(); + $(".new_donor").text(err.msg).addClass('alert alert-danger server_error') + // setTimeout(function () { + // $('.new_donor').hide(); + // // location.reload(); + // }, 3000); + } + }); + }); + + // installment_number + + var loan_amount = $('#loan_amount'); + var installment_value = $('#installment_value'); + var installment_number = $('#installment_number'); + + function calculateResult() { + var value1 = loan_amount.val(); + var value2 = installment_value.val(); + + // Perform division only if both values are provided and not zero + if (value1 !== '' && value2 !== '' && parseFloat(value2) !== 0) { + var divisionResult = parseFloat(value1) / parseFloat(value2); + + // Set the result value + installment_number.val(divisionResult.toFixed(2)); + } else { + installment_number.val(''); + } + } + + loan_amount.on('input', calculateResult); + installment_value.on('input', calculateResult); + + $('.user_name').hide() + + var userId = $('#userId').val(); + if(userId > 4){ + $('.user_name').hide() + } else { + $('.user_name').show() + } + +}) + diff --git a/odex25_takaful/takaful_portal_benefit/static/js/food_basket.js b/odex25_takaful/takaful_portal_benefit/static/js/food_basket.js new file mode 100644 index 000000000..c4fb18b54 --- /dev/null +++ b/odex25_takaful/takaful_portal_benefit/static/js/food_basket.js @@ -0,0 +1,348 @@ +// $(document).ready(function () { + + +// // get all food basket in reciving mood + +// $.ajax({ +// url: '/services/food_basket', +// type: 'GET', +// dataType: 'json', +// processData: false, +// success: function (response) { +// food_basket = response.data[0].basket; +// console.log(food_basket); +// if (response.status) { +// food_basket.forEach((element, i) => { +// $('.food_basket_row').append(` +//+//+// `) +// }); +// } +// else { +// $('.food_basket_row').append(`+//+//+// ${element.name} +//
+//+// ${element.description ? + +// ` +//
+// تبرع الان +// +//- +//
+// ` +// : + +// '' +// } + +//+// ${element.description} +//
- +//
+//+// ${element.date_start} حتى ${element.date_end} +//
لايوجد زكاة لعرضها
`) + +// } +// }, +// error: function (error) { +// $(".zakat_fitr_feedback").text(error.msg).addClass('alert alert-danger') +// } +// }); + + +// var zakat_sacrifices_text = ""; + +// $(".food_basket_row").on('click','.food_basket_link', function(){ +// console.log("hello"); +// var data_id = $(this).data("id") +// console.log(data_id); +// const targetDiv = $('#' + data_id); +// console.log(targetDiv); +// if (targetDiv.length > 0) { +// const h5Element = targetDiv.find('h5'); +// console.log(h5Element); + +// if (h5Element.length > 0) { +// zakat_sacrifices_text = h5Element.text(); +// } +// } +// }) + +// $("#food_basket_form").on("submit", function (event) { +// event.preventDefault(); + +// var amount = $("#amount").val(); + +// var name_op = zakat_sacrifices_text; + +// var encodedAmount = encodeURIComponent(amount); +// var encodedNameOp = encodeURIComponent(name_op); + +// var redirectURL = "/dashboard/payment/paycard?name_op=" + encodedNameOp + "&required_amount=" + encodedAmount; + +// window.location.href = redirectURL; +// }); + + + +// //set the zakat id +// $('.food_basket_row').on('click', '.food_basket_link', function () { +// $('.food_basket_modal').modal('show'); +// $("#basket_id_holder_input").val($(this).data('id')) +// console.log($("#basket_id_holder_input").val()); +// }); +// // send zakat fitr handler + +// $('.new_donor').hide(); //hie the feedback div + +// $('form#food_basket_form').on('submit', function (evt) { +// evt.preventDefault(); +// var form_data = $(this).serialize(); +// var id = $("#basket_id_holder_input").val(); +// var food_basket_api = `/services/add_food_basket?id=${id}`; +// console.log(food_basket_api); +// $.ajax({ +// url: food_basket_api, +// type: "POST", +// data: form_data, +// dataType: 'json', +// success: function (response) { +// if (response.status) { +// $('.new_donor').show(); +// $(".new_donor").text(response.msg).addClass('alert alert-success') +// setTimeout(function () { +// $('.new_donor').hide(); +// location.reload(); +// // $('.zakat_modal').modal('hide'); +// }, 3000); +// } else { +// $('.new_donor').show(); +// $(".new_donor").text(response.msg).addClass('alert alert-danger') +// setTimeout(function () { +// $('.new_donor').hide(); +// // location.reload(); +// }, 3000); +// } +// }, +// error: function (err) { +// $('.new_donor').show(); +// $(".new_donor").text(err.msg).addClass('alert alert-danger') +// setTimeout(function () { +// $('.new_donor').hide(); +// // location.reload(); +// }, 3000); +// } +// }); +// }); + + +// $('.material_btn').hide(); +// $('.price_quantity').hide(); + +// $("#donation_type").change(function () { +// if ($(this).val() === 'cash') { +// $('.material_btn').hide(); +// $('.cash_btn').show(); +// $('.price_amount').show(); +// $('.payment_method').show(); +// $('.price_quantity').hide(); + +// } else if ($(this).val() === 'material') { +// $('.material_btn').show(); +// $('.cash_btn').hide(); +// $('.price_amount').hide(); +// $('.payment_method').hide(); +// $('.price_quantity').show(); + +// } else { +// $('.material_btn').show(); +// $('.cash_btn').hide(); +// $('.price_amount').show(); +// $('.payment_method').show(); +// $('.price_quantity').show(); +// } +// }) +// }) + + +$(document).ready(function () { + + // get all food basket in reciving mood + + $.ajax({ + url: '/services/food_basket', + type: 'GET', + dataType: 'json', + processData: false, + success: function (response) { + // console.log(response); + if (response && response.data && response.data.length > 0) { + food_basket = response.data[0].basket; + // console.log(food_basket); + if (response.status) { + food_basket.forEach((element, i) => { + $('.food_basket_row').append(` +++ `) + }); + } + else { + $('.food_basket_row').append(`+++ ${element.name} +
++ ${element.description ? + + ` +
+ تبرع الان + +- +
+ ` + : + + '' + } + ++ ${element.description} +
- +
++ ${element.date_start} حتى ${element.date_end} +
لايوجد زكاة لعرضها
`) + + } + } + }, + error: function (error) { + $(".zakat_fitr_feedback").text(error.msg).addClass('alert alert-danger') + } + }); + + + var zakat_sacrifices_text = ""; + + $(".food_basket_row").on('click','.food_basket_link', function(){ + console.log("hello"); + var data_id = $(this).data("id") + console.log(data_id); + const targetDiv = $('#' + data_id); + console.log(targetDiv); + if (targetDiv.length > 0) { + const h5Element = targetDiv.find('h5'); + console.log(h5Element); + + if (h5Element.length > 0) { + zakat_sacrifices_text = h5Element.text(); + } + } + }) + + $("#food_basket_form").on("submit", function (event) { + event.preventDefault(); + + var amount = $("#amount").val(); + + var name_op = zakat_sacrifices_text; + + var encodedAmount = encodeURIComponent(amount); + var encodedNameOp = encodeURIComponent(name_op); + + var redirectURL = "/dashboard/payment/paycard?name_op=" + encodedNameOp + "&required_amount=" + encodedAmount; + + window.location.href = redirectURL; + }); + + + + //set the zakat id + $('.food_basket_row').on('click', '.food_basket_link', function () { + $('.food_basket_modal').modal('show'); + $("#basket_id_holder_input").val($(this).data('id')) + console.log($("#basket_id_holder_input").val()); + }); + // send zakat fitr handler + + $('.new_donor').hide(); //hie the feedback div + + $('form#food_basket_form').on('submit', function (evt) { + evt.preventDefault(); + var form_data = $(this).serialize(); + var id = $("#basket_id_holder_input").val(); + var food_basket_api = `/services/add_food_basket?id=${id}`; + console.log(food_basket_api); + $.ajax({ + url: food_basket_api, + type: "POST", + data: form_data, + dataType: 'json', + success: function (response) { + if (response.status) { + $('.new_donor').show(); + $(".new_donor").text(response.msg).addClass('alert alert-success') + setTimeout(function () { + $('.new_donor').hide(); + location.reload(); + // $('.zakat_modal').modal('hide'); + }, 3000); + } else { + $('.new_donor').show(); + $(".new_donor").text(response.msg).addClass('alert alert-danger') + setTimeout(function () { + $('.new_donor').hide(); + // location.reload(); + }, 3000); + } + }, + error: function (err) { + $('.new_donor').show(); + $(".new_donor").text(err.msg).addClass('alert alert-danger') + setTimeout(function () { + $('.new_donor').hide(); + // location.reload(); + }, 3000); + } + }); + }); + + + $('.material_btn').hide(); + $('.price_quantity').hide(); + + $("#donation_type").change(function () { + if ($(this).val() === 'cash') { + $('.material_btn').hide(); + $('.cash_btn').show(); + $('.price_amount').show(); + $('.payment_method').show(); + $('.price_quantity').hide(); + + } else if ($(this).val() === 'material') { + $('.material_btn').show(); + $('.cash_btn').hide(); + $('.price_amount').hide(); + $('.payment_method').hide(); + $('.price_quantity').show(); + + } else { + $('.material_btn').show(); + $('.cash_btn').hide(); + $('.price_amount').show(); + $('.payment_method').show(); + $('.price_quantity').show(); + } + }) +}) \ No newline at end of file diff --git a/odex25_takaful/takaful_portal_benefit/static/js/food_surplus.js b/odex25_takaful/takaful_portal_benefit/static/js/food_surplus.js new file mode 100644 index 000000000..5602cbf22 --- /dev/null +++ b/odex25_takaful/takaful_portal_benefit/static/js/food_surplus.js @@ -0,0 +1,239 @@ + +// $(document).ready(function () { + +// // get all food food surplus +// $.ajax({ +// url: '/services/food', +// type: 'GET', +// dataType: 'json', +// processData: false, +// success: function (response) { +// food_surplus = response.data[0].foods; +// console.log(food_surplus); +// if (response.status) { +// food_surplus.forEach((element, i) => { +// $('.food_surplus_row').append(` +//+//+// `) +// }); +// } +// else { +// $('.food_surplus_row').append(`+//+//+// ${element.name} : ${element.name_food} +//
+//+// ${element.description ? + +// ` +//
+// تقديم طلب +// +//- +//
+// ` +// : + +// '' +// } + +//+// ${element.description} +//
- +//
+//+// المستفيدين : ${element.surplus_count} +//
- +//
+//+// الكمية : ${element.quantity} +//
- +//
+//+// ${element.address} +//
- +//
+//+// ${element.date_start} حتى ${element.date_end} +//
لايوجد فائض طعام لعرضها
`) + +// } +// }, +// error: function (error) { +// $(".food_surplus_feedback").text(error.msg).addClass('alert alert-danger') +// } +// }); + + + +// //set the zakat id +// $('.food_surplus_row').on('click', '.food_surplus_link', function () { +// $('.food_surplus_modal').modal('show'); +// $("#food_id").val($(this).data('id')) +// console.log($("#food_id").val()); +// }); +// // send zakat fitr handler + +// $('.new_donor').hide(); //hie the feedback div +// $('form#food_surplus_form').on('submit', function (evt) { +// evt.preventDefault(); +// var form_data = $(this).serialize(); +// var id = $("#surplus_id_holder_input").val(); +// var food_surplus_api = `/services/restaurant/request_food`; +// console.log(food_surplus_api); +// $.ajax({ +// url: food_surplus_api, +// type: "POST", +// data: form_data, +// dataType: 'json', +// success: function (response) { +// if (response.status) { +// $('.new_donor').show(); +// $(".new_donor").text(response.msg).addClass('alert alert-success') +// setTimeout(function () { +// $('.new_donor').hide(); +// // location.reload(); +// $('.food_surplus_modal').modal('hide'); +// }, 3000); +// } else { +// $('.new_donor').show(); +// $(".new_donor").text(response.msg).addClass('alert alert-danger form_error') +// // setTimeout(function () { +// // $('.new_donor').hide(); +// // // location.reload(); +// // }, 3000); +// } +// }, +// error: function (err) { +// $('.new_donor').show(); +// $(".new_donor").text(err.msg).addClass('alert alert-danger server_error') +// // setTimeout(function () { +// // $('.new_donor').hide(); +// // // location.reload(); +// // }, 3000); +// } +// }); +// }); +// }) + + +$(document).ready(function () { + + // get all food food surplus + $.ajax({ + url: '/services/food', + type: 'GET', + dataType: 'json', + processData: false, + success: function (response) { + if (response.data && response.data.length > 0) { + food_surplus = response.data[0].foods; + console.log(food_surplus); + food_surplus.forEach((element, i) => { + $('.food_surplus_row').append(` +++ `) + }); + } else { + $('.food_surplus_row').append(`+++ ${element.name} : ${element.name_food} +
++ ${element.description ? + + ` +
+ تقديم طلب + +- +
+ ` + : + + '' + } + ++ ${element.description} +
- +
++ المستفيدين : ${element.surplus_count} +
- +
++ الكمية : ${element.quantity} +
- +
++ ${element.address} +
- +
++ ${element.date_start} حتى ${element.date_end} +
لايوجد فائض طعام لعرضها
`); + } + }, + error: function (error) { + $(".food_surplus_feedback").text(error.msg).addClass('alert alert-danger') + } + }); + + + + //set the zakat id + $('.food_surplus_row').on('click', '.food_surplus_link', function () { + $('.food_surplus_modal').modal('show'); + $("#food_id").val($(this).data('id')) + console.log($("#food_id").val()); + }); + // send zakat fitr handler + + $('.new_donor').hide(); //hie the feedback div + $('form#food_surplus_form').on('submit', function (evt) { + evt.preventDefault(); + var form_data = $(this).serialize(); + var id = $("#surplus_id_holder_input").val(); + var food_surplus_api = `/services/restaurant/request_food`; + console.log(food_surplus_api); + $.ajax({ + url: food_surplus_api, + type: "POST", + data: form_data, + dataType: 'json', + success: function (response) { + if (response.status) { + $('.new_donor').show(); + $(".new_donor").text(response.msg).addClass('alert alert-success') + setTimeout(function () { + $('.new_donor').hide(); + // location.reload(); + $('.food_surplus_modal').modal('hide'); + }, 3000); + } else { + $('.new_donor').show(); + $(".new_donor").text(response.msg).addClass('alert alert-danger form_error') + // setTimeout(function () { + // $('.new_donor').hide(); + // // location.reload(); + // }, 3000); + } + }, + error: function (err) { + $('.new_donor').show(); + $(".new_donor").text(err.msg).addClass('alert alert-danger server_error') + // setTimeout(function () { + // $('.new_donor').hide(); + // // location.reload(); + // }, 3000); + } + }); + }); +}) \ No newline at end of file diff --git a/odex25_takaful/takaful_portal_benefit/static/js/home.js b/odex25_takaful/takaful_portal_benefit/static/js/home.js new file mode 100644 index 000000000..1ec20e340 --- /dev/null +++ b/odex25_takaful/takaful_portal_benefit/static/js/home.js @@ -0,0 +1,87 @@ +$(document).ready(function () { + $('.main-slider').owlCarousel({ + loop: true, + margin: 0, + nav: true, + dots: true, + rtl: true, + navText: ['', ''], + responsive: { + 0: { + items: 1 + }, + 600: { + items: 1 + }, + 1000: { + items: 1 + } + } + }); + + $('.news-slider').owlCarousel({ + loop: true, + nav: false, + items: 1, + lazyLoad: true, + rtl: true, + nav: true, + center: true, + navText: ['', ''], + responsive: { + 0: { + items: 1, + stagePadding: 60 + }, + 600: { + items: 1, + stagePadding: 100 + }, + 1000: { + items: 1, + stagePadding: 200 + }, + 1200: { + items: 1, + stagePadding: 150 + }, + 1400: { + items: 1, + stagePadding: 300 + }, + 1600: { + items: 1, + stagePadding: 350 + }, + 1800: { + items: 1, + stagePadding: 400 + } + } + }); + + + + $('.parteners-logo-slider').owlCarousel({ + loop: true, + nav: false, + dots: true, + autoplay: true, + items: 1, + margin: 50, + lazyLoad: true, + rtl: true, + center: true, + responsive: { + 0: { + items: 1, + }, + 600: { + items: 3, + }, + 1000: { + items: 6, + }, + } + }); +}); \ No newline at end of file diff --git a/odex25_takaful/takaful_portal_benefit/static/js/jquery-3.2.1.min.js b/odex25_takaful/takaful_portal_benefit/static/js/jquery-3.2.1.min.js new file mode 100644 index 000000000..a755acb9a --- /dev/null +++ b/odex25_takaful/takaful_portal_benefit/static/js/jquery-3.2.1.min.js @@ -0,0 +1,6 @@ +// @ts-nocheck +// @ts-ignore +/*! jQuery v3.2.1 | (c) JS Foundation and other contributors | jquery.org/license */ +!function(a,b){"use strict";"object"==typeof module&&"object"==typeof module.exports?module.exports=a.document?b(a,!0):function(a){if(!a.document)throw new Error("jQuery requires a window with a document");return b(a)}:b(a)}("undefined"!=typeof window?window:this,function(a,b){"use strict";var c=[],d=a.document,e=Object.getPrototypeOf,f=c.slice,g=c.concat,h=c.push,i=c.indexOf,j={},k=j.toString,l=j.hasOwnProperty,m=l.toString,n=m.call(Object),o={};function p(a,b){b=b||d;var c=b.createElement("script");c.text=a,b.head.appendChild(c).parentNode.removeChild(c)}var q="3.2.1",r=function(a,b){return new r.fn.init(a,b)},s=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,t=/^-ms-/,u=/-([a-z])/g,v=function(a,b){return b.toUpperCase()};r.fn=r.prototype={jquery:q,constructor:r,length:0,toArray:function(){return f.call(this)},get:function(a){return null==a?f.call(this):a<0?this[a+this.length]:this[a]},pushStack:function(a){var b=r.merge(this.constructor(),a);return b.prevObject=this,b},each:function(a){return r.each(this,a)},map:function(a){return this.pushStack(r.map(this,function(b,c){return a.call(b,c,b)}))},slice:function(){return this.pushStack(f.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(a){var b=this.length,c=+a+(a<0?b:0);return this.pushStack(c>=0&&c0&&b-1 in a)}var x=function(a){var b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u="sizzle"+1*new Date,v=a.document,w=0,x=0,y=ha(),z=ha(),A=ha(),B=function(a,b){return a===b&&(l=!0),0},C={}.hasOwnProperty,D=[],E=D.pop,F=D.push,G=D.push,H=D.slice,I=function(a,b){for(var c=0,d=a.length;c+~]|"+K+")"+K+"*"),S=new RegExp("="+K+"*([^\\]'\"]*?)"+K+"*\\]","g"),T=new RegExp(N),U=new RegExp("^"+L+"$"),V={ID:new RegExp("^#("+L+")"),CLASS:new RegExp("^\\.("+L+")"),TAG:new RegExp("^("+L+"|[*])"),ATTR:new RegExp("^"+M),PSEUDO:new RegExp("^"+N),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+K+"*(even|odd|(([+-]|)(\\d*)n|)"+K+"*(?:([+-]|)"+K+"*(\\d+)|))"+K+"*\\)|)","i"),bool:new RegExp("^(?:"+J+")$","i"),needsContext:new RegExp("^"+K+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+K+"*((?:-\\d)?\\d*)"+K+"*\\)|)(?=[^-]|$)","i")},W=/^(?:input|select|textarea|button)$/i,X=/^h\d$/i,Y=/^[^{]+\{\s*\[native \w/,Z=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,$=/[+~]/,_=new RegExp("\\\\([\\da-f]{1,6}"+K+"?|("+K+")|.)","ig"),aa=function(a,b,c){var d="0x"+b-65536;return d!==d||c?b:d<0?String.fromCharCode(d+65536):String.fromCharCode(d>>10|55296,1023&d|56320)},ba=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g,ca=function(a,b){return b?"\0"===a?"\ufffd":a.slice(0,-1)+"\\"+a.charCodeAt(a.length-1).toString(16)+" ":"\\"+a},da=function(){m()},ea=ta(function(a){return a.disabled===!0&&("form"in a||"label"in a)},{dir:"parentNode",next:"legend"});try{G.apply(D=H.call(v.childNodes),v.childNodes),D[v.childNodes.length].nodeType}catch(fa){G={apply:D.length?function(a,b){F.apply(a,H.call(b))}:function(a,b){var c=a.length,d=0;while(a[c++]=b[d++]);a.length=c-1}}}function ga(a,b,d,e){var f,h,j,k,l,o,r,s=b&&b.ownerDocument,w=b?b.nodeType:9;if(d=d||[],"string"!=typeof a||!a||1!==w&&9!==w&&11!==w)return d;if(!e&&((b?b.ownerDocument||b:v)!==n&&m(b),b=b||n,p)){if(11!==w&&(l=Z.exec(a)))if(f=l[1]){if(9===w){if(!(j=b.getElementById(f)))return d;if(j.id===f)return d.push(j),d}else if(s&&(j=s.getElementById(f))&&t(b,j)&&j.id===f)return d.push(j),d}else{if(l[2])return G.apply(d,b.getElementsByTagName(a)),d;if((f=l[3])&&c.getElementsByClassName&&b.getElementsByClassName)return G.apply(d,b.getElementsByClassName(f)),d}if(c.qsa&&!A[a+" "]&&(!q||!q.test(a))){if(1!==w)s=b,r=a;else if("object"!==b.nodeName.toLowerCase()){(k=b.getAttribute("id"))?k=k.replace(ba,ca):b.setAttribute("id",k=u),o=g(a),h=o.length;while(h--)o[h]="#"+k+" "+sa(o[h]);r=o.join(","),s=$.test(a)&&qa(b.parentNode)||b}if(r)try{return G.apply(d,s.querySelectorAll(r)),d}catch(x){}finally{k===u&&b.removeAttribute("id")}}}return i(a.replace(P,"$1"),b,d,e)}function ha(){var a=[];function b(c,e){return a.push(c+" ")>d.cacheLength&&delete b[a.shift()],b[c+" "]=e}return b}function ia(a){return a[u]=!0,a}function ja(a){var b=n.createElement("fieldset");try{return!!a(b)}catch(c){return!1}finally{b.parentNode&&b.parentNode.removeChild(b),b=null}}function ka(a,b){var c=a.split("|"),e=c.length;while(e--)d.attrHandle[c[e]]=b}function la(a,b){var c=b&&a,d=c&&1===a.nodeType&&1===b.nodeType&&a.sourceIndex-b.sourceIndex;if(d)return d;if(c)while(c=c.nextSibling)if(c===b)return-1;return a?1:-1}function ma(a){return function(b){var c=b.nodeName.toLowerCase();return"input"===c&&b.type===a}}function na(a){return function(b){var c=b.nodeName.toLowerCase();return("input"===c||"button"===c)&&b.type===a}}function oa(a){return function(b){return"form"in b?b.parentNode&&b.disabled===!1?"label"in b?"label"in b.parentNode?b.parentNode.disabled===a:b.disabled===a:b.isDisabled===a||b.isDisabled!==!a&&ea(b)===a:b.disabled===a:"label"in b&&b.disabled===a}}function pa(a){return ia(function(b){return b=+b,ia(function(c,d){var e,f=a([],c.length,b),g=f.length;while(g--)c[e=f[g]]&&(c[e]=!(d[e]=c[e]))})})}function qa(a){return a&&"undefined"!=typeof a.getElementsByTagName&&a}c=ga.support={},f=ga.isXML=function(a){var b=a&&(a.ownerDocument||a).documentElement;return!!b&&"HTML"!==b.nodeName},m=ga.setDocument=function(a){var b,e,g=a?a.ownerDocument||a:v;return g!==n&&9===g.nodeType&&g.documentElement?(n=g,o=n.documentElement,p=!f(n),v!==n&&(e=n.defaultView)&&e.top!==e&&(e.addEventListener?e.addEventListener("unload",da,!1):e.attachEvent&&e.attachEvent("onunload",da)),c.attributes=ja(function(a){return a.className="i",!a.getAttribute("className")}),c.getElementsByTagName=ja(function(a){return a.appendChild(n.createComment("")),!a.getElementsByTagName("*").length}),c.getElementsByClassName=Y.test(n.getElementsByClassName),c.getById=ja(function(a){return o.appendChild(a).id=u,!n.getElementsByName||!n.getElementsByName(u).length}),c.getById?(d.filter.ID=function(a){var b=a.replace(_,aa);return function(a){return a.getAttribute("id")===b}},d.find.ID=function(a,b){if("undefined"!=typeof b.getElementById&&p){var c=b.getElementById(a);return c?[c]:[]}}):(d.filter.ID=function(a){var b=a.replace(_,aa);return function(a){var c="undefined"!=typeof a.getAttributeNode&&a.getAttributeNode("id");return c&&c.value===b}},d.find.ID=function(a,b){if("undefined"!=typeof b.getElementById&&p){var c,d,e,f=b.getElementById(a);if(f){if(c=f.getAttributeNode("id"),c&&c.value===a)return[f];e=b.getElementsByName(a),d=0;while(f=e[d++])if(c=f.getAttributeNode("id"),c&&c.value===a)return[f]}return[]}}),d.find.TAG=c.getElementsByTagName?function(a,b){return"undefined"!=typeof b.getElementsByTagName?b.getElementsByTagName(a):c.qsa?b.querySelectorAll(a):void 0}:function(a,b){var c,d=[],e=0,f=b.getElementsByTagName(a);if("*"===a){while(c=f[e++])1===c.nodeType&&d.push(c);return d}return f},d.find.CLASS=c.getElementsByClassName&&function(a,b){if("undefined"!=typeof b.getElementsByClassName&&p)return b.getElementsByClassName(a)},r=[],q=[],(c.qsa=Y.test(n.querySelectorAll))&&(ja(function(a){o.appendChild(a).innerHTML="",a.querySelectorAll("[msallowcapture^='']").length&&q.push("[*^$]="+K+"*(?:''|\"\")"),a.querySelectorAll("[selected]").length||q.push("\\["+K+"*(?:value|"+J+")"),a.querySelectorAll("[id~="+u+"-]").length||q.push("~="),a.querySelectorAll(":checked").length||q.push(":checked"),a.querySelectorAll("a#"+u+"+*").length||q.push(".#.+[+~]")}),ja(function(a){a.innerHTML="";var b=n.createElement("input");b.setAttribute("type","hidden"),a.appendChild(b).setAttribute("name","D"),a.querySelectorAll("[name=d]").length&&q.push("name"+K+"*[*^$|!~]?="),2!==a.querySelectorAll(":enabled").length&&q.push(":enabled",":disabled"),o.appendChild(a).disabled=!0,2!==a.querySelectorAll(":disabled").length&&q.push(":enabled",":disabled"),a.querySelectorAll("*,:x"),q.push(",.*:")})),(c.matchesSelector=Y.test(s=o.matches||o.webkitMatchesSelector||o.mozMatchesSelector||o.oMatchesSelector||o.msMatchesSelector))&&ja(function(a){c.disconnectedMatch=s.call(a,"*"),s.call(a,"[s!='']:x"),r.push("!=",N)}),q=q.length&&new RegExp(q.join("|")),r=r.length&&new RegExp(r.join("|")),b=Y.test(o.compareDocumentPosition),t=b||Y.test(o.contains)?function(a,b){var c=9===a.nodeType?a.documentElement:a,d=b&&b.parentNode;return a===d||!(!d||1!==d.nodeType||!(c.contains?c.contains(d):a.compareDocumentPosition&&16&a.compareDocumentPosition(d)))}:function(a,b){if(b)while(b=b.parentNode)if(b===a)return!0;return!1},B=b?function(a,b){if(a===b)return l=!0,0;var d=!a.compareDocumentPosition-!b.compareDocumentPosition;return d?d:(d=(a.ownerDocument||a)===(b.ownerDocument||b)?a.compareDocumentPosition(b):1,1&d||!c.sortDetached&&b.compareDocumentPosition(a)===d?a===n||a.ownerDocument===v&&t(v,a)?-1:b===n||b.ownerDocument===v&&t(v,b)?1:k?I(k,a)-I(k,b):0:4&d?-1:1)}:function(a,b){if(a===b)return l=!0,0;var c,d=0,e=a.parentNode,f=b.parentNode,g=[a],h=[b];if(!e||!f)return a===n?-1:b===n?1:e?-1:f?1:k?I(k,a)-I(k,b):0;if(e===f)return la(a,b);c=a;while(c=c.parentNode)g.unshift(c);c=b;while(c=c.parentNode)h.unshift(c);while(g[d]===h[d])d++;return d?la(g[d],h[d]):g[d]===v?-1:h[d]===v?1:0},n):n},ga.matches=function(a,b){return ga(a,null,null,b)},ga.matchesSelector=function(a,b){if((a.ownerDocument||a)!==n&&m(a),b=b.replace(S,"='$1']"),c.matchesSelector&&p&&!A[b+" "]&&(!r||!r.test(b))&&(!q||!q.test(b)))try{var d=s.call(a,b);if(d||c.disconnectedMatch||a.document&&11!==a.document.nodeType)return d}catch(e){}return ga(b,n,null,[a]).length>0},ga.contains=function(a,b){return(a.ownerDocument||a)!==n&&m(a),t(a,b)},ga.attr=function(a,b){(a.ownerDocument||a)!==n&&m(a);var e=d.attrHandle[b.toLowerCase()],f=e&&C.call(d.attrHandle,b.toLowerCase())?e(a,b,!p):void 0;return void 0!==f?f:c.attributes||!p?a.getAttribute(b):(f=a.getAttributeNode(b))&&f.specified?f.value:null},ga.escape=function(a){return(a+"").replace(ba,ca)},ga.error=function(a){throw new Error("Syntax error, unrecognized expression: "+a)},ga.uniqueSort=function(a){var b,d=[],e=0,f=0;if(l=!c.detectDuplicates,k=!c.sortStable&&a.slice(0),a.sort(B),l){while(b=a[f++])b===a[f]&&(e=d.push(f));while(e--)a.splice(d[e],1)}return k=null,a},e=ga.getText=function(a){var b,c="",d=0,f=a.nodeType;if(f){if(1===f||9===f||11===f){if("string"==typeof a.textContent)return a.textContent;for(a=a.firstChild;a;a=a.nextSibling)c+=e(a)}else if(3===f||4===f)return a.nodeValue}else while(b=a[d++])c+=e(b);return c},d=ga.selectors={cacheLength:50,createPseudo:ia,match:V,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(a){return a[1]=a[1].replace(_,aa),a[3]=(a[3]||a[4]||a[5]||"").replace(_,aa),"~="===a[2]&&(a[3]=" "+a[3]+" "),a.slice(0,4)},CHILD:function(a){return a[1]=a[1].toLowerCase(),"nth"===a[1].slice(0,3)?(a[3]||ga.error(a[0]),a[4]=+(a[4]?a[5]+(a[6]||1):2*("even"===a[3]||"odd"===a[3])),a[5]=+(a[7]+a[8]||"odd"===a[3])):a[3]&&ga.error(a[0]),a},PSEUDO:function(a){var b,c=!a[6]&&a[2];return V.CHILD.test(a[0])?null:(a[3]?a[2]=a[4]||a[5]||"":c&&T.test(c)&&(b=g(c,!0))&&(b=c.indexOf(")",c.length-b)-c.length)&&(a[0]=a[0].slice(0,b),a[2]=c.slice(0,b)),a.slice(0,3))}},filter:{TAG:function(a){var b=a.replace(_,aa).toLowerCase();return"*"===a?function(){return!0}:function(a){return a.nodeName&&a.nodeName.toLowerCase()===b}},CLASS:function(a){var b=y[a+" "];return b||(b=new RegExp("(^|"+K+")"+a+"("+K+"|$)"))&&y(a,function(a){return b.test("string"==typeof a.className&&a.className||"undefined"!=typeof a.getAttribute&&a.getAttribute("class")||"")})},ATTR:function(a,b,c){return function(d){var e=ga.attr(d,a);return null==e?"!="===b:!b||(e+="","="===b?e===c:"!="===b?e!==c:"^="===b?c&&0===e.indexOf(c):"*="===b?c&&e.indexOf(c)>-1:"$="===b?c&&e.slice(-c.length)===c:"~="===b?(" "+e.replace(O," ")+" ").indexOf(c)>-1:"|="===b&&(e===c||e.slice(0,c.length+1)===c+"-"))}},CHILD:function(a,b,c,d,e){var f="nth"!==a.slice(0,3),g="last"!==a.slice(-4),h="of-type"===b;return 1===d&&0===e?function(a){return!!a.parentNode}:function(b,c,i){var j,k,l,m,n,o,p=f!==g?"nextSibling":"previousSibling",q=b.parentNode,r=h&&b.nodeName.toLowerCase(),s=!i&&!h,t=!1;if(q){if(f){while(p){m=b;while(m=m[p])if(h?m.nodeName.toLowerCase()===r:1===m.nodeType)return!1;o=p="only"===a&&!o&&"nextSibling"}return!0}if(o=[g?q.firstChild:q.lastChild],g&&s){m=q,l=m[u]||(m[u]={}),k=l[m.uniqueID]||(l[m.uniqueID]={}),j=k[a]||[],n=j[0]===w&&j[1],t=n&&j[2],m=n&&q.childNodes[n];while(m=++n&&m&&m[p]||(t=n=0)||o.pop())if(1===m.nodeType&&++t&&m===b){k[a]=[w,n,t];break}}else if(s&&(m=b,l=m[u]||(m[u]={}),k=l[m.uniqueID]||(l[m.uniqueID]={}),j=k[a]||[],n=j[0]===w&&j[1],t=n),t===!1)while(m=++n&&m&&m[p]||(t=n=0)||o.pop())if((h?m.nodeName.toLowerCase()===r:1===m.nodeType)&&++t&&(s&&(l=m[u]||(m[u]={}),k=l[m.uniqueID]||(l[m.uniqueID]={}),k[a]=[w,t]),m===b))break;return t-=e,t===d||t%d===0&&t/d>=0}}},PSEUDO:function(a,b){var c,e=d.pseudos[a]||d.setFilters[a.toLowerCase()]||ga.error("unsupported pseudo: "+a);return e[u]?e(b):e.length>1?(c=[a,a,"",b],d.setFilters.hasOwnProperty(a.toLowerCase())?ia(function(a,c){var d,f=e(a,b),g=f.length;while(g--)d=I(a,f[g]),a[d]=!(c[d]=f[g])}):function(a){return e(a,0,c)}):e}},pseudos:{not:ia(function(a){var b=[],c=[],d=h(a.replace(P,"$1"));return d[u]?ia(function(a,b,c,e){var f,g=d(a,null,e,[]),h=a.length;while(h--)(f=g[h])&&(a[h]=!(b[h]=f))}):function(a,e,f){return b[0]=a,d(b,null,f,c),b[0]=null,!c.pop()}}),has:ia(function(a){return function(b){return ga(a,b).length>0}}),contains:ia(function(a){return a=a.replace(_,aa),function(b){return(b.textContent||b.innerText||e(b)).indexOf(a)>-1}}),lang:ia(function(a){return U.test(a||"")||ga.error("unsupported lang: "+a),a=a.replace(_,aa).toLowerCase(),function(b){var c;do if(c=p?b.lang:b.getAttribute("xml:lang")||b.getAttribute("lang"))return c=c.toLowerCase(),c===a||0===c.indexOf(a+"-");while((b=b.parentNode)&&1===b.nodeType);return!1}}),target:function(b){var c=a.location&&a.location.hash;return c&&c.slice(1)===b.id},root:function(a){return a===o},focus:function(a){return a===n.activeElement&&(!n.hasFocus||n.hasFocus())&&!!(a.type||a.href||~a.tabIndex)},enabled:oa(!1),disabled:oa(!0),checked:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&!!a.checked||"option"===b&&!!a.selected},selected:function(a){return a.parentNode&&a.parentNode.selectedIndex,a.selected===!0},empty:function(a){for(a=a.firstChild;a;a=a.nextSibling)if(a.nodeType<6)return!1;return!0},parent:function(a){return!d.pseudos.empty(a)},header:function(a){return X.test(a.nodeName)},input:function(a){return W.test(a.nodeName)},button:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&"button"===a.type||"button"===b},text:function(a){var b;return"input"===a.nodeName.toLowerCase()&&"text"===a.type&&(null==(b=a.getAttribute("type"))||"text"===b.toLowerCase())},first:pa(function(){return[0]}),last:pa(function(a,b){return[b-1]}),eq:pa(function(a,b,c){return[c<0?c+b:c]}),even:pa(function(a,b){for(var c=0;c=0;)a.push(d);return a}),gt:pa(function(a,b,c){for(var d=c<0?c+b:c;++d1?function(b,c,d){var e=a.length;while(e--)if(!a[e](b,c,d))return!1;return!0}:a[0]}function va(a,b,c){for(var d=0,e=b.length;d -1&&(f[j]=!(g[j]=l))}}else r=wa(r===g?r.splice(o,r.length):r),e?e(null,g,r,i):G.apply(g,r)})}function ya(a){for(var b,c,e,f=a.length,g=d.relative[a[0].type],h=g||d.relative[" "],i=g?1:0,k=ta(function(a){return a===b},h,!0),l=ta(function(a){return I(b,a)>-1},h,!0),m=[function(a,c,d){var e=!g&&(d||c!==j)||((b=c).nodeType?k(a,c,d):l(a,c,d));return b=null,e}];i 1&&ua(m),i>1&&sa(a.slice(0,i-1).concat({value:" "===a[i-2].type?"*":""})).replace(P,"$1"),c,i 0,e=a.length>0,f=function(f,g,h,i,k){var l,o,q,r=0,s="0",t=f&&[],u=[],v=j,x=f||e&&d.find.TAG("*",k),y=w+=null==v?1:Math.random()||.1,z=x.length;for(k&&(j=g===n||g||k);s!==z&&null!=(l=x[s]);s++){if(e&&l){o=0,g||l.ownerDocument===n||(m(l),h=!p);while(q=a[o++])if(q(l,g||n,h)){i.push(l);break}k&&(w=y)}c&&((l=!q&&l)&&r--,f&&t.push(l))}if(r+=s,c&&s!==r){o=0;while(q=b[o++])q(t,u,g,h);if(f){if(r>0)while(s--)t[s]||u[s]||(u[s]=E.call(i));u=wa(u)}G.apply(i,u),k&&!f&&u.length>0&&r+b.length>1&&ga.uniqueSort(i)}return k&&(w=y,j=v),t};return c?ia(f):f}return h=ga.compile=function(a,b){var c,d=[],e=[],f=A[a+" "];if(!f){b||(b=g(a)),c=b.length;while(c--)f=ya(b[c]),f[u]?d.push(f):e.push(f);f=A(a,za(e,d)),f.selector=a}return f},i=ga.select=function(a,b,c,e){var f,i,j,k,l,m="function"==typeof a&&a,n=!e&&g(a=m.selector||a);if(c=c||[],1===n.length){if(i=n[0]=n[0].slice(0),i.length>2&&"ID"===(j=i[0]).type&&9===b.nodeType&&p&&d.relative[i[1].type]){if(b=(d.find.ID(j.matches[0].replace(_,aa),b)||[])[0],!b)return c;m&&(b=b.parentNode),a=a.slice(i.shift().value.length)}f=V.needsContext.test(a)?0:i.length;while(f--){if(j=i[f],d.relative[k=j.type])break;if((l=d.find[k])&&(e=l(j.matches[0].replace(_,aa),$.test(i[0].type)&&qa(b.parentNode)||b))){if(i.splice(f,1),a=e.length&&sa(i),!a)return G.apply(c,e),c;break}}}return(m||h(a,n))(e,b,!p,c,!b||$.test(a)&&qa(b.parentNode)||b),c},c.sortStable=u.split("").sort(B).join("")===u,c.detectDuplicates=!!l,m(),c.sortDetached=ja(function(a){return 1&a.compareDocumentPosition(n.createElement("fieldset"))}),ja(function(a){return a.innerHTML="","#"===a.firstChild.getAttribute("href")})||ka("type|href|height|width",function(a,b,c){if(!c)return a.getAttribute(b,"type"===b.toLowerCase()?1:2)}),c.attributes&&ja(function(a){return a.innerHTML="",a.firstChild.setAttribute("value",""),""===a.firstChild.getAttribute("value")})||ka("value",function(a,b,c){if(!c&&"input"===a.nodeName.toLowerCase())return a.defaultValue}),ja(function(a){return null==a.getAttribute("disabled")})||ka(J,function(a,b,c){var d;if(!c)return a[b]===!0?b.toLowerCase():(d=a.getAttributeNode(b))&&d.specified?d.value:null}),ga}(a);r.find=x,r.expr=x.selectors,r.expr[":"]=r.expr.pseudos,r.uniqueSort=r.unique=x.uniqueSort,r.text=x.getText,r.isXMLDoc=x.isXML,r.contains=x.contains,r.escapeSelector=x.escape;var y=function(a,b,c){var d=[],e=void 0!==c;while((a=a[b])&&9!==a.nodeType)if(1===a.nodeType){if(e&&r(a).is(c))break;d.push(a)}return d},z=function(a,b){for(var c=[];a;a=a.nextSibling)1===a.nodeType&&a!==b&&c.push(a);return c},A=r.expr.match.needsContext;function B(a,b){return a.nodeName&&a.nodeName.toLowerCase()===b.toLowerCase()}var C=/^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i,D=/^.[^:#\[\.,]*$/;function E(a,b,c){return r.isFunction(b)?r.grep(a,function(a,d){return!!b.call(a,d,a)!==c}):b.nodeType?r.grep(a,function(a){return a===b!==c}):"string"!=typeof b?r.grep(a,function(a){return i.call(b,a)>-1!==c}):D.test(b)?r.filter(b,a,c):(b=r.filter(b,a),r.grep(a,function(a){return i.call(b,a)>-1!==c&&1===a.nodeType}))}r.filter=function(a,b,c){var d=b[0];return c&&(a=":not("+a+")"),1===b.length&&1===d.nodeType?r.find.matchesSelector(d,a)?[d]:[]:r.find.matches(a,r.grep(b,function(a){return 1===a.nodeType}))},r.fn.extend({find:function(a){var b,c,d=this.length,e=this;if("string"!=typeof a)return this.pushStack(r(a).filter(function(){for(b=0;b 1?r.uniqueSort(c):c},filter:function(a){return this.pushStack(E(this,a||[],!1))},not:function(a){return this.pushStack(E(this,a||[],!0))},is:function(a){return!!E(this,"string"==typeof a&&A.test(a)?r(a):a||[],!1).length}});var F,G=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/,H=r.fn.init=function(a,b,c){var e,f;if(!a)return this;if(c=c||F,"string"==typeof a){if(e="<"===a[0]&&">"===a[a.length-1]&&a.length>=3?[null,a,null]:G.exec(a),!e||!e[1]&&b)return!b||b.jquery?(b||c).find(a):this.constructor(b).find(a);if(e[1]){if(b=b instanceof r?b[0]:b,r.merge(this,r.parseHTML(e[1],b&&b.nodeType?b.ownerDocument||b:d,!0)),C.test(e[1])&&r.isPlainObject(b))for(e in b)r.isFunction(this[e])?this[e](b[e]):this.attr(e,b[e]);return this}return f=d.getElementById(e[2]),f&&(this[0]=f,this.length=1),this}return a.nodeType?(this[0]=a,this.length=1,this):r.isFunction(a)?void 0!==c.ready?c.ready(a):a(r):r.makeArray(a,this)};H.prototype=r.fn,F=r(d);var I=/^(?:parents|prev(?:Until|All))/,J={children:!0,contents:!0,next:!0,prev:!0};r.fn.extend({has:function(a){var b=r(a,this),c=b.length;return this.filter(function(){for(var a=0;a -1:1===c.nodeType&&r.find.matchesSelector(c,a))){f.push(c);break}return this.pushStack(f.length>1?r.uniqueSort(f):f)},index:function(a){return a?"string"==typeof a?i.call(r(a),this[0]):i.call(this,a.jquery?a[0]:a):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(a,b){return this.pushStack(r.uniqueSort(r.merge(this.get(),r(a,b))))},addBack:function(a){return this.add(null==a?this.prevObject:this.prevObject.filter(a))}});function K(a,b){while((a=a[b])&&1!==a.nodeType);return a}r.each({parent:function(a){var b=a.parentNode;return b&&11!==b.nodeType?b:null},parents:function(a){return y(a,"parentNode")},parentsUntil:function(a,b,c){return y(a,"parentNode",c)},next:function(a){return K(a,"nextSibling")},prev:function(a){return K(a,"previousSibling")},nextAll:function(a){return y(a,"nextSibling")},prevAll:function(a){return y(a,"previousSibling")},nextUntil:function(a,b,c){return y(a,"nextSibling",c)},prevUntil:function(a,b,c){return y(a,"previousSibling",c)},siblings:function(a){return z((a.parentNode||{}).firstChild,a)},children:function(a){return z(a.firstChild)},contents:function(a){return B(a,"iframe")?a.contentDocument:(B(a,"template")&&(a=a.content||a),r.merge([],a.childNodes))}},function(a,b){r.fn[a]=function(c,d){var e=r.map(this,b,c);return"Until"!==a.slice(-5)&&(d=c),d&&"string"==typeof d&&(e=r.filter(d,e)),this.length>1&&(J[a]||r.uniqueSort(e),I.test(a)&&e.reverse()),this.pushStack(e)}});var L=/[^\x20\t\r\n\f]+/g;function M(a){var b={};return r.each(a.match(L)||[],function(a,c){b[c]=!0}),b}r.Callbacks=function(a){a="string"==typeof a?M(a):r.extend({},a);var b,c,d,e,f=[],g=[],h=-1,i=function(){for(e=e||a.once,d=b=!0;g.length;h=-1){c=g.shift();while(++h -1)f.splice(c,1),c<=h&&h--}),this},has:function(a){return a?r.inArray(a,f)>-1:f.length>0},empty:function(){return f&&(f=[]),this},disable:function(){return e=g=[],f=c="",this},disabled:function(){return!f},lock:function(){return e=g=[],c||b||(f=c=""),this},locked:function(){return!!e},fireWith:function(a,c){return e||(c=c||[],c=[a,c.slice?c.slice():c],g.push(c),b||i()),this},fire:function(){return j.fireWith(this,arguments),this},fired:function(){return!!d}};return j};function N(a){return a}function O(a){throw a}function P(a,b,c,d){var e;try{a&&r.isFunction(e=a.promise)?e.call(a).done(b).fail(c):a&&r.isFunction(e=a.then)?e.call(a,b,c):b.apply(void 0,[a].slice(d))}catch(a){c.apply(void 0,[a])}}r.extend({Deferred:function(b){var c=[["notify","progress",r.Callbacks("memory"),r.Callbacks("memory"),2],["resolve","done",r.Callbacks("once memory"),r.Callbacks("once memory"),0,"resolved"],["reject","fail",r.Callbacks("once memory"),r.Callbacks("once memory"),1,"rejected"]],d="pending",e={state:function(){return d},always:function(){return f.done(arguments).fail(arguments),this},"catch":function(a){return e.then(null,a)},pipe:function(){var a=arguments;return r.Deferred(function(b){r.each(c,function(c,d){var e=r.isFunction(a[d[4]])&&a[d[4]];f[d[1]](function(){var a=e&&e.apply(this,arguments);a&&r.isFunction(a.promise)?a.promise().progress(b.notify).done(b.resolve).fail(b.reject):b[d[0]+"With"](this,e?[a]:arguments)})}),a=null}).promise()},then:function(b,d,e){var f=0;function g(b,c,d,e){return function(){var h=this,i=arguments,j=function(){var a,j;if(!(b =f&&(d!==O&&(h=void 0,i=[a]),c.rejectWith(h,i))}};b?k():(r.Deferred.getStackHook&&(k.stackTrace=r.Deferred.getStackHook()),a.setTimeout(k))}}return r.Deferred(function(a){c[0][3].add(g(0,a,r.isFunction(e)?e:N,a.notifyWith)),c[1][3].add(g(0,a,r.isFunction(b)?b:N)),c[2][3].add(g(0,a,r.isFunction(d)?d:O))}).promise()},promise:function(a){return null!=a?r.extend(a,e):e}},f={};return r.each(c,function(a,b){var g=b[2],h=b[5];e[b[1]]=g.add,h&&g.add(function(){d=h},c[3-a][2].disable,c[0][2].lock),g.add(b[3].fire),f[b[0]]=function(){return f[b[0]+"With"](this===f?void 0:this,arguments),this},f[b[0]+"With"]=g.fireWith}),e.promise(f),b&&b.call(f,f),f},when:function(a){var b=arguments.length,c=b,d=Array(c),e=f.call(arguments),g=r.Deferred(),h=function(a){return function(c){d[a]=this,e[a]=arguments.length>1?f.call(arguments):c,--b||g.resolveWith(d,e)}};if(b<=1&&(P(a,g.done(h(c)).resolve,g.reject,!b),"pending"===g.state()||r.isFunction(e[c]&&e[c].then)))return g.then();while(c--)P(e[c],h(c),g.reject);return g.promise()}});var Q=/^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/;r.Deferred.exceptionHook=function(b,c){a.console&&a.console.warn&&b&&Q.test(b.name)&&a.console.warn("jQuery.Deferred exception: "+b.message,b.stack,c)},r.readyException=function(b){a.setTimeout(function(){throw b})};var R=r.Deferred();r.fn.ready=function(a){return R.then(a)["catch"](function(a){r.readyException(a)}),this},r.extend({isReady:!1,readyWait:1,ready:function(a){(a===!0?--r.readyWait:r.isReady)||(r.isReady=!0,a!==!0&&--r.readyWait>0||R.resolveWith(d,[r]))}}),r.ready.then=R.then;function S(){d.removeEventListener("DOMContentLoaded",S), +a.removeEventListener("load",S),r.ready()}"complete"===d.readyState||"loading"!==d.readyState&&!d.documentElement.doScroll?a.setTimeout(r.ready):(d.addEventListener("DOMContentLoaded",S),a.addEventListener("load",S));var T=function(a,b,c,d,e,f,g){var h=0,i=a.length,j=null==c;if("object"===r.type(c)){e=!0;for(h in c)T(a,b,h,c[h],!0,f,g)}else if(void 0!==d&&(e=!0,r.isFunction(d)||(g=!0),j&&(g?(b.call(a,d),b=null):(j=b,b=function(a,b,c){return j.call(r(a),c)})),b))for(;h1,null,!0)},removeData:function(a){return this.each(function(){X.remove(this,a)})}}),r.extend({queue:function(a,b,c){var d;if(a)return b=(b||"fx")+"queue",d=W.get(a,b),c&&(!d||Array.isArray(c)?d=W.access(a,b,r.makeArray(c)):d.push(c)),d||[]},dequeue:function(a,b){b=b||"fx";var c=r.queue(a,b),d=c.length,e=c.shift(),f=r._queueHooks(a,b),g=function(){r.dequeue(a,b)};"inprogress"===e&&(e=c.shift(),d--),e&&("fx"===b&&c.unshift("inprogress"),delete f.stop,e.call(a,g,f)),!d&&f&&f.empty.fire()},_queueHooks:function(a,b){var c=b+"queueHooks";return W.get(a,c)||W.access(a,c,{empty:r.Callbacks("once memory").add(function(){W.remove(a,[b+"queue",c])})})}}),r.fn.extend({queue:function(a,b){var c=2;return"string"!=typeof a&&(b=a,a="fx",c--),arguments.length \x20\t\r\n\f]+)/i,la=/^$|\/(?:java|ecma)script/i,ma={option:[1,""],thead:[1," ","
"],col:[2,""],tr:[2,"
"," ","
"],td:[3,""],_default:[0,"",""]};ma.optgroup=ma.option,ma.tbody=ma.tfoot=ma.colgroup=ma.caption=ma.thead,ma.th=ma.td;function na(a,b){var c;return c="undefined"!=typeof a.getElementsByTagName?a.getElementsByTagName(b||"*"):"undefined"!=typeof a.querySelectorAll?a.querySelectorAll(b||"*"):[],void 0===b||b&&B(a,b)?r.merge([a],c):c}function oa(a,b){for(var c=0,d=a.length;c
"," -1)e&&e.push(f);else if(j=r.contains(f.ownerDocument,f),g=na(l.appendChild(f),"script"),j&&oa(g),c){k=0;while(f=g[k++])la.test(f.type||"")&&c.push(f)}return l}!function(){var a=d.createDocumentFragment(),b=a.appendChild(d.createElement("div")),c=d.createElement("input");c.setAttribute("type","radio"),c.setAttribute("checked","checked"),c.setAttribute("name","t"),b.appendChild(c),o.checkClone=b.cloneNode(!0).cloneNode(!0).lastChild.checked,b.innerHTML="",o.noCloneChecked=!!b.cloneNode(!0).lastChild.defaultValue}();var ra=d.documentElement,sa=/^key/,ta=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,ua=/^([^.]*)(?:\.(.+)|)/;function va(){return!0}function wa(){return!1}function xa(){try{return d.activeElement}catch(a){}}function ya(a,b,c,d,e,f){var g,h;if("object"==typeof b){"string"!=typeof c&&(d=d||c,c=void 0);for(h in b)ya(a,h,c,d,b[h],f);return a}if(null==d&&null==e?(e=c,d=c=void 0):null==e&&("string"==typeof c?(e=d,d=void 0):(e=d,d=c,c=void 0)),e===!1)e=wa;else if(!e)return a;return 1===f&&(g=e,e=function(a){return r().off(a),g.apply(this,arguments)},e.guid=g.guid||(g.guid=r.guid++)),a.each(function(){r.event.add(this,b,e,d,c)})}r.event={global:{},add:function(a,b,c,d,e){var f,g,h,i,j,k,l,m,n,o,p,q=W.get(a);if(q){c.handler&&(f=c,c=f.handler,e=f.selector),e&&r.find.matchesSelector(ra,e),c.guid||(c.guid=r.guid++),(i=q.events)||(i=q.events={}),(g=q.handle)||(g=q.handle=function(b){return"undefined"!=typeof r&&r.event.triggered!==b.type?r.event.dispatch.apply(a,arguments):void 0}),b=(b||"").match(L)||[""],j=b.length;while(j--)h=ua.exec(b[j])||[],n=p=h[1],o=(h[2]||"").split(".").sort(),n&&(l=r.event.special[n]||{},n=(e?l.delegateType:l.bindType)||n,l=r.event.special[n]||{},k=r.extend({type:n,origType:p,data:d,handler:c,guid:c.guid,selector:e,needsContext:e&&r.expr.match.needsContext.test(e),namespace:o.join(".")},f),(m=i[n])||(m=i[n]=[],m.delegateCount=0,l.setup&&l.setup.call(a,d,o,g)!==!1||a.addEventListener&&a.addEventListener(n,g)),l.add&&(l.add.call(a,k),k.handler.guid||(k.handler.guid=c.guid)),e?m.splice(m.delegateCount++,0,k):m.push(k),r.event.global[n]=!0)}},remove:function(a,b,c,d,e){var f,g,h,i,j,k,l,m,n,o,p,q=W.hasData(a)&&W.get(a);if(q&&(i=q.events)){b=(b||"").match(L)||[""],j=b.length;while(j--)if(h=ua.exec(b[j])||[],n=p=h[1],o=(h[2]||"").split(".").sort(),n){l=r.event.special[n]||{},n=(d?l.delegateType:l.bindType)||n,m=i[n]||[],h=h[2]&&new RegExp("(^|\\.)"+o.join("\\.(?:.*\\.|)")+"(\\.|$)"),g=f=m.length;while(f--)k=m[f],!e&&p!==k.origType||c&&c.guid!==k.guid||h&&!h.test(k.namespace)||d&&d!==k.selector&&("**"!==d||!k.selector)||(m.splice(f,1),k.selector&&m.delegateCount--,l.remove&&l.remove.call(a,k));g&&!m.length&&(l.teardown&&l.teardown.call(a,o,q.handle)!==!1||r.removeEvent(a,n,q.handle),delete i[n])}else for(n in i)r.event.remove(a,n+b[j],c,d,!0);r.isEmptyObject(i)&&W.remove(a,"handle events")}},dispatch:function(a){var b=r.event.fix(a),c,d,e,f,g,h,i=new Array(arguments.length),j=(W.get(this,"events")||{})[b.type]||[],k=r.event.special[b.type]||{};for(i[0]=b,c=1;c =1))for(;j!==this;j=j.parentNode||this)if(1===j.nodeType&&("click"!==a.type||j.disabled!==!0)){for(f=[],g={},c=0;c-1:r.find(e,this,null,[j]).length),g[e]&&f.push(d);f.length&&h.push({elem:j,handlers:f})}return j=this,i \x20\t\r\n\f]*)[^>]*)\/>/gi,Aa=/ + + + + \ No newline at end of file diff --git a/odex25_takaful/takaful_portal_benefit/views/applications_furnatures.xml b/odex25_takaful/takaful_portal_benefit/views/applications_furnatures.xml new file mode 100644 index 000000000..3564231ca --- /dev/null +++ b/odex25_takaful/takaful_portal_benefit/views/applications_furnatures.xml @@ -0,0 +1,222 @@ + + + + \ No newline at end of file diff --git a/odex25_takaful/takaful_portal_benefit/views/assets.xml b/odex25_takaful/takaful_portal_benefit/views/assets.xml new file mode 100644 index 000000000..4ccb84250 --- /dev/null +++ b/odex25_takaful/takaful_portal_benefit/views/assets.xml @@ -0,0 +1,26 @@ +الأثاث و الاجهزة ++ + + +++ + + + +++الأثاث و الاجهزة
++++++ ++++ +++ +++ +++ +++ +++ +++ +++ +++ +++ + تحديد +++ +++ + تحديد +++ +++ +++ +++ +++ +++ +++ +++ +++ +++ +++ +++ +++
+ +++
+ +++
+ +++
+ ++ ++ + + \ No newline at end of file diff --git a/odex25_takaful/takaful_portal_benefit/views/clubs.xml b/odex25_takaful/takaful_portal_benefit/views/clubs.xml new file mode 100644 index 000000000..3490ac652 --- /dev/null +++ b/odex25_takaful/takaful_portal_benefit/views/clubs.xml @@ -0,0 +1,117 @@ ++ + + + + + + + + + + + + + + + + + + + + ++ + + \ No newline at end of file diff --git a/odex25_takaful/takaful_portal_benefit/views/families_loan.xml b/odex25_takaful/takaful_portal_benefit/views/families_loan.xml new file mode 100644 index 000000000..0cade72e3 --- /dev/null +++ b/odex25_takaful/takaful_portal_benefit/views/families_loan.xml @@ -0,0 +1,97 @@ +النوادي ++ + + +++ + + + +++النوادي
++++ +++ + + \ No newline at end of file diff --git a/odex25_takaful/takaful_portal_benefit/views/food_basket.xml b/odex25_takaful/takaful_portal_benefit/views/food_basket.xml new file mode 100644 index 000000000..fecf9fc5f --- /dev/null +++ b/odex25_takaful/takaful_portal_benefit/views/food_basket.xml @@ -0,0 +1,107 @@ +الاسر المنتجة ++ + + +++ + + + +++الاسر المنتجة
++++ + ++ ++ + + \ No newline at end of file diff --git a/odex25_takaful/takaful_portal_benefit/views/food_surplus.xml b/odex25_takaful/takaful_portal_benefit/views/food_surplus.xml new file mode 100644 index 000000000..668fb9098 --- /dev/null +++ b/odex25_takaful/takaful_portal_benefit/views/food_surplus.xml @@ -0,0 +1,251 @@ +زكاة الاضاحي ++ + + +++ + + +++زكاة الاضاحي
++++ ++ ++ + + + \ No newline at end of file diff --git a/odex25_takaful/takaful_portal_benefit/views/good_loan.xml b/odex25_takaful/takaful_portal_benefit/views/good_loan.xml new file mode 100644 index 000000000..4d8e4997e --- /dev/null +++ b/odex25_takaful/takaful_portal_benefit/views/good_loan.xml @@ -0,0 +1,55 @@ +فائض الطعام ++ + + + + + +++ + + +++فائض الطعام
++ ++أضف فائض طعام + +
أضف مطعم +
+ + ++فائض الطعام ++ + + +++ + + +++فائض الطعام
++++ ++ ++ + + \ No newline at end of file diff --git a/odex25_takaful/takaful_portal_benefit/views/profile.xml b/odex25_takaful/takaful_portal_benefit/views/profile.xml new file mode 100644 index 000000000..2162f549b --- /dev/null +++ b/odex25_takaful/takaful_portal_benefit/views/profile.xml @@ -0,0 +1,724 @@ +القرض الحسن ++ + + +++++القرض الحسن
++++++ ++++ +++ +++ +++ +++ +++ +++ + ++ ++ +++ + + \ No newline at end of file diff --git a/odex25_takaful/takaful_portal_benefit/views/urgent_needs.xml b/odex25_takaful/takaful_portal_benefit/views/urgent_needs.xml new file mode 100644 index 000000000..f27e8aa43 --- /dev/null +++ b/odex25_takaful/takaful_portal_benefit/views/urgent_needs.xml @@ -0,0 +1,86 @@ +الملف الشخصي ++ + + +++ + + + + + +++الملف الشخصي
+ + ++++++ + تعديل +++ ++++ +++ +++ +++ +++ +++ ++++ ++ +++++ + +++ + +++ +++ +++ +++ +++ +++ +++ +++ + +++ +++ ++++ +++++ + تعديل +++ ++++ +++ +++ +++ +++ +++ +++ +++ +++ +++ +++ +++ +++ +++++ ++ + تعديل +++++ +++ + +++
+ ++ ++ + +++
+ +++ ++أضف معال جديد +
+ ++ +
++ + + + +الرقم +اسم المعال +الجنس +العلاقة +تاريخ الميلاد +رقم الهوية +ملف اثبات الهوية +حذف ++++ ++ +
++ + + + + +الاسم +القيمة +الحالة +التاريخ ++ ++ +أضف مصروف جديد +
+ ++ +
++ + + + +الرقم +الاسم +المصروفات +نوع الرسوم +المبلغ +الدواء +المرض +المواصلات +الدين +سبب الدين +شرح الجائحة +الحالة +المرفقات ++ + + \ No newline at end of file diff --git a/odex25_takaful/takaful_portal_benefit/views/zakat.xml b/odex25_takaful/takaful_portal_benefit/views/zakat.xml new file mode 100644 index 000000000..9b4f003c5 --- /dev/null +++ b/odex25_takaful/takaful_portal_benefit/views/zakat.xml @@ -0,0 +1,154 @@ +الاحتياجات الطارئة ++ + + +++ + +++الاحتياجات الطارئة
++++++ + ++++ + +++ + +++ + +++ +++ +++ +++ + +++
+ +++ +++ +++ + + \ No newline at end of file diff --git a/odex25_takaful/takaful_portal_sponsor/__init__.py b/odex25_takaful/takaful_portal_sponsor/__init__.py new file mode 100644 index 000000000..457bae27e --- /dev/null +++ b/odex25_takaful/takaful_portal_sponsor/__init__.py @@ -0,0 +1,3 @@ +# -*- coding: utf-8 -*- + +from . import controllers \ No newline at end of file diff --git a/odex25_takaful/takaful_portal_sponsor/__manifest__.py b/odex25_takaful/takaful_portal_sponsor/__manifest__.py new file mode 100644 index 000000000..ccdbd961a --- /dev/null +++ b/odex25_takaful/takaful_portal_sponsor/__manifest__.py @@ -0,0 +1,37 @@ +# -*- coding: utf-8 -*- +{ + 'name': "Takaful Sponsor Portal", + + 'summary': """ + Web portal fo takafaul sponsor """, + + 'description': """ + Long description of module's purpose + """, + + 'author': "Expert Ltd.", + 'website': "https://www.exp-sa.com", + 'category': 'Odex25-Takaful/Odex25-Takaful', + 'version': '0.1', + + # any module necessary for this one to work correctly + 'depends': ['base','website'], + + # always loaded + 'data': [ + 'views/kafel_header.xml', + 'views/kafel.xml', + 'views/makfoul_details.xml', + 'views/need_kafala_details.xml', + 'views/financial_record.xml', + 'views/notifications.xml', + 'views/notifications_settings.xml', + 'views/certificates_settings.xml', + 'views/profile.xml', + 'views/assets.xml', + ], + # only loaded in demonstration mode + 'installable': True, + 'auto_install': False, + 'application': True, +} \ No newline at end of file diff --git a/odex25_takaful/takaful_portal_sponsor/controllers/__init__.py b/odex25_takaful/takaful_portal_sponsor/controllers/__init__.py new file mode 100644 index 000000000..457bae27e --- /dev/null +++ b/odex25_takaful/takaful_portal_sponsor/controllers/__init__.py @@ -0,0 +1,3 @@ +# -*- coding: utf-8 -*- + +from . import controllers \ No newline at end of file diff --git a/odex25_takaful/takaful_portal_sponsor/controllers/controllers.py b/odex25_takaful/takaful_portal_sponsor/controllers/controllers.py new file mode 100644 index 000000000..dcc45b57f --- /dev/null +++ b/odex25_takaful/takaful_portal_sponsor/controllers/controllers.py @@ -0,0 +1,88 @@ +# -*- coding: utf-8 -*- +from odoo import http +import json +import requests +# from odoo.addons.takaful_rest_api.controllers.sponsor_web_controller import ControllerPortalREST + +class TakafulSponsorPortal(http.Controller): + + # kafel routes + @http.route('/guarantees', type='http', auth='public', website=True) + def my_guarantees(self, page=1, **kw): + return http.request.render("takaful_portal_sponsor.my_guarantees") + + @http.route('/sadad', type='http', auth='public', website=True) + def sadad(self, **kw): + return http.request.render("takaful_portal_sponsor.sadad") + + @http.route('/need_kafala', type='http', auth='public', website=True) + def need_kafala(self, **kw): + return http.request.render("takaful_portal_sponsor.need_kafala") + + @http.route('/orphan_needs', type='http', auth='public', website=True) + def orphan_needs(self, **kw): + return http.request.render("takaful_portal_sponsor.orphan_needs") + + @http.route('/kafala_gift', type='http', auth='public', website=True) + def kafala_gift(self, **kw): + return http.request.render("takaful_portal_sponsor.kafala_gift") + + @http.route('/general_needs', type='http', auth='public', website=True) + def general_needs(self, **kw): + return http.request.render("takaful_portal_sponsor.general_needs") + + @http.route('/cancel_kafala', type='http', auth='public', website=True) + def cancel_kafala(self, **kw): + return http.request.render("takaful_portal_sponsor.cancel_kafala") + + @http.route('/makfoul_details', type='http', auth='public', website=True) + def my_page(self, **kwargs): + my_id = kwargs.get('benefit_type', 'default_value') + user_type = kwargs.get('benefit_id', 'default_value') + return http.request.render('takaful_portal_sponsor.makfoul_details', { + 'my_id': my_id, + 'user_type': user_type, + }) + + @http.route('/need_kafala_details', type='http', auth='public', website=True) + def need_kafala_details(self, **kwargs): + my_id = kwargs.get('benefit_type', 'default_value') + user_type = kwargs.get('benefit_id', 'default_value') + return http.request.render('takaful_portal_sponsor.need_kafala_details', { + 'my_id': my_id, + 'user_type': user_type, + }) + + @http.route('/paied_record', type='http', auth='public', website=True) + def paied_record(self, **kw): + return http.request.render("takaful_portal_sponsor.paied_record") + + @http.route('/delayed_record', type='http', auth='public', website=True) + def delayed_record(self, **kw): + return http.request.render("takaful_portal_sponsor.delayed_record") + + @http.route('/notifications', type='http', auth='public', website=True) + def get_notifications(self, **kwargs): + is_read = kwargs.get('is_read', 'default_value') + return http.request.render('takaful_portal_sponsor.all_notifications', { + 'is_read': is_read + }) + + @http.route('/notifications_details', type='http', auth='public', website=True) + def notifications_details(self, **kwargs): + notify_id = kwargs.get('id', 'default_value') + return http.request.render('takaful_portal_sponsor.notifications_details', { + 'id': notify_id + }) + + @http.route('/certificates_settings', type='http', auth='public', website=True) + def certificates_settings(self, **kw): + return http.request.render("takaful_portal_sponsor.certificates_settings") + + @http.route('/notifications_settings', type='http', auth='public', website=True) + def notifications_settings(self, **kw): + return http.request.render("takaful_portal_sponsor.notifications_settings") + + @http.route('/sponsor_profile', type='http', auth='public', website=True) + def sponsor_profile(self, **kw): + return http.request.render("takaful_portal_sponsor.sponsor_profile") diff --git a/odex25_takaful/takaful_portal_sponsor/static/css/main.css b/odex25_takaful/takaful_portal_sponsor/static/css/main.css new file mode 100644 index 000000000..dd22d790d --- /dev/null +++ b/odex25_takaful/takaful_portal_sponsor/static/css/main.css @@ -0,0 +1,114 @@ +.attach_img { + width: 100%; + display: flex; + align-items: center; + justify-content: center; + position: relative; + margin-bottom: 40px; +} +.attach_img #user_profile_img { + width: 112px; + height: 112px; +} +.attach_img .wraper { + position: absolute; + width: 130px; + right: 45%; + transform: translate(95%, -50%); + top: 50%; +} +.attach_img .wraper input { + position: absolute; + width: 100%; + height: 100%; + opacity: 0; + z-index: 10; +} +.attach_img .wraper .img_upload { + display: flex; + align-items: center; + justify-content: center; + flex-direction: row-reverse; +} + +.input-group-text { + z-index: 10; +} + +/* kafalaty */ +#benefits-type, +#benefit-type { + background: transparent; + border: none; + outline: none !important; + color: #355692; +} + +#sponsorship_cancelation .modal-body p { + font-weight: 600; + font-size: 18px; + margin-bottom: 24px; +} +@media (max-width: 575px) { + #sponsorship_cancelation .modal-body p { + font-size: 15px; + } +} +#sponsorship_cancelation .modal-footer { + display: flex; + align-items: center; + gap: 18px; +} +#sponsorship_cancelation .modal-footer .btn-outline-danger { + margin: 0 !important; + background-color: transparent !important; + border: 1px solid #DC3A08 !important; + color: #DC3A08 !important; +} + +.success_res, +.error_res { + display: none; +} + +.notification_wrapper { + font-family: "Changa-Regular"; +} + +/* Hide the default dropdown arrow */ +select#benefit_ids { + -webkit-appearance: none; + -moz-appearance: none; + appearance: none; + padding-right: 25px; + /* Add space for the custom arrow */ + background: transparent; + border: 1px solid #ccc; + border-radius: 4px; + font-size: 14px; + line-height: 1.5; + padding: 8px; + width: 200px; +} + +/* Custom dropdown arrow */ +select#benefit_ids::after { + content: ""; + width: 0; + height: 0; + border-style: solid; + border-width: 6px 5px 0 5px; + border-color: #999 transparent transparent transparent; + position: absolute; + right: 10px; + top: 50%; + transform: translateY(-50%); + pointer-events: none; +} + +/* Style when the select element is focused */ +select#benefit_ids:focus { + outline: none; + border-color: #999; + box-shadow: 0 0 0 1px #999; +}/*# sourceMappingURL=main.css.map */ \ No newline at end of file diff --git a/odex25_takaful/takaful_portal_sponsor/static/css/main.css.map b/odex25_takaful/takaful_portal_sponsor/static/css/main.css.map new file mode 100644 index 000000000..7089d74b9 --- /dev/null +++ b/odex25_takaful/takaful_portal_sponsor/static/css/main.css.map @@ -0,0 +1 @@ +{"version":3,"sources":["main.scss","main.css"],"names":[],"mappings":"AAQA;EACI,WAAA;EACA,aAAA;EACA,mBAAA;EACA,uBAAA;EACA,kBAAA;EACA,mBAAA;ACPJ;ADSI;EACI,YAAA;EACA,aAAA;ACPR;ADUI;EACI,kBAAA;EACA,YAAA;EACA,UAAA;EACA,+BAAA;EACA,QAAA;ACRR;ADUQ;EACI,kBAAA;EACA,WAAA;EACA,YAAA;EACA,UAAA;EACA,WAAA;ACRZ;ADYQ;EACI,aAAA;EACA,mBAAA;EACA,uBAAA;EACA,2BAAA;ACVZ;;ADeA;EACI,WAAA;ACZJ;;ADkBA,aAAA;AAEA;;EAEI,uBAAA;EACA,YAAA;EACA,wBAAA;EACA,cAxDQ;ACwCZ;;ADuBQ;EACI,gBAAA;EACA,eAAA;EACA,mBAAA;ACpBZ;ADsBY;EALJ;IAMQ,eAAA;ECnBd;AACF;ADuBI;EACI,aAAA;EACA,mBAAA;EACA,SAAA;ACrBR;ADuBQ;EACI,oBAAA;EACA,wCAAA;EACA,oCAAA;EACA,yBAAA;ACrBZ;;AD0BA;;EAEI,aAAA;ACvBJ;;AD0BA;EACI,6BAlGE;AC2EN;;AD4BA,oCAAA;AACA;EACI,wBAAA;EACA,qBAAA;EACA,gBAAA;EACA,mBAAA;EACA,mCAAA;EACA,uBAAA;EACA,sBAAA;EACA,kBAAA;EACA,eAAA;EACA,gBAAA;EACA,YAAA;EACA,YAAA;ACzBJ;;AD4BA,0BAAA;AACA;EACI,WAAA;EACA,QAAA;EACA,SAAA;EACA,mBAAA;EACA,2BAAA;EACA,sDAAA;EACA,kBAAA;EACA,WAAA;EACA,QAAA;EACA,2BAAA;EACA,oBAAA;ACzBJ;;AD4BA,6CAAA;AACA;EACI,aAAA;EACA,kBAAA;EACA,0BAAA;ACzBJ","file":"main.css"} \ No newline at end of file diff --git a/odex25_takaful/takaful_portal_sponsor/static/css/main.scss b/odex25_takaful/takaful_portal_sponsor/static/css/main.scss new file mode 100644 index 000000000..496af686c --- /dev/null +++ b/odex25_takaful/takaful_portal_sponsor/static/css/main.scss @@ -0,0 +1,140 @@ +$reg: "Changa-Regular"; +$medium: "Changa-Medium"; +$semiBold: "Changa-SemiBold"; +$bold: "Changa-Bold"; +$mainColor: #355692; +$darkBlue: #091C3F; + + +.attach_img { + width: 100%; + display: flex; + align-items: center; + justify-content: center; + position: relative; + margin-bottom: 40px; + + #user_profile_img { + width: 112px; + height: 112px; + } + + .wraper { + position: absolute; + width: 130px; + right: 45%; + transform: translate(95%, -50%); + top: 50%; + + input { + position: absolute; + width: 100%; + height: 100%; + opacity: 0; + z-index: 10; + + } + + .img_upload { + display: flex; + align-items: center; + justify-content: center; + flex-direction: row-reverse; + } + } +} + +.input-group-text { + z-index: 10; +} + + + + +/* kafalaty */ + +#benefits-type, +#benefit-type { + background: transparent; + border: none; + outline: none !important; + color: $mainColor; +} + +//cancel kafala modal + +#sponsorship_cancelation { + .modal-body { + p { + font-weight: 600; + font-size: 18px; + margin-bottom: 24px; + + @media(max-width:575px) { + font-size: 15px; + } + } + } + + .modal-footer { + display: flex; + align-items: center; + gap: 18px; + + .btn-outline-danger { + margin: 0 !important; + background-color: transparent !important; + border: 1px solid #DC3A08 !important; + color: #DC3A08 !important; + } + } +} + +.success_res, +.error_res { + display: none; +} + +.notification_wrapper { + font-family: $reg; +} + +#benefit_ids {} + +/* Hide the default dropdown arrow */ +select#benefit_ids { + -webkit-appearance: none; + -moz-appearance: none; + appearance: none; + padding-right: 25px; + /* Add space for the custom arrow */ + background: transparent; + border: 1px solid #ccc; + border-radius: 4px; + font-size: 14px; + line-height: 1.5; + padding: 8px; + width: 200px; +} + +/* Custom dropdown arrow */ +select#benefit_ids::after { + content: ''; + width: 0; + height: 0; + border-style: solid; + border-width: 6px 5px 0 5px; + border-color: #999 transparent transparent transparent; + position: absolute; + right: 10px; + top: 50%; + transform: translateY(-50%); + pointer-events: none; +} + +/* Style when the select element is focused */ +select#benefit_ids:focus { + outline: none; + border-color: #999; + box-shadow: 0 0 0 1px #999; +} \ No newline at end of file diff --git a/odex25_takaful/takaful_portal_sponsor/static/css/notifications.css b/odex25_takaful/takaful_portal_sponsor/static/css/notifications.css new file mode 100644 index 000000000..b5e1e879e --- /dev/null +++ b/odex25_takaful/takaful_portal_sponsor/static/css/notifications.css @@ -0,0 +1,32 @@ +.noti_content { + margin-bottom: 24px; +} + +.single_notification .dropdown { + width: -moz-fit-content; + width: fit-content; + position: absolute; + top: 16px; + left: 16px; +} +.single_notification .dropdown .dropdown-toggle { + border: none; + background: transparent; + outline: none; + margin: 0; +} +.single_notification .dropdown .dropdown-menu .delete_noti { + display: block; + text-align: center; + margin: 0; + padding: 4px 12px; + color: #f00; + text-align: center; + font-weight: bold; +} + +.certificate_setting_feedback, .notifications_update_feedback { + display: none; + font-weight: bold; + text-align: center; +}/*# sourceMappingURL=notifications.css.map */ \ No newline at end of file diff --git a/odex25_takaful/takaful_portal_sponsor/static/css/notifications.css.map b/odex25_takaful/takaful_portal_sponsor/static/css/notifications.css.map new file mode 100644 index 000000000..7ce4cd4d2 --- /dev/null +++ b/odex25_takaful/takaful_portal_sponsor/static/css/notifications.css.map @@ -0,0 +1 @@ +{"version":3,"sources":["notifications.scss","notifications.css"],"names":[],"mappings":"AAAA;EACI,mBAAA;ACCJ;;ADGI;EACI,uBAAA;EAAA,kBAAA;EACA,kBAAA;EACA,SAAA;EACA,UAAA;ACAR;ADCQ;EACI,YAAA;EACA,uBAAA;EACA,aAAA;EACA,SAAA;ACCZ;ADEY;EACI,cAAA;EACA,kBAAA;EACA,SAAA;EACA,iBAAA;EACA,WAAA;EACA,kBAAA;EACA,iBAAA;ACAhB;;ADMA;EACI,aAAA;EACA,iBAAA;EACA,kBAAA;ACHJ","file":"notifications.css"} \ No newline at end of file diff --git a/odex25_takaful/takaful_portal_sponsor/static/css/notifications.scss b/odex25_takaful/takaful_portal_sponsor/static/css/notifications.scss new file mode 100644 index 000000000..f758f28e9 --- /dev/null +++ b/odex25_takaful/takaful_portal_sponsor/static/css/notifications.scss @@ -0,0 +1,35 @@ +.noti_content { + margin-bottom: 24px; +} + +.single_notification { + .dropdown { + width: fit-content; + position: absolute; + top: 16px; + left: 16px; + .dropdown-toggle{ + border: none; + background: transparent; + outline: none; + margin: 0; + } + .dropdown-menu{ + .delete_noti{ + display: block; + text-align: center; + margin: 0; + padding: 4px 12px; + color: #f00; + text-align: center; + font-weight: bold; + } + } + } +} + +.certificate_setting_feedback, .notifications_update_feedback{ + display: none; + font-weight: bold; + text-align: center; +} \ No newline at end of file diff --git a/odex25_takaful/takaful_portal_sponsor/static/css/select2.min.css b/odex25_takaful/takaful_portal_sponsor/static/css/select2.min.css new file mode 100644 index 000000000..7c18ad59d --- /dev/null +++ b/odex25_takaful/takaful_portal_sponsor/static/css/select2.min.css @@ -0,0 +1 @@ +.select2-container{box-sizing:border-box;display:inline-block;margin:0;position:relative;vertical-align:middle}.select2-container .select2-selection--single{box-sizing:border-box;cursor:pointer;display:block;height:28px;user-select:none;-webkit-user-select:none}.select2-container .select2-selection--single .select2-selection__rendered{display:block;padding-left:8px;padding-right:20px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.select2-container .select2-selection--single .select2-selection__clear{position:relative}.select2-container[dir="rtl"] .select2-selection--single .select2-selection__rendered{padding-right:8px;padding-left:20px}.select2-container .select2-selection--multiple{box-sizing:border-box;cursor:pointer;display:block;min-height:32px;user-select:none;-webkit-user-select:none}.select2-container .select2-selection--multiple .select2-selection__rendered{display:inline-block;overflow:hidden;padding-left:8px;text-overflow:ellipsis;white-space:nowrap}.select2-container .select2-search--inline{float:left}.select2-container .select2-search--inline .select2-search__field{box-sizing:border-box;border:none;font-size:100%;margin-top:5px;padding:0}.select2-container .select2-search--inline .select2-search__field::-webkit-search-cancel-button{-webkit-appearance:none}.select2-dropdown{background-color:white;border:1px solid #aaa;border-radius:4px;box-sizing:border-box;display:block;position:absolute;left:-100000px;width:100%;z-index:1051}.select2-results{display:block}.select2-results__options{list-style:none;margin:0;padding:0}.select2-results__option{padding:6px;user-select:none;-webkit-user-select:none}.select2-results__option[aria-selected]{cursor:pointer}.select2-container--open .select2-dropdown{left:0}.select2-container--open .select2-dropdown--above{border-bottom:none;border-bottom-left-radius:0;border-bottom-right-radius:0}.select2-container--open .select2-dropdown--below{border-top:none;border-top-left-radius:0;border-top-right-radius:0}.select2-search--dropdown{display:block;padding:4px}.select2-search--dropdown .select2-search__field{padding:4px;width:100%;box-sizing:border-box}.select2-search--dropdown .select2-search__field::-webkit-search-cancel-button{-webkit-appearance:none}.select2-search--dropdown.select2-search--hide{display:none}.select2-close-mask{border:0;margin:0;padding:0;display:block;position:fixed;left:0;top:0;min-height:100%;min-width:100%;height:auto;width:auto;opacity:0;z-index:99;background-color:#fff;filter:alpha(opacity=0)}.select2-hidden-accessible{border:0 !important;clip:rect(0 0 0 0) !important;-webkit-clip-path:inset(50%) !important;clip-path:inset(50%) !important;height:1px !important;overflow:hidden !important;padding:0 !important;position:absolute !important;width:1px !important;white-space:nowrap !important}.select2-container--default .select2-selection--single{background-color:#fff;border:1px solid #aaa;border-radius:4px}.select2-container--default .select2-selection--single .select2-selection__rendered{color:#444;line-height:28px}.select2-container--default .select2-selection--single .select2-selection__clear{cursor:pointer;float:right;font-weight:bold}.select2-container--default .select2-selection--single .select2-selection__placeholder{color:#999}.select2-container--default .select2-selection--single .select2-selection__arrow{height:26px;position:absolute;top:1px;right:1px;width:20px}.select2-container--default .select2-selection--single .select2-selection__arrow b{border-color:#888 transparent transparent transparent;border-style:solid;border-width:5px 4px 0 4px;height:0;left:50%;margin-left:-4px;margin-top:-2px;position:absolute;top:50%;width:0}.select2-container--default[dir="rtl"] .select2-selection--single .select2-selection__clear{float:left}.select2-container--default[dir="rtl"] .select2-selection--single .select2-selection__arrow{left:1px;right:auto}.select2-container--default.select2-container--disabled .select2-selection--single{background-color:#eee;cursor:default}.select2-container--default.select2-container--disabled .select2-selection--single .select2-selection__clear{display:none}.select2-container--default.select2-container--open .select2-selection--single .select2-selection__arrow b{border-color:transparent transparent #888 transparent;border-width:0 4px 5px 4px}.select2-container--default .select2-selection--multiple{background-color:white;border:1px solid #aaa;border-radius:4px;cursor:text}.select2-container--default .select2-selection--multiple .select2-selection__rendered{box-sizing:border-box;list-style:none;margin:0;padding:0 5px;width:100%}.select2-container--default .select2-selection--multiple .select2-selection__rendered li{list-style:none}.select2-container--default .select2-selection--multiple .select2-selection__clear{cursor:pointer;float:right;font-weight:bold;margin-top:5px;margin-right:10px;padding:1px}.select2-container--default .select2-selection--multiple .select2-selection__choice{background-color:#e4e4e4;border:1px solid #aaa;border-radius:4px;cursor:default;float:left;margin-right:5px;margin-top:5px;padding:0 5px}.select2-container--default .select2-selection--multiple .select2-selection__choice__remove{color:#999;cursor:pointer;display:inline-block;font-weight:bold;margin-right:2px}.select2-container--default .select2-selection--multiple .select2-selection__choice__remove:hover{color:#333}.select2-container--default[dir="rtl"] .select2-selection--multiple .select2-selection__choice,.select2-container--default[dir="rtl"] .select2-selection--multiple .select2-search--inline{float:right}.select2-container--default[dir="rtl"] .select2-selection--multiple .select2-selection__choice{margin-left:5px;margin-right:auto}.select2-container--default[dir="rtl"] .select2-selection--multiple .select2-selection__choice__remove{margin-left:2px;margin-right:auto}.select2-container--default.select2-container--focus .select2-selection--multiple{border:solid black 1px;outline:0}.select2-container--default.select2-container--disabled .select2-selection--multiple{background-color:#eee;cursor:default}.select2-container--default.select2-container--disabled .select2-selection__choice__remove{display:none}.select2-container--default.select2-container--open.select2-container--above .select2-selection--single,.select2-container--default.select2-container--open.select2-container--above .select2-selection--multiple{border-top-left-radius:0;border-top-right-radius:0}.select2-container--default.select2-container--open.select2-container--below .select2-selection--single,.select2-container--default.select2-container--open.select2-container--below .select2-selection--multiple{border-bottom-left-radius:0;border-bottom-right-radius:0}.select2-container--default .select2-search--dropdown .select2-search__field{border:1px solid #aaa}.select2-container--default .select2-search--inline .select2-search__field{background:transparent;border:none;outline:0;box-shadow:none;-webkit-appearance:textfield}.select2-container--default .select2-results>.select2-results__options{max-height:200px;overflow-y:auto}.select2-container--default .select2-results__option[role=group]{padding:0}.select2-container--default .select2-results__option[aria-disabled=true]{color:#999}.select2-container--default .select2-results__option[aria-selected=true]{background-color:#ddd}.select2-container--default .select2-results__option .select2-results__option{padding-left:1em}.select2-container--default .select2-results__option .select2-results__option .select2-results__group{padding-left:0}.select2-container--default .select2-results__option .select2-results__option .select2-results__option{margin-left:-1em;padding-left:2em}.select2-container--default .select2-results__option .select2-results__option .select2-results__option .select2-results__option{margin-left:-2em;padding-left:3em}.select2-container--default .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option{margin-left:-3em;padding-left:4em}.select2-container--default .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option{margin-left:-4em;padding-left:5em}.select2-container--default .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option{margin-left:-5em;padding-left:6em}.select2-container--default .select2-results__option--highlighted[aria-selected]{background-color:#5897fb;color:white}.select2-container--default .select2-results__group{cursor:default;display:block;padding:6px}.select2-container--classic .select2-selection--single{background-color:#f7f7f7;border:1px solid #aaa;border-radius:4px;outline:0;background-image:-webkit-linear-gradient(top, #fff 50%, #eee 100%);background-image:-o-linear-gradient(top, #fff 50%, #eee 100%);background-image:linear-gradient(to bottom, #fff 50%, #eee 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFFFFFFF', endColorstr='#FFEEEEEE', GradientType=0)}.select2-container--classic .select2-selection--single:focus{border:1px solid #5897fb}.select2-container--classic .select2-selection--single .select2-selection__rendered{color:#444;line-height:28px}.select2-container--classic .select2-selection--single .select2-selection__clear{cursor:pointer;float:right;font-weight:bold;margin-right:10px}.select2-container--classic .select2-selection--single .select2-selection__placeholder{color:#999}.select2-container--classic .select2-selection--single .select2-selection__arrow{background-color:#ddd;border:none;border-left:1px solid #aaa;border-top-right-radius:4px;border-bottom-right-radius:4px;height:26px;position:absolute;top:1px;right:1px;width:20px;background-image:-webkit-linear-gradient(top, #eee 50%, #ccc 100%);background-image:-o-linear-gradient(top, #eee 50%, #ccc 100%);background-image:linear-gradient(to bottom, #eee 50%, #ccc 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFEEEEEE', endColorstr='#FFCCCCCC', GradientType=0)}.select2-container--classic .select2-selection--single .select2-selection__arrow b{border-color:#888 transparent transparent transparent;border-style:solid;border-width:5px 4px 0 4px;height:0;left:50%;margin-left:-4px;margin-top:-2px;position:absolute;top:50%;width:0}.select2-container--classic[dir="rtl"] .select2-selection--single .select2-selection__clear{float:left}.select2-container--classic[dir="rtl"] .select2-selection--single .select2-selection__arrow{border:none;border-right:1px solid #aaa;border-radius:0;border-top-left-radius:4px;border-bottom-left-radius:4px;left:1px;right:auto}.select2-container--classic.select2-container--open .select2-selection--single{border:1px solid #5897fb}.select2-container--classic.select2-container--open .select2-selection--single .select2-selection__arrow{background:transparent;border:none}.select2-container--classic.select2-container--open .select2-selection--single .select2-selection__arrow b{border-color:transparent transparent #888 transparent;border-width:0 4px 5px 4px}.select2-container--classic.select2-container--open.select2-container--above .select2-selection--single{border-top:none;border-top-left-radius:0;border-top-right-radius:0;background-image:-webkit-linear-gradient(top, #fff 0%, #eee 50%);background-image:-o-linear-gradient(top, #fff 0%, #eee 50%);background-image:linear-gradient(to bottom, #fff 0%, #eee 50%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFFFFFFF', endColorstr='#FFEEEEEE', GradientType=0)}.select2-container--classic.select2-container--open.select2-container--below .select2-selection--single{border-bottom:none;border-bottom-left-radius:0;border-bottom-right-radius:0;background-image:-webkit-linear-gradient(top, #eee 50%, #fff 100%);background-image:-o-linear-gradient(top, #eee 50%, #fff 100%);background-image:linear-gradient(to bottom, #eee 50%, #fff 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFEEEEEE', endColorstr='#FFFFFFFF', GradientType=0)}.select2-container--classic .select2-selection--multiple{background-color:white;border:1px solid #aaa;border-radius:4px;cursor:text;outline:0}.select2-container--classic .select2-selection--multiple:focus{border:1px solid #5897fb}.select2-container--classic .select2-selection--multiple .select2-selection__rendered{list-style:none;margin:0;padding:0 5px}.select2-container--classic .select2-selection--multiple .select2-selection__clear{display:none}.select2-container--classic .select2-selection--multiple .select2-selection__choice{background-color:#e4e4e4;border:1px solid #aaa;border-radius:4px;cursor:default;float:left;margin-right:5px;margin-top:5px;padding:0 5px}.select2-container--classic .select2-selection--multiple .select2-selection__choice__remove{color:#888;cursor:pointer;display:inline-block;font-weight:bold;margin-right:2px}.select2-container--classic .select2-selection--multiple .select2-selection__choice__remove:hover{color:#555}.select2-container--classic[dir="rtl"] .select2-selection--multiple .select2-selection__choice{float:right;margin-left:5px;margin-right:auto}.select2-container--classic[dir="rtl"] .select2-selection--multiple .select2-selection__choice__remove{margin-left:2px;margin-right:auto}.select2-container--classic.select2-container--open .select2-selection--multiple{border:1px solid #5897fb}.select2-container--classic.select2-container--open.select2-container--above .select2-selection--multiple{border-top:none;border-top-left-radius:0;border-top-right-radius:0}.select2-container--classic.select2-container--open.select2-container--below .select2-selection--multiple{border-bottom:none;border-bottom-left-radius:0;border-bottom-right-radius:0}.select2-container--classic .select2-search--dropdown .select2-search__field{border:1px solid #aaa;outline:0}.select2-container--classic .select2-search--inline .select2-search__field{outline:0;box-shadow:none}.select2-container--classic .select2-dropdown{background-color:#fff;border:1px solid transparent}.select2-container--classic .select2-dropdown--above{border-bottom:none}.select2-container--classic .select2-dropdown--below{border-top:none}.select2-container--classic .select2-results>.select2-results__options{max-height:200px;overflow-y:auto}.select2-container--classic .select2-results__option[role=group]{padding:0}.select2-container--classic .select2-results__option[aria-disabled=true]{color:grey}.select2-container--classic .select2-results__option--highlighted[aria-selected]{background-color:#3875d7;color:#fff}.select2-container--classic .select2-results__group{cursor:default;display:block;padding:6px}.select2-container--classic.select2-container--open .select2-dropdown{border-color:#5897fb} diff --git a/odex25_takaful/takaful_portal_sponsor/static/img/1-172.png b/odex25_takaful/takaful_portal_sponsor/static/img/1-172.png new file mode 100644 index 000000000..54ebdfad7 Binary files /dev/null and b/odex25_takaful/takaful_portal_sponsor/static/img/1-172.png differ diff --git a/odex25_takaful/takaful_portal_sponsor/static/img/Ellipse 1376.png b/odex25_takaful/takaful_portal_sponsor/static/img/Ellipse 1376.png new file mode 100644 index 000000000..7f926ce7f Binary files /dev/null and b/odex25_takaful/takaful_portal_sponsor/static/img/Ellipse 1376.png differ diff --git a/odex25_takaful/takaful_portal_sponsor/static/img/Group 18199.png b/odex25_takaful/takaful_portal_sponsor/static/img/Group 18199.png new file mode 100644 index 000000000..6ad019681 Binary files /dev/null and b/odex25_takaful/takaful_portal_sponsor/static/img/Group 18199.png differ diff --git a/odex25_takaful/takaful_portal_sponsor/static/img/Group 18200.png b/odex25_takaful/takaful_portal_sponsor/static/img/Group 18200.png new file mode 100644 index 000000000..3e75f468f Binary files /dev/null and b/odex25_takaful/takaful_portal_sponsor/static/img/Group 18200.png differ diff --git a/odex25_takaful/takaful_portal_sponsor/static/img/Group 18201.png b/odex25_takaful/takaful_portal_sponsor/static/img/Group 18201.png new file mode 100644 index 000000000..04edf0c5b Binary files /dev/null and b/odex25_takaful/takaful_portal_sponsor/static/img/Group 18201.png differ diff --git a/odex25_takaful/takaful_portal_sponsor/static/img/Group 18202.png b/odex25_takaful/takaful_portal_sponsor/static/img/Group 18202.png new file mode 100644 index 000000000..18c4055cf Binary files /dev/null and b/odex25_takaful/takaful_portal_sponsor/static/img/Group 18202.png differ diff --git a/odex25_takaful/takaful_portal_sponsor/static/img/Group 18203.png b/odex25_takaful/takaful_portal_sponsor/static/img/Group 18203.png new file mode 100644 index 000000000..275404f68 Binary files /dev/null and b/odex25_takaful/takaful_portal_sponsor/static/img/Group 18203.png differ diff --git a/odex25_takaful/takaful_portal_sponsor/static/img/Gurantees/cancel.png b/odex25_takaful/takaful_portal_sponsor/static/img/Gurantees/cancel.png new file mode 100644 index 000000000..e8fe40a39 Binary files /dev/null and b/odex25_takaful/takaful_portal_sponsor/static/img/Gurantees/cancel.png differ diff --git a/odex25_takaful/takaful_portal_sponsor/static/img/Gurantees/cash1.png b/odex25_takaful/takaful_portal_sponsor/static/img/Gurantees/cash1.png new file mode 100644 index 000000000..c9c586a45 Binary files /dev/null and b/odex25_takaful/takaful_portal_sponsor/static/img/Gurantees/cash1.png differ diff --git a/odex25_takaful/takaful_portal_sponsor/static/img/Gurantees/cashback.png b/odex25_takaful/takaful_portal_sponsor/static/img/Gurantees/cashback.png new file mode 100644 index 000000000..865d142ec Binary files /dev/null and b/odex25_takaful/takaful_portal_sponsor/static/img/Gurantees/cashback.png differ diff --git a/odex25_takaful/takaful_portal_sponsor/static/img/Gurantees/gift.png b/odex25_takaful/takaful_portal_sponsor/static/img/Gurantees/gift.png new file mode 100644 index 000000000..c4d4f51c4 Binary files /dev/null and b/odex25_takaful/takaful_portal_sponsor/static/img/Gurantees/gift.png differ diff --git a/odex25_takaful/takaful_portal_sponsor/static/img/Gurantees/kafala_gama3ya.png b/odex25_takaful/takaful_portal_sponsor/static/img/Gurantees/kafala_gama3ya.png new file mode 100644 index 000000000..bb8d87e84 Binary files /dev/null and b/odex25_takaful/takaful_portal_sponsor/static/img/Gurantees/kafala_gama3ya.png differ diff --git a/odex25_takaful/takaful_portal_sponsor/static/img/Gurantees/kafalaty.png b/odex25_takaful/takaful_portal_sponsor/static/img/Gurantees/kafalaty.png new file mode 100644 index 000000000..6ce00db0b Binary files /dev/null and b/odex25_takaful/takaful_portal_sponsor/static/img/Gurantees/kafalaty.png differ diff --git a/odex25_takaful/takaful_portal_sponsor/static/img/Gurantees/trend.png b/odex25_takaful/takaful_portal_sponsor/static/img/Gurantees/trend.png new file mode 100644 index 000000000..53a9f8051 Binary files /dev/null and b/odex25_takaful/takaful_portal_sponsor/static/img/Gurantees/trend.png differ diff --git a/odex25_takaful/takaful_portal_sponsor/static/img/Gurantees/yateem.png b/odex25_takaful/takaful_portal_sponsor/static/img/Gurantees/yateem.png new file mode 100644 index 000000000..8b55181de Binary files /dev/null and b/odex25_takaful/takaful_portal_sponsor/static/img/Gurantees/yateem.png differ diff --git a/odex25_takaful/takaful_portal_sponsor/static/img/Icon awesome-plus.png b/odex25_takaful/takaful_portal_sponsor/static/img/Icon awesome-plus.png new file mode 100644 index 000000000..647557373 Binary files /dev/null and b/odex25_takaful/takaful_portal_sponsor/static/img/Icon awesome-plus.png differ diff --git a/odex25_takaful/takaful_portal_sponsor/static/img/Icon material-notifications-active.png b/odex25_takaful/takaful_portal_sponsor/static/img/Icon material-notifications-active.png new file mode 100644 index 000000000..ab3530031 Binary files /dev/null and b/odex25_takaful/takaful_portal_sponsor/static/img/Icon material-notifications-active.png differ diff --git a/odex25_takaful/takaful_portal_sponsor/static/img/Rectangle 4056.png b/odex25_takaful/takaful_portal_sponsor/static/img/Rectangle 4056.png new file mode 100644 index 000000000..898e01072 Binary files /dev/null and b/odex25_takaful/takaful_portal_sponsor/static/img/Rectangle 4056.png differ diff --git a/odex25_takaful/takaful_portal_sponsor/static/img/Rectangle 4061.png b/odex25_takaful/takaful_portal_sponsor/static/img/Rectangle 4061.png new file mode 100644 index 000000000..7d1f41de4 Binary files /dev/null and b/odex25_takaful/takaful_portal_sponsor/static/img/Rectangle 4061.png differ diff --git a/odex25_takaful/takaful_portal_sponsor/static/img/XMLID_1571_.png b/odex25_takaful/takaful_portal_sponsor/static/img/XMLID_1571_.png new file mode 100644 index 000000000..e75f110c7 Binary files /dev/null and b/odex25_takaful/takaful_portal_sponsor/static/img/XMLID_1571_.png differ diff --git a/odex25_takaful/takaful_portal_sponsor/static/img/XMLID_857_.png b/odex25_takaful/takaful_portal_sponsor/static/img/XMLID_857_.png new file mode 100644 index 000000000..2d293488a Binary files /dev/null and b/odex25_takaful/takaful_portal_sponsor/static/img/XMLID_857_.png differ diff --git a/odex25_takaful/takaful_portal_sponsor/static/img/arrow_down.png b/odex25_takaful/takaful_portal_sponsor/static/img/arrow_down.png new file mode 100644 index 000000000..5da163c77 Binary files /dev/null and b/odex25_takaful/takaful_portal_sponsor/static/img/arrow_down.png differ diff --git a/odex25_takaful/takaful_portal_sponsor/static/img/arrow_left.png b/odex25_takaful/takaful_portal_sponsor/static/img/arrow_left.png new file mode 100644 index 000000000..9d35d8e91 Binary files /dev/null and b/odex25_takaful/takaful_portal_sponsor/static/img/arrow_left.png differ diff --git a/odex25_takaful/takaful_portal_sponsor/static/img/arrow_right.png b/odex25_takaful/takaful_portal_sponsor/static/img/arrow_right.png new file mode 100644 index 000000000..f2869ec29 Binary files /dev/null and b/odex25_takaful/takaful_portal_sponsor/static/img/arrow_right.png differ diff --git a/odex25_takaful/takaful_portal_sponsor/static/img/attach_img.png b/odex25_takaful/takaful_portal_sponsor/static/img/attach_img.png new file mode 100644 index 000000000..a05ae94ae Binary files /dev/null and b/odex25_takaful/takaful_portal_sponsor/static/img/attach_img.png differ diff --git a/odex25_takaful/takaful_portal_sponsor/static/img/attatch.png b/odex25_takaful/takaful_portal_sponsor/static/img/attatch.png new file mode 100644 index 000000000..71951ce2f Binary files /dev/null and b/odex25_takaful/takaful_portal_sponsor/static/img/attatch.png differ diff --git a/odex25_takaful/takaful_portal_sponsor/static/img/avatar.png b/odex25_takaful/takaful_portal_sponsor/static/img/avatar.png new file mode 100644 index 000000000..c1c9445fd Binary files /dev/null and b/odex25_takaful/takaful_portal_sponsor/static/img/avatar.png differ diff --git a/odex25_takaful/takaful_portal_sponsor/static/img/banner.png b/odex25_takaful/takaful_portal_sponsor/static/img/banner.png new file mode 100644 index 000000000..dad69e67c Binary files /dev/null and b/odex25_takaful/takaful_portal_sponsor/static/img/banner.png differ diff --git a/odex25_takaful/takaful_portal_sponsor/static/img/bread_arrow.png b/odex25_takaful/takaful_portal_sponsor/static/img/bread_arrow.png new file mode 100644 index 000000000..68cd6e538 Binary files /dev/null and b/odex25_takaful/takaful_portal_sponsor/static/img/bread_arrow.png differ diff --git a/odex25_takaful/takaful_portal_sponsor/static/img/close.png b/odex25_takaful/takaful_portal_sponsor/static/img/close.png new file mode 100644 index 000000000..21924878c Binary files /dev/null and b/odex25_takaful/takaful_portal_sponsor/static/img/close.png differ diff --git a/odex25_takaful/takaful_portal_sponsor/static/img/credit.png b/odex25_takaful/takaful_portal_sponsor/static/img/credit.png new file mode 100644 index 000000000..0c59d55a6 Binary files /dev/null and b/odex25_takaful/takaful_portal_sponsor/static/img/credit.png differ diff --git a/odex25_takaful/takaful_portal_sponsor/static/img/document.png b/odex25_takaful/takaful_portal_sponsor/static/img/document.png new file mode 100644 index 000000000..7ab336f93 Binary files /dev/null and b/odex25_takaful/takaful_portal_sponsor/static/img/document.png differ diff --git a/odex25_takaful/takaful_portal_sponsor/static/img/dropdown.png b/odex25_takaful/takaful_portal_sponsor/static/img/dropdown.png new file mode 100644 index 000000000..369963467 Binary files /dev/null and b/odex25_takaful/takaful_portal_sponsor/static/img/dropdown.png differ diff --git a/odex25_takaful/takaful_portal_sponsor/static/img/employee.png b/odex25_takaful/takaful_portal_sponsor/static/img/employee.png new file mode 100644 index 000000000..3e75f468f Binary files /dev/null and b/odex25_takaful/takaful_portal_sponsor/static/img/employee.png differ diff --git a/odex25_takaful/takaful_portal_sponsor/static/img/file.png b/odex25_takaful/takaful_portal_sponsor/static/img/file.png new file mode 100644 index 000000000..73fd1de12 Binary files /dev/null and b/odex25_takaful/takaful_portal_sponsor/static/img/file.png differ diff --git a/odex25_takaful/takaful_portal_sponsor/static/img/footer-logo.png b/odex25_takaful/takaful_portal_sponsor/static/img/footer-logo.png new file mode 100644 index 000000000..dced3506f Binary files /dev/null and b/odex25_takaful/takaful_portal_sponsor/static/img/footer-logo.png differ diff --git a/odex25_takaful/takaful_portal_sponsor/static/img/gift_1.png b/odex25_takaful/takaful_portal_sponsor/static/img/gift_1.png new file mode 100644 index 000000000..4fceaebad Binary files /dev/null and b/odex25_takaful/takaful_portal_sponsor/static/img/gift_1.png differ diff --git a/odex25_takaful/takaful_portal_sponsor/static/img/helping.png b/odex25_takaful/takaful_portal_sponsor/static/img/helping.png new file mode 100644 index 000000000..4b079f085 Binary files /dev/null and b/odex25_takaful/takaful_portal_sponsor/static/img/helping.png differ diff --git a/odex25_takaful/takaful_portal_sponsor/static/img/late_payments.png b/odex25_takaful/takaful_portal_sponsor/static/img/late_payments.png new file mode 100644 index 000000000..f49bd1a95 Binary files /dev/null and b/odex25_takaful/takaful_portal_sponsor/static/img/late_payments.png differ diff --git a/odex25_takaful/takaful_portal_sponsor/static/img/logged_user.png b/odex25_takaful/takaful_portal_sponsor/static/img/logged_user.png new file mode 100644 index 000000000..7f926ce7f Binary files /dev/null and b/odex25_takaful/takaful_portal_sponsor/static/img/logged_user.png differ diff --git a/odex25_takaful/takaful_portal_sponsor/static/img/logo.png b/odex25_takaful/takaful_portal_sponsor/static/img/logo.png new file mode 100644 index 000000000..0a465cc11 Binary files /dev/null and b/odex25_takaful/takaful_portal_sponsor/static/img/logo.png differ diff --git a/odex25_takaful/takaful_portal_sponsor/static/img/logout-svgrepo-com.png b/odex25_takaful/takaful_portal_sponsor/static/img/logout-svgrepo-com.png new file mode 100644 index 000000000..5ab571cd9 Binary files /dev/null and b/odex25_takaful/takaful_portal_sponsor/static/img/logout-svgrepo-com.png differ diff --git a/odex25_takaful/takaful_portal_sponsor/static/img/mastercard.png b/odex25_takaful/takaful_portal_sponsor/static/img/mastercard.png new file mode 100644 index 000000000..59fe75cfd Binary files /dev/null and b/odex25_takaful/takaful_portal_sponsor/static/img/mastercard.png differ diff --git a/odex25_takaful/takaful_portal_sponsor/static/img/member.png b/odex25_takaful/takaful_portal_sponsor/static/img/member.png new file mode 100644 index 000000000..04edf0c5b Binary files /dev/null and b/odex25_takaful/takaful_portal_sponsor/static/img/member.png differ diff --git a/odex25_takaful/takaful_portal_sponsor/static/img/money-report-svgrepo-com.png b/odex25_takaful/takaful_portal_sponsor/static/img/money-report-svgrepo-com.png new file mode 100644 index 000000000..0e326fbaa Binary files /dev/null and b/odex25_takaful/takaful_portal_sponsor/static/img/money-report-svgrepo-com.png differ diff --git a/odex25_takaful/takaful_portal_sponsor/static/img/money.png b/odex25_takaful/takaful_portal_sponsor/static/img/money.png new file mode 100644 index 000000000..9b7c239ea Binary files /dev/null and b/odex25_takaful/takaful_portal_sponsor/static/img/money.png differ diff --git a/odex25_takaful/takaful_portal_sponsor/static/img/needs.png b/odex25_takaful/takaful_portal_sponsor/static/img/needs.png new file mode 100644 index 000000000..cef88b5e4 Binary files /dev/null and b/odex25_takaful/takaful_portal_sponsor/static/img/needs.png differ diff --git a/odex25_takaful/takaful_portal_sponsor/static/img/next.png b/odex25_takaful/takaful_portal_sponsor/static/img/next.png new file mode 100644 index 000000000..ce6d4a802 Binary files /dev/null and b/odex25_takaful/takaful_portal_sponsor/static/img/next.png differ diff --git a/odex25_takaful/takaful_portal_sponsor/static/img/noti_options.png b/odex25_takaful/takaful_portal_sponsor/static/img/noti_options.png new file mode 100644 index 000000000..90a17b79d Binary files /dev/null and b/odex25_takaful/takaful_portal_sponsor/static/img/noti_options.png differ diff --git a/odex25_takaful/takaful_portal_sponsor/static/img/payments.png b/odex25_takaful/takaful_portal_sponsor/static/img/payments.png new file mode 100644 index 000000000..5cb5ec3c1 Binary files /dev/null and b/odex25_takaful/takaful_portal_sponsor/static/img/payments.png differ diff --git a/odex25_takaful/takaful_portal_sponsor/static/img/paypal.png b/odex25_takaful/takaful_portal_sponsor/static/img/paypal.png new file mode 100644 index 000000000..916b4c989 Binary files /dev/null and b/odex25_takaful/takaful_portal_sponsor/static/img/paypal.png differ diff --git a/odex25_takaful/takaful_portal_sponsor/static/img/prev.png b/odex25_takaful/takaful_portal_sponsor/static/img/prev.png new file mode 100644 index 000000000..643d0ca2b Binary files /dev/null and b/odex25_takaful/takaful_portal_sponsor/static/img/prev.png differ diff --git a/odex25_takaful/takaful_portal_sponsor/static/img/red_cancel.png b/odex25_takaful/takaful_portal_sponsor/static/img/red_cancel.png new file mode 100644 index 000000000..72de171ed Binary files /dev/null and b/odex25_takaful/takaful_portal_sponsor/static/img/red_cancel.png differ diff --git a/odex25_takaful/takaful_portal_sponsor/static/img/resturant_owner.png b/odex25_takaful/takaful_portal_sponsor/static/img/resturant_owner.png new file mode 100644 index 000000000..18c4055cf Binary files /dev/null and b/odex25_takaful/takaful_portal_sponsor/static/img/resturant_owner.png differ diff --git a/odex25_takaful/takaful_portal_sponsor/static/img/search.png b/odex25_takaful/takaful_portal_sponsor/static/img/search.png new file mode 100644 index 000000000..ac446e22e Binary files /dev/null and b/odex25_takaful/takaful_portal_sponsor/static/img/search.png differ diff --git a/odex25_takaful/takaful_portal_sponsor/static/img/separator.png b/odex25_takaful/takaful_portal_sponsor/static/img/separator.png new file mode 100644 index 000000000..9a1ccdc8e Binary files /dev/null and b/odex25_takaful/takaful_portal_sponsor/static/img/separator.png differ diff --git a/odex25_takaful/takaful_portal_sponsor/static/img/service-1.png b/odex25_takaful/takaful_portal_sponsor/static/img/service-1.png new file mode 100644 index 000000000..54ebdfad7 Binary files /dev/null and b/odex25_takaful/takaful_portal_sponsor/static/img/service-1.png differ diff --git a/odex25_takaful/takaful_portal_sponsor/static/img/settings-svgrepo-com.png b/odex25_takaful/takaful_portal_sponsor/static/img/settings-svgrepo-com.png new file mode 100644 index 000000000..fddabdfef Binary files /dev/null and b/odex25_takaful/takaful_portal_sponsor/static/img/settings-svgrepo-com.png differ diff --git a/odex25_takaful/takaful_portal_sponsor/static/img/shopping-cart.png b/odex25_takaful/takaful_portal_sponsor/static/img/shopping-cart.png new file mode 100644 index 000000000..e279a9bc2 Binary files /dev/null and b/odex25_takaful/takaful_portal_sponsor/static/img/shopping-cart.png differ diff --git a/odex25_takaful/takaful_portal_sponsor/static/img/step_1_act.png b/odex25_takaful/takaful_portal_sponsor/static/img/step_1_act.png new file mode 100644 index 000000000..b03d33c59 Binary files /dev/null and b/odex25_takaful/takaful_portal_sponsor/static/img/step_1_act.png differ diff --git a/odex25_takaful/takaful_portal_sponsor/static/img/step_2_act.png b/odex25_takaful/takaful_portal_sponsor/static/img/step_2_act.png new file mode 100644 index 000000000..a242e2004 Binary files /dev/null and b/odex25_takaful/takaful_portal_sponsor/static/img/step_2_act.png differ diff --git a/odex25_takaful/takaful_portal_sponsor/static/img/step_2_inact.png b/odex25_takaful/takaful_portal_sponsor/static/img/step_2_inact.png new file mode 100644 index 000000000..716489bef Binary files /dev/null and b/odex25_takaful/takaful_portal_sponsor/static/img/step_2_inact.png differ diff --git a/odex25_takaful/takaful_portal_sponsor/static/img/step_3_act.png b/odex25_takaful/takaful_portal_sponsor/static/img/step_3_act.png new file mode 100644 index 000000000..762abcb4d Binary files /dev/null and b/odex25_takaful/takaful_portal_sponsor/static/img/step_3_act.png differ diff --git a/odex25_takaful/takaful_portal_sponsor/static/img/step_3_inact.png b/odex25_takaful/takaful_portal_sponsor/static/img/step_3_inact.png new file mode 100644 index 000000000..a54fc3bfb Binary files /dev/null and b/odex25_takaful/takaful_portal_sponsor/static/img/step_3_inact.png differ diff --git a/odex25_takaful/takaful_portal_sponsor/static/img/step_4_act.png b/odex25_takaful/takaful_portal_sponsor/static/img/step_4_act.png new file mode 100644 index 000000000..28bbb2213 Binary files /dev/null and b/odex25_takaful/takaful_portal_sponsor/static/img/step_4_act.png differ diff --git a/odex25_takaful/takaful_portal_sponsor/static/img/step_4_inact.png b/odex25_takaful/takaful_portal_sponsor/static/img/step_4_inact.png new file mode 100644 index 000000000..a8d7631df Binary files /dev/null and b/odex25_takaful/takaful_portal_sponsor/static/img/step_4_inact.png differ diff --git a/odex25_takaful/takaful_portal_sponsor/static/img/step_5_inact.png b/odex25_takaful/takaful_portal_sponsor/static/img/step_5_inact.png new file mode 100644 index 000000000..a1fce35db Binary files /dev/null and b/odex25_takaful/takaful_portal_sponsor/static/img/step_5_inact.png differ diff --git a/odex25_takaful/takaful_portal_sponsor/static/img/trash.png b/odex25_takaful/takaful_portal_sponsor/static/img/trash.png new file mode 100644 index 000000000..26c7d9a0c Binary files /dev/null and b/odex25_takaful/takaful_portal_sponsor/static/img/trash.png differ diff --git a/odex25_takaful/takaful_portal_sponsor/static/img/user.png b/odex25_takaful/takaful_portal_sponsor/static/img/user.png new file mode 100644 index 000000000..e33d11ed6 Binary files /dev/null and b/odex25_takaful/takaful_portal_sponsor/static/img/user.png differ diff --git a/odex25_takaful/takaful_portal_sponsor/static/img/visa.png b/odex25_takaful/takaful_portal_sponsor/static/img/visa.png new file mode 100644 index 000000000..e8e92c426 Binary files /dev/null and b/odex25_takaful/takaful_portal_sponsor/static/img/visa.png differ diff --git a/odex25_takaful/takaful_portal_sponsor/static/img/volanteere.png b/odex25_takaful/takaful_portal_sponsor/static/img/volanteere.png new file mode 100644 index 000000000..cb6e36b95 Binary files /dev/null and b/odex25_takaful/takaful_portal_sponsor/static/img/volanteere.png differ diff --git a/odex25_takaful/takaful_portal_sponsor/static/js/certification_settings.js b/odex25_takaful/takaful_portal_sponsor/static/js/certification_settings.js new file mode 100644 index 000000000..79e0c4f2f --- /dev/null +++ b/odex25_takaful/takaful_portal_sponsor/static/js/certification_settings.js @@ -0,0 +1,61 @@ +$(document).ready(function () { + $.ajax({ + url: '/portal/sponsor/certificate_setting', + type: 'GET', + dataType: 'json', + processData: false, + success: function (data) { + settings = data.certificate_setting; + console.log(settings); + if (data.status) { + $('input[name="name_in_certificate"]').prop('checked', settings.name_in_certificate); + $('input[name="type_in_certificate"]').prop('checked', settings.type_in_certificate); + $('input[name="duration_in_certificate"]').prop('checked', settings.duration_in_certificate); + $(".certificate_setting_feedback").text(settings.msg).addClass('alert alert-success') + } + else { + $(".certificate_setting_feedback").text(data.msg).addClass('alert alert-danger') + } + }, + error: function (error) { + $(".certificate_setting_feedback").text(error.msg).addClass('alert alert-danger') + } + }); + + var settings_data = {} + + // Add event listener to input fields to detect changes + $('input[type="checkbox"]').change(function () { + settings_data = { + name_in_certificate: $('input[name="name_in_certificate"]').prop('checked'), + type_in_certificate: $('input[name="type_in_certificate"]').prop('checked'), + duration_in_certificate: $('input[name="duration_in_certificate"]').prop('checked'), + } + }); + + // Add event listener to save button to trigger AJAX request + $('#certificate_settings_form').on("submit", (e) => { + e.preventDefault(); + $.ajax({ + url: '/portal/sponsor/certificate_setting/update', + type: 'POST', + data: settings_data, + dataType: 'json', + success: function (response) { + if (response.status) { + console.log(response); + $(".certificate_setting_feedback").show() + $(".certificate_setting_feedback").text(response.msg) + } else { + $(".certificate_setting_feedback").show() + $(".certificate_setting_feedback").text(response.msg) + } + }, + error: function (error) { + $(".certificate_setting_feedback").show() + $(".certificate_setting_feedback").text(error.msg) + } + }); + + }); +}) \ No newline at end of file diff --git a/odex25_takaful/takaful_portal_sponsor/static/js/create_group_sponsorships.js b/odex25_takaful/takaful_portal_sponsor/static/js/create_group_sponsorships.js new file mode 100644 index 000000000..f0e09ff6c --- /dev/null +++ b/odex25_takaful/takaful_portal_sponsor/static/js/create_group_sponsorships.js @@ -0,0 +1,46 @@ +$(document).ready(function () { + + let sponsorships_group_api = "/portal/sponsor/sponsorships/create/"; + $('form#group_sponsorship').on('submit', function (evt) { + evt.preventDefault(); + var formData = new FormData(this); + var selectedValues = $('#benefit_ids').val() || []; + var selectedValuesJSON = JSON.stringify(selectedValues); + formData.append('benefit_ids', selectedValuesJSON); + console.log(formData); + $.ajax({ + type: "POST", + url: sponsorships_group_api, + data: formData, + processData: false, + contentType: false, + dataType: 'json', + success: function (response) { + console.log(response); + if (response.status === true) { + $('.sponsorship_creation_feedback').show(); + $('.sponsorship_creation_feedback').html(`زكاة الفطر ++ + + +++ + + +++زكاة المال
++++ ++ +${response.msg}
`); + setTimeout(function () { + $('.sponsorship_creation_feedback').hide(); + location.reload(); + }, 3000); + } else { + $('.sponsorship_creation_feedback').show(); + $('.sponsorship_creation_feedback').html(`${response.msg}
`); + // setTimeout(function () { + // $('.sponsorship_creation_feedback').hide(); + // // location.reload(); + // }, 3000); + } + }, + error: function (err) { + $('.sponsorship_creation_feedback').show(); + $('.sponsorship_creation_feedback').html(`${err.msg}
`) + } + }); + }); + + + +}); + diff --git a/odex25_takaful/takaful_portal_sponsor/static/js/financial_donation.js b/odex25_takaful/takaful_portal_sponsor/static/js/financial_donation.js new file mode 100644 index 000000000..a462fbd93 --- /dev/null +++ b/odex25_takaful/takaful_portal_sponsor/static/js/financial_donation.js @@ -0,0 +1,74 @@ +$(document).ready(function () { + var currentPage = 1; + var benefitType = 'orphan'; // Default value + var prev + var next + + function financial_donation(page) { + $.ajax({ + url: '/portal/sys/benefits/page/' + page, + type: 'GET', + data: { benefit_type: benefitType }, + dataType: 'json', + success: function (data) { + results = data.results; + console.log(results); + var html = ''; + if (data.status) { + results.forEach((element, i) => { + console.log(element); + html += + ` ++ + ` + }); + $('.financial_donation tbody').html(html); + next = data.next_page; + prev = (currentPage > 1) ? currentPage - 1 : null; + currentPage = page; + } + else { + console.log(data.msg); + } + }, + error: function (err) { + console.log(err.msg); + } + }); + } + financial_donation(1); + function updateButtons(next, prev) { + $('#benefits-next').attr('disabled', (next == null)); + $('#benefits-prev').attr('disabled', (prev == null)); + } + + $('#benefit-type').change(function () { + benefitType = $(this).val(); + $('.financial_donation tbody tr').data("type", benefitType) + financial_donation(1); + }); + $('#benefits-prev').click(function () { + financial_donation(currentPage - 1); + updateButtons(next, prev) + + }); + $('#benefits-next').click(function () { + financial_donation(currentPage + 1); + updateButtons(next, prev) + }); +}) \ No newline at end of file diff --git a/odex25_takaful/takaful_portal_sponsor/static/js/financial_record.js b/odex25_takaful/takaful_portal_sponsor/static/js/financial_record.js new file mode 100644 index 000000000..2fcb8661c --- /dev/null +++ b/odex25_takaful/takaful_portal_sponsor/static/js/financial_record.js @@ -0,0 +1,130 @@ +$(document).ready(function () { + var currentPage = 1; + var prev + var next + + + function paymentsHandler(page) { + $.ajax({ + url: '/portal/sponsor/payments/page/' + page, + type: 'GET', + dataType: 'json', + success: function (data) { + results = data.results; + nextPage = data.next_page; + console.log(nextPage); + console.log(data); + var html = ''; + if (data.status) { + results.forEach((element, i) => { + html += + ` +${i + 1} +${element.first_name} +${element.gender} +${element.age} +${element.city_id} +${element.benefit_type} +${element.benefit_needs_percent} % +${element.benefit_available_need} +${element.benefit_arrears_value} ++ ++ ساهم الان +++ + ` + }); + $('.payments_table tbody').html(html); + + currentPage = page; + next = data.next_page; + prev = (currentPage > 1) ? currentPage - 1 : null; + updateButtons(next, prev); + } + else { + $('.payments_table').hide(); + $('.empty_payments').text('لايوجد مدفوعات لعرضها ') + } + }, + error: function (err) { + $('.empty_payments').text(err.msg) + } + }); + } + + + function arreasHandler(page) { + $.ajax({ + url: '/portal/sponsor/arrears/page/' + page, + type: 'GET', + dataType: 'json', + success: function (data) { + results = data.results; + nextPage = data.next_page; + console.log(nextPage); + console.log(data); + var html = ''; + if (data.status) { + results.forEach((element, i) => { + html += + ` +${i + 1} +${element.name} +${element.title} +${element.date} +${element.amount} ++ ++ تم السداد +++ + ` + }); + $('.arreas_table tbody').html(html); + currentPage = page; + console.log(currentPage); + next = data.next_page; + console.log('next is' + next); + prev = (currentPage > 1) ? currentPage - 1 : null; + updateButtons(next, prev); + } + else { + $('.arreas_table').hide(); + $('.empty_arreas').text('لايوجد مدفوعات لعرضها ') + } + }, + error: function (err) { + $('.empty_arreas').text(err.msg) + } + }); + } + + paymentsHandler(currentPage); + arreasHandler(currentPage); + + function updateButtons(next, prev) { + $('#payments_next').prop('disabled', (next === null)); + $('#payments_prev').prop('disabled', (currentPage === 1)); + } + + // Button click event handlers + $('#payments_next').click(function () { + if (next) { + paymentsHandler(currentPage + 1); + arreasHandler(currentPage + 1); + } + }); + $('#payments_prev').click(function () { + paymentsHandler(currentPage - 1); + arreasHandler(currentPage - 1); + + }); + +}) \ No newline at end of file diff --git a/odex25_takaful/takaful_portal_sponsor/static/js/general_needs.js b/odex25_takaful/takaful_portal_sponsor/static/js/general_needs.js new file mode 100644 index 000000000..82dccd574 --- /dev/null +++ b/odex25_takaful/takaful_portal_sponsor/static/js/general_needs.js @@ -0,0 +1,65 @@ + +$(document).ready(function () { + var currentPage = 1; + var prev + var next + function generalNeeds(page) { + $.ajax({ + url: '/portal/sys/need_types/page/' + page, + type: 'GET', + dataType: 'json', + success: function (data) { + results = data.results; + console.log(results); + var html = ''; + if (data.status) { + results.forEach((element, i) => { + console.log(element); + html += + ` +${i + 1} +${element.code} +${element.next_due_date} +${element.contribution_value} +${element.due_days} ++ + ++ + ` + }); + $('.general_needs tbody').html(html); + next = data.next_page; + prev = (currentPage > 1) ? currentPage - 1 : null; + currentPage = page; + } + else { + console.log(data.msg); + } + }, + error: function (err) { + console.log(err.msg); + } + }); + } + generalNeeds(1); + function updateButtons(next, prev) { + $('#benefits-next').attr('disabled', (next == null)); + $('#benefits-prev').attr('disabled', (prev == null)); + } + + $('#benefits-prev').click(function () { + generalNeeds(currentPage - 1); + updateButtons(next, prev) + + }); + $('#benefits-next').click(function () { + generalNeeds(currentPage + 1); + updateButtons(next, prev) + }); +}) \ No newline at end of file diff --git a/odex25_takaful/takaful_portal_sponsor/static/js/kafel.js b/odex25_takaful/takaful_portal_sponsor/static/js/kafel.js new file mode 100644 index 000000000..cbe26566f --- /dev/null +++ b/odex25_takaful/takaful_portal_sponsor/static/js/kafel.js @@ -0,0 +1,231 @@ +$(document).ready(function () { + console.log('this is kafel js'); + //Get list of cities + let allCities = "/portal/sys/city_list"; + fetch(allCities).then(res => res.json()).then(cities => { + console.log(cities); + data = cities.results; + data.forEach((city, i) => { + $('#city_id').append(``) + }); + }); + +}) + + +var currentPage = 1; +var benefitType = 'orphan'; // Default value +var next +var prev + + +function loadData(page) { + $.ajax({ + url: '/portal/sponsor/sponsorships/page/' + page, + type: 'GET', + data: { benefit_type: benefitType }, + dataType: 'json', + success: function (data) { + results = data.results; + console.log(results); + var html = ''; + if (data.status) { + results.forEach((element, i) => { + html += + ` +${i + 1} +${element.name} +${element.city_name} +${element.benefit_count} +${element.target_amount} +${element.completion_ratio} % +${element.remaining_amount} ++ ++ ساهم الان ++= 1 ? " class = 'active' " : " class= 'expired' "}> + + ` + }); + $('.kafalaty_table tbody').html(html); + next = data.next_page; + prev = (currentPage > 1) ? currentPage - 1 : null; + currentPage = page; + console.log(next, prev); + } + else { + console.log(data.msg); + } + }, + error: function (jqXHR, textStatus, errorThrown) { + console.log(textStatus + ': ' + errorThrown); + } + }); +} + +//cancelation resons list api + +$(document).ready(function () { + let reasons = "/portal/sys/reason_list"; + fetch(reasons).then(res => res.json()).then(reasons => { + data = reasons.results; + console.log(data); + data.forEach((reason, i) => { + $('#reason_id').append(``) + }); + }); +}) + +//load benefits data + +function sponsorshipsCancelation(page) { + $.ajax({ + url: '/portal/sponsor/sponsorships/page/' + page, + type: 'GET', + data: { benefit_type: benefitType }, + dataType: 'json', + success: function (data) { + results = data.results; + console.log(results); + var html = ''; + if (data.status) { + results.forEach((element, i) => { + html += + ` +${i + 1} +${element.benefit_id.name} +${element.benefit_id.gender} +${element.benefit_id.age} +${element.benefit_id.city_id} +${element.benefit_id.benefit_type} +${element.benefit_id.benefit_needs_percent} % +${element.benefit_id.benefit_arrears_value} +${element.start_date} +${element.month_count >= 1 ? ` سارية ` : ` منتهية `} += 1 ? " class = 'active' " : " class= 'expired' "}> + + ` + }); + $('.sponsorship_cancelation tbody').html(html); + next = data.next_page; + prev = (currentPage > 1) ? currentPage - 1 : null; + currentPage = page; + } + else { + console.log(data.msg); + } + }, + error: function (jqXHR, textStatus, errorThrown) { + console.log(textStatus + ': ' + errorThrown); + } + }); +} + + +//cancelation request + +$(document).ready(function () { + $('form#cancelation_form').on('submit', function (evt) { + evt.preventDefault(); + var sponsorshipId = $('#sponsorship_id').val(); + var reasonId = $('#reason_id').val(); + var data = { + sponsorship_id: sponsorshipId, + reason_id: reasonId, + }; + $.ajax({ + type: 'POST', + url: '/portal/sponsor/sponsorships/cancel', + data:data, + dataType: 'json', + success: function (data) { + if (data.status) { + console.log(data); + $('.cancelation_feedback').show(); + $('.cancelation_feedback').html(`${i + 1} +${element.benefit_id.name} +${element.benefit_id.gender} +${element.benefit_id.age} +${element.benefit_id.city_id} +${element.benefit_id.benefit_type} +${element.benefit_id.benefit_needs_percent} % +${element.benefit_id.benefit_arrears_value} +${element.start_date} +${element.month_count >= 1 ? + ` + سارية + + +الغاء + + ` + : + + ` + منتهية + +
الغاء + < /a> + ` } +
${data.msg}`); + setTimeout(function () { + $('.cancelation_feedback').hide(); + // location.reload(); + }, 3000); + } + + else { + $('.cancelation_feedback').show(); + $('.cancelation_feedback').html(`${data.msg}`); + } + }, + error: function (error) { + console.log(error); + $('.cancelation_feedback').show(); + $('.cancelation_feedback').html(`${error.msg}`); + setTimeout(function () { + $('.cancelation_feedback').hide(); + }, 3000); + } + }); + } + ); +}) + + +$(document).ready(function () { + $('.need_sponsorship tbody').on('click', '#benefit_dtls', function (evt) { + const userId = $(this).data("id"); + const userType = $(this).data("type") + console.log(userId, userType); + window.location.href = `/need_kafala_details?benefit_type=${userType}&benefit_id=${userId}`; + }) +}) + +$(document).ready(function () { + loadData(1); + sponsorshipsCancelation(1) + function updateButtons(next, prev) { + $('#benefits-next').attr('disabled', (next == null)); + $('#benefits-prev').attr('disabled', (prev == null)); + } + + $('#benefits-type').on('change', function () { + loadData(1); + sponsorshipsCancelation(1) + let type = $(this).val(); + benefitType = type + $('.kafalaty_table tbody tr').data("type", type) + }); + $('#benefits-prev').click(function () { + loadData(currentPage - 1); + sponsorshipsCancelation(currentPage - 1); + updateButtons(next, prev) + + }); + $('#benefits-next').click(function () { + loadData(currentPage + 1); + sponsorshipsCancelation(currentPage + 1); + updateButtons(next, prev) + }); + + + $('.sponsorship_cancelation tbody').on('click', '.cancel_link', function (e) { + e.preventDefault(); + $('.cancelation_feedback').html('') + $('#sponsorship_cancelation').modal('show'); + let sponsorship_id = $(this).data('id'); + console.log(sponsorship_id); + $('#sponsorship_id').val(sponsorship_id) + }); +}); \ No newline at end of file diff --git a/odex25_takaful/takaful_portal_sponsor/static/js/main.js b/odex25_takaful/takaful_portal_sponsor/static/js/main.js new file mode 100644 index 000000000..0375c60e8 --- /dev/null +++ b/odex25_takaful/takaful_portal_sponsor/static/js/main.js @@ -0,0 +1,2 @@ +$(document).ready(function(){ +}) \ No newline at end of file diff --git a/odex25_takaful/takaful_portal_sponsor/static/js/makfoul_details.js b/odex25_takaful/takaful_portal_sponsor/static/js/makfoul_details.js new file mode 100644 index 000000000..e69de29bb diff --git a/odex25_takaful/takaful_portal_sponsor/static/js/multiselect-dropdown.js b/odex25_takaful/takaful_portal_sponsor/static/js/multiselect-dropdown.js new file mode 100644 index 000000000..e2d4cf85f --- /dev/null +++ b/odex25_takaful/takaful_portal_sponsor/static/js/multiselect-dropdown.js @@ -0,0 +1,225 @@ +var style = document.createElement('style'); +style.setAttribute("id","multiselect_dropdown_styles"); +style.innerHTML = ` +.multiselect-dropdown{ + display: inline-block; + padding: 2px 5px 0px 5px; + border-radius: 4px; + border: solid 1px #ced4da; + background-color: white; + position: relative; + background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23343a40' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M2 5l6 6 6-6'/%3e%3c/svg%3e"); + background-repeat: no-repeat; + background-position: right .75rem center; + background-size: 16px 12px; +} +.multiselect-dropdown span.optext, .multiselect-dropdown span.placeholder{ + margin-right:0.5em; + margin-bottom:2px; + padding:1px 0; + border-radius: 4px; + display:inline-block; +} +.multiselect-dropdown span.optext{ + background-color:lightgray; + padding:1px 0.75em; +} +.multiselect-dropdown span.optext .optdel { + float: right; + margin: 0 -6px 1px 5px; + font-size: 0.7em; + margin-top: 2px; + cursor: pointer; + color: #666; +} +.multiselect-dropdown span.optext .optdel:hover { color: #c66;} +.multiselect-dropdown span.placeholder{ + color:#ced4da; +} +.multiselect-dropdown-list-wrapper{ + box-shadow: gray 0 3px 8px; + z-index: 100; + padding:2px; + border-radius: 4px; + border: solid 1px #ced4da; + display: none; + margin: -1px; + position: absolute; + top:0; + left: 0; + right: 0; + background: white; +} +.multiselect-dropdown-list-wrapper .multiselect-dropdown-search{ + margin-bottom:5px; +} +.multiselect-dropdown-list{ + padding:2px; + height: 15rem; + overflow-y:auto; + overflow-x: hidden; +} +.multiselect-dropdown-list::-webkit-scrollbar { + width: 6px; +} +.multiselect-dropdown-list::-webkit-scrollbar-thumb { + background-color: #bec4ca; + border-radius:3px; +} + +.multiselect-dropdown-list div{ + padding: 5px; +} +.multiselect-dropdown-list input{ + height: 1.15em; + width: 1.15em; + margin-right: 0.35em; +} +.multiselect-dropdown-list div.checked{ +} +.multiselect-dropdown-list div:hover{ + background-color: #ced4da; +} +.multiselect-dropdown span.maxselected {width:100%;} +.multiselect-dropdown-all-selector {border-bottom:solid 1px #999;} +`; +document.head.appendChild(style); + +function MultiselectDropdown(options){ + var config={ + search:true, + height:'15rem', + placeholder:'select', + txtSelected:'selected', + txtAll:'All', + txtRemove: 'Remove', + txtSearch:'search', + ...options + }; + function newEl(tag,attrs){ + var e=document.createElement(tag); + if(attrs!==undefined) Object.keys(attrs).forEach(k=>{ + if(k==='class') { Array.isArray(attrs[k]) ? attrs[k].forEach(o=>o!==''?e.classList.add(o):0) : (attrs[k]!==''?e.classList.add(attrs[k]):0)} + else if(k==='style'){ + Object.keys(attrs[k]).forEach(ks=>{ + e.style[ks]=attrs[k][ks]; + }); + } + else if(k==='text'){attrs[k]===''?e.innerHTML=' ':e.innerText=attrs[k]} + else e[k]=attrs[k]; + }); + return e; + } + + console.log('this is multiselect js '); + + document.querySelectorAll("select[multiple]").forEach((el,k)=>{ + + var div=newEl('div',{class:'multiselect-dropdown',style:{width:config.style?.width??el.clientWidth+'px',padding:config.style?.padding??''}}); + el.style.display='none'; + el.parentNode.insertBefore(div,el.nextSibling); + var listWrap=newEl('div',{class:'multiselect-dropdown-list-wrapper'}); + var list=newEl('div',{class:'multiselect-dropdown-list',style:{height:config.height}}); + var search=newEl('input',{class:['multiselect-dropdown-search'].concat([config.searchInput?.class??'form-control']),style:{width:'100%',display:el.attributes['multiselect-search']?.value==='true'?'block':'none'},placeholder:config.txtSearch}); + listWrap.appendChild(search); + div.appendChild(listWrap); + listWrap.appendChild(list); + + el.loadOptions=()=>{ + list.innerHTML=''; + + if(el.attributes['multiselect-select-all']?.value=='true'){ + var op=newEl('div',{class:'multiselect-dropdown-all-selector'}) + var ic=newEl('input',{type:'checkbox'}); + op.appendChild(ic); + op.appendChild(newEl('label',{text:config.txtAll})); + + op.addEventListener('click',()=>{ + op.classList.toggle('checked'); + op.querySelector("input").checked=!op.querySelector("input").checked; + + var ch=op.querySelector("input").checked; + list.querySelectorAll(":scope > div:not(.multiselect-dropdown-all-selector)") + .forEach(i=>{if(i.style.display!=='none'){i.querySelector("input").checked=ch; i.optEl.selected=ch}}); + + el.dispatchEvent(new Event('change')); + }); + ic.addEventListener('click',(ev)=>{ + ic.checked=!ic.checked; + }); + el.addEventListener('change', (ev)=>{ + let itms=Array.from(list.querySelectorAll(":scope > div:not(.multiselect-dropdown-all-selector)")).filter(e=>e.style.display!=='none') + let existsNotSelected=itms.find(i=>!i.querySelector("input").checked); + if(ic.checked && existsNotSelected) ic.checked=false; + else if(ic.checked==false && existsNotSelected===undefined) ic.checked=true; + }); + + list.appendChild(op); + } + + Array.from(el.options).map(o=>{ + var op=newEl('div',{class:o.selected?'checked':'',optEl:o}) + var ic=newEl('input',{type:'checkbox',checked:o.selected}); + op.appendChild(ic); + op.appendChild(newEl('label',{text:o.text})); + + op.addEventListener('click',()=>{ + op.classList.toggle('checked'); + op.querySelector("input").checked=!op.querySelector("input").checked; + op.optEl.selected=!!!op.optEl.selected; + el.dispatchEvent(new Event('change')); + }); + ic.addEventListener('click',(ev)=>{ + ic.checked=!ic.checked; + }); + o.listitemEl=op; + list.appendChild(op); + }); + div.listEl=listWrap; + + div.refresh=()=>{ + div.querySelectorAll('span.optext, span.placeholder').forEach(t=>div.removeChild(t)); + var sels=Array.from(el.selectedOptions); + if(sels.length>(el.attributes['multiselect-max-items']?.value??5)){ + div.appendChild(newEl('span',{class:['optext','maxselected'],text:sels.length+' '+config.txtSelected})); + } + else{ + sels.map(x=>{ + var c=newEl('span',{class:'optext',text:x.text, srcOption: x}); + if((el.attributes['multiselect-hide-x']?.value !== 'true')) + c.appendChild(newEl('span',{class:'optdel',text:'🗙',title:config.txtRemove, onclick:(ev)=>{c.srcOption.listitemEl.dispatchEvent(new Event('click'));div.refresh();ev.stopPropagation();}})); + + div.appendChild(c); + }); + } + if(0==el.selectedOptions.length) div.appendChild(newEl('span',{class:'placeholder',text:el.attributes['placeholder']?.value??config.placeholder})); + }; + div.refresh(); + } + el.loadOptions(); + + search.addEventListener('input',()=>{ + list.querySelectorAll(":scope div:not(.multiselect-dropdown-all-selector)").forEach(d=>{ + var txt=d.querySelector("label").innerText.toUpperCase(); + d.style.display=txt.includes(search.value.toUpperCase())?'block':'none'; + }); + }); + + div.addEventListener('click',()=>{ + div.listEl.style.display='block'; + search.focus(); + search.select(); + }); + + document.addEventListener('click', function(event) { + if (!div.contains(event.target)) { + listWrap.style.display='none'; + div.refresh(); + } + }); + }); +} + +window.addEventListener('load',()=>{ + MultiselectDropdown(window.MultiselectDropdownOptions); +}); diff --git a/odex25_takaful/takaful_portal_sponsor/static/js/notifiactions_details.js b/odex25_takaful/takaful_portal_sponsor/static/js/notifiactions_details.js new file mode 100644 index 000000000..df80cd805 --- /dev/null +++ b/odex25_takaful/takaful_portal_sponsor/static/js/notifiactions_details.js @@ -0,0 +1,73 @@ +const urlSearchParams = new URLSearchParams(window.location.search); +var myId = urlSearchParams.get("id"); + +$.ajax({ + url: `/portal/sponsor/notify/read/${myId}`, + type: 'GET', + dataType: 'json', + success: function (data) { + console.log(data); + notif_details = data.notification; + var html = ''; + if (data.status) { + html += + ` +++ + ` + $('.notifications.details .wrapper').html(html); + } + else { + console.log(data.msg); + } + }, + error: function (jqXHR, textStatus, errorThrown) { + console.log(textStatus + ': ' + errorThrown); + } +}); + +$(".notifications.details").on("click", ".delete_noti", () => { + $.ajax({ + url: `/portal/sponsor/notify/delete/${myId}`, + type: 'GET', + dataType: 'json', + success: function (data) { + console.log(data); + var message = data.msg ; + if (data.status) { + $('.delete_feedback').append(` ${message} `); + setTimeout(function () { + window.location.href = `/notifications`; + }, 3000); + } + else { + $('.delete_feedback').append(` ${message} `); + } + }, + error: function (err) { + $('.delete_feedback').append(` ${err.msg} `); + } + }); +}) \ No newline at end of file diff --git a/odex25_takaful/takaful_portal_sponsor/static/js/notifications.js b/odex25_takaful/takaful_portal_sponsor/static/js/notifications.js new file mode 100644 index 000000000..281d13dce --- /dev/null +++ b/odex25_takaful/takaful_portal_sponsor/static/js/notifications.js @@ -0,0 +1,179 @@ +var currentPage = 1; +var next +var prev + + +const urlSearchParams = new URLSearchParams(window.location.search); +var is_read = urlSearchParams.get("is_read"); + +if(is_read =='no'){ + $("#unread_toggler").prop('checked', true); +} + +function updateButtons(nxt, prv) { + $('#benefits-next').attr('disabled', (nxt == null)); + $('#benefits-prev').attr('disabled', (prv == null)); +} + +//load read notifiacrions +if (is_read == 'yes') { + function loadNotifications(page) { + $.ajax({ + url: `/portal/sponsor/notifications/page/${page}?is_read=yes`, + type: 'GET', + dataType: 'json', + success: function (data) { + console.log(data); + notif = data.results; + let myPage = data.next_page; + console.log(myPage); + var html = ''; + if (data.status) { + notif.forEach((element, i) => { + html += + ` + ++ ${notif_details.sent_on} ++++${notif_details.title}
++ ${notif_details.body} +
++ + +++ ${element.title} +
++ ${element.body} +
+ + ${element.sent_on} + + + ` + }); + $('.all_notifs').html(html); + + next = data.next_page; + prev = (currentPage > 1) ? currentPage - 1 : null; + currentPage = page; + console.log(next, prev); + $('#notif-next').attr('disabled', (next == null)); + $('#notif-prev').attr('disabled', (prev == null)); + } + else { + console.log(data.msg); + } + }, + error: function (jqXHR, textStatus, errorThrown) { + console.log(textStatus + ': ' + errorThrown); + } + }); + } +} +//load all notifications +else if (is_read == 'no') { + + function loadNotifications(page) { + $.ajax({ + url: `/portal/sponsor/notifications/page/${page}?is_read=no`, + type: 'GET', + dataType: 'json', + success: function (data) { + console.log(data); + notif = data.results; + let myPage = data.next_page; + console.log(myPage); + var html = ''; + if (data.status) { + notif.forEach((element, i) => { + html += + ` + ++ ${element.title} +
++ ${element.body} +
+ + ${element.sent_on} + + + ` + }); + $('.all_notifs').html(html); + + next = data.next_page; + prev = (currentPage > 1) ? currentPage - 1 : null; + currentPage = page; + console.log(next, prev); + $('#notif-next').attr('disabled', (next == null)); + $('#notif-prev').attr('disabled', (prev == null)); + } + else { + console.log(data.msg); + } + }, + error: function (jqXHR, textStatus, errorThrown) { + console.log(textStatus + ': ' + errorThrown); + } + }); + } + +} else { + function loadNotifications(page) { + $.ajax({ + url: `/portal/sponsor/notifications/page/${page}`, + type: 'GET', + dataType: 'json', + success: function (data) { + console.log(data); + notif = data.results; + let myPage = data.next_page; + console.log(myPage); + var html = ''; + if (data.status) { + notif.forEach((element, i) => { + html += + ` + ++ ${element.title} +
++ ${element.body} +
+ + ${element.sent_on} + + + ` + }); + $('.all_notifs').html(html); + + next = data.next_page; + prev = (currentPage > 1) ? currentPage - 1 : null; + currentPage = page; + console.log(next, prev); + $('#notif-next').attr('disabled', (next == null)); + $('#notif-prev').attr('disabled', (prev == null)); + } + else { + console.log(data.msg); + } + }, + error: function (jqXHR, textStatus, errorThrown) { + console.log(textStatus + ': ' + errorThrown); + } + }); + } +} + + + + +$(document).ready(function () { + loadNotifications(1); + $('#notif-prev').click(function () { + loadNotifications(currentPage - 1); + updateButtons(next, prev) + }); + $('#notif-next').click(function () { + loadNotifications(currentPage + 1); + updateButtons(next, prev) + }); +}); \ No newline at end of file diff --git a/odex25_takaful/takaful_portal_sponsor/static/js/notifications_settings.js b/odex25_takaful/takaful_portal_sponsor/static/js/notifications_settings.js new file mode 100644 index 000000000..397a74dac --- /dev/null +++ b/odex25_takaful/takaful_portal_sponsor/static/js/notifications_settings.js @@ -0,0 +1,69 @@ +$(document).ready(function () { + $.ajax({ + url: '/portal/sponsor/notify_setting', + type: 'GET', + dataType: 'json', + processData: false, + success: function (data) { + settings = data.notify_setting; + console.log(settings); + if (data.status) { + $('input[name="notify_by_app"]').prop('checked', settings.notify_by_app); + $('input[name="notify_by_sms"]').prop('checked', settings.notify_by_sms); + $('input[name="notify_month_day"]').val(settings.notify_month_day); + $('input[name="notify_pay_by_app"]').prop('checked', settings.notify_pay_by_app); + $('input[name="notify_pay_by_sms"]').prop('checked', settings.notify_pay_by_sms); + $(".notifications_update_feedback").text(data.msg).addClass('alert alert-success') + + } + else { + console.log(data.msg); + $(".notifications_update_feedback").text(data.msg).addClass('alert alert-danger') + } + }, + error: function (error) { + $(".notifications_update_feedback").text(error.msg).addClass('alert alert-danger') + } + }); + + var settings_data = {} + + // Add event listener to input fields to detect changes + $('input[type="checkbox"]').change(function () { + settings_data = { + notify_by_app: $('input[name="notify_by_app"]').prop('checked'), + notify_by_sms: $('input[name="notify_by_sms"]').prop('checked'), + notify_month_day: $('input[name="notify_month_day"]').val(), + notify_pay_by_app: $('input[name="notify_pay_by_app"]').prop('checked'), + notify_pay_by_sms: $('input[name="notify_pay_by_sms"]').prop('checked'), + } + }); + + // Add event listener to save button to trigger AJAX request + $('#notifications_update_form').on("submit", (e) => { + e.preventDefault(); + $.ajax({ + url: '/portal/sponsor/notify_setting/update', + type: 'POST', + data: settings_data, + dataType: 'json', + success: function (response) { + if (response.status) { + console.log(response); + $(".notifications_update_feedback").show() + $(".notifications_update_feedback").text(response.msg) + } else { + $(".notifications_update_feedback").show() + $(".notifications_update_feedback").text(response.msg) + } + }, + error: function (error) { + $(".notifications_update_feedback").show() + $(".notifications_update_feedback").text(error.msg) + } + }); + + }); +}) + + diff --git a/odex25_takaful/takaful_portal_sponsor/static/js/orphan_widows_needs.js b/odex25_takaful/takaful_portal_sponsor/static/js/orphan_widows_needs.js new file mode 100644 index 000000000..3df142e6f --- /dev/null +++ b/odex25_takaful/takaful_portal_sponsor/static/js/orphan_widows_needs.js @@ -0,0 +1,74 @@ +$(document).ready(function () { + var currentPage = 1; + var benefitType = 'orphan'; // Default value + var nextorphan + var prev + var next + + function orphan_widows_needs(page) { + $.ajax({ + url: '/portal/sys/benefits/page/' + page, + type: 'GET', + data: { benefit_type: benefitType }, + dataType: 'json', + success: function (data) { + results = data.results; + console.log(results); + var html = ''; + if (data.status) { + results.forEach((element, i) => { + console.log(element); + html += + ` ++ + ` + }); + $('.orphan_widows_needs tbody').html(html); + next = data.next_page; + prev = (currentPage > 1) ? currentPage - 1 : null; + currentPage = page; + } + else { + console.log(data.msg); + } + }, + error: function (jqXHR, textStatus, errorThrown) { + console.log(textStatus + ': ' + errorThrown); + } + }); + } + orphan_widows_needs(1); + function updateButtons(next, prev) { + $('#benefits-next').attr('disabled', (next == null)); + $('#benefits-prev').attr('disabled', (prev == null)); + } + + $('#benefit-type').change(function () { + benefitType = $(this).val(); + $('.financial_donation tbody tr').data("type", benefitType) + orphan_widows_needs(1); + + }); + $('#benefits-prev').click(function () { + orphan_widows_needs(currentPage - 1); + updateButtons(next, prev) + + }); + $('#benefits-next').click(function () { + orphan_widows_needs(currentPage + 1); + updateButtons(next, prev) + }); +}) \ No newline at end of file diff --git a/odex25_takaful/takaful_portal_sponsor/static/js/profile.js b/odex25_takaful/takaful_portal_sponsor/static/js/profile.js new file mode 100644 index 000000000..d00a8adb5 --- /dev/null +++ b/odex25_takaful/takaful_portal_sponsor/static/js/profile.js @@ -0,0 +1,101 @@ +$(document).ready(function () { + + + + const getProfileData = () => { + let url = "/portal/sponsor/profile"; + fetch(url) + .then(response => response.json()) + .then(res => { + data = res.sponsor; + console.log(data); + const dataObject = { + name: data.name, + gender: data.gender, + id_number: data.id_number, + mobile: data.mobile, + email: data.email, + city_id: data.city_id, + company_type: data.company_type, + bank_entity_name: data.bank_entity_name, + account_number: data.account_number, + iban: data.iban, + bank_name: data.bank_id, + } + //general information inputs values + $("input[name=name]").val(dataObject.name); + $("input[name=id_number]").val(dataObject.id_number); + $("input[name=mobile]").val(dataObject.mobile); + $("input[name=email]").val(dataObject.email); + $('#city_id option[value="' + dataObject.city_id + '"]').prop('selected', true); + $("input[name=company_type]").val(dataObject.company_type); + if (dataObject.gender == 'male') { + $('#gender-male').prop('checked', true) + $('#gender-female').prop('checked', false) + } else { + $('#gender-female').prop('checked', true) + $('#gender-male').prop('checked', false) + } + $("input[name=bank_entity_name]").val(dataObject.bank_entity_name); + $("input[name=account_number]").val(dataObject.account_number); + $("input[name=iban]").val(dataObject.iban); + $('#bank_id option[value="' + dataObject.bank_id + '"]').prop('selected', true); + }) + .catch(err => { + console.log(err); + }) + } + getProfileData(); + + //profile update values + let update_profile = "/portal/sponsor/profile/update"; + const form = $('.sponsor_profile_form') + const updateHandler = () => { + form.on('submit', function (e) { + var formData = $(this).serialize(); + console.log(formData); + e.preventDefault(); + $.ajax({ + method: 'PUT', + url: update_profile, + data: { + mobile: $("input[name=mobile]").val(), + city_id: $("#city_id").val(), + account_number: $("input[name=account_number]").val(), + iban: $("input[name=iban]").val(), + bank_id: $("#bank_id").val(), + bank_entity_name: $("input[name=bank_entity_name]").val(), + }, + dataType: "json", + success: function (response) { + if (response !== undefined && response !== null) { + if (response.status) { + console.log(response.data); + $('.success_res').show(); + $('.error_res').hide(); + $('.success_res').html(` ${response.msg} `); + setTimeout(function () { + $('.success_res').hide(); + }, 3000); + } else { + $('.error_res').show(); + $('.success_res').hide(); + $('.error_res').html(` ${response.msg} `); + setTimeout(function () { + $('.success_res').hide(); + }, 6000); + } + } + }, + error: function (error) { + $('.success_res').hide(); + $('.error_res').show(); + $('.error_res').html(` ${error.msg} `); + } + }); + return false; + } + ); + } + updateHandler(); +}) \ No newline at end of file diff --git a/odex25_takaful/takaful_portal_sponsor/static/js/select2.min.js b/odex25_takaful/takaful_portal_sponsor/static/js/select2.min.js new file mode 100644 index 000000000..e42142643 --- /dev/null +++ b/odex25_takaful/takaful_portal_sponsor/static/js/select2.min.js @@ -0,0 +1,2 @@ +/*! Select2 4.0.13 | https://github.com/select2/select2/blob/master/LICENSE.md */ +!function(n){"function"==typeof define&&define.amd?define(["jquery"],n):"object"==typeof module&&module.exports?module.exports=function(e,t){return void 0===t&&(t="undefined"!=typeof window?require("jquery"):require("jquery")(e)),n(t),t}:n(jQuery)}(function(u){var e=function(){if(u&&u.fn&&u.fn.select2&&u.fn.select2.amd)var e=u.fn.select2.amd;var t,n,r,h,o,s,f,g,m,v,y,_,i,a,b;function w(e,t){return i.call(e,t)}function l(e,t){var n,r,i,o,s,a,l,c,u,d,p,h=t&&t.split("/"),f=y.map,g=f&&f["*"]||{};if(e){for(s=(e=e.split("/")).length-1,y.nodeIdCompat&&b.test(e[s])&&(e[s]=e[s].replace(b,"")),"."===e[0].charAt(0)&&h&&(e=h.slice(0,h.length-1).concat(e)),u=0;u${i + 1} +${element.first_name} +${element.gender} +${element.age} +${element.city_id} +${element.benefit_type} +${element.benefit_needs_percent} % ++ ++ ساهم الان ++":">",'"':""","'":"'","/":"/"};return"string"!=typeof e?e:String(e).replace(/[&<>"'\/\\]/g,function(e){return t[e]})},i.appendMany=function(e,t){if("1.7"===o.fn.jquery.substr(0,3)){var n=o();o.map(t,function(e){n=n.add(e)}),t=n}e.append(t)},i.__cache={};var n=0;return i.GetUniqueElementId=function(e){var t=e.getAttribute("data-select2-id");return null==t&&(e.id?(t=e.id,e.setAttribute("data-select2-id",t)):(e.setAttribute("data-select2-id",++n),t=n.toString())),t},i.StoreData=function(e,t,n){var r=i.GetUniqueElementId(e);i.__cache[r]||(i.__cache[r]={}),i.__cache[r][t]=n},i.GetData=function(e,t){var n=i.GetUniqueElementId(e);return t?i.__cache[n]&&null!=i.__cache[n][t]?i.__cache[n][t]:o(e).data(t):i.__cache[n]},i.RemoveData=function(e){var t=i.GetUniqueElementId(e);null!=i.__cache[t]&&delete i.__cache[t],e.removeAttribute("data-select2-id")},i}),e.define("select2/results",["jquery","./utils"],function(h,f){function r(e,t,n){this.$element=e,this.data=n,this.options=t,r.__super__.constructor.call(this)}return f.Extend(r,f.Observable),r.prototype.render=function(){var e=h('');return this.options.get("multiple")&&e.attr("aria-multiselectable","true"),this.$results=e},r.prototype.clear=function(){this.$results.empty()},r.prototype.displayMessage=function(e){var t=this.options.get("escapeMarkup");this.clear(),this.hideLoading();var n=h(''),r=this.options.get("translations").get(e.message);n.append(t(r(e.args))),n[0].className+=" select2-results__message",this.$results.append(n)},r.prototype.hideMessages=function(){this.$results.find(".select2-results__message").remove()},r.prototype.append=function(e){this.hideLoading();var t=[];if(null!=e.results&&0!==e.results.length){e.results=this.sort(e.results);for(var n=0;n ",{class:"select2-results__options select2-results__options--nested"});p.append(l),s.append(a),s.append(p)}else this.template(e,t);return f.StoreData(t,"data",e),t},r.prototype.bind=function(t,e){var l=this,n=t.id+"-results";this.$results.attr("id",n),t.on("results:all",function(e){l.clear(),l.append(e.data),t.isOpen()&&(l.setClasses(),l.highlightFirstItem())}),t.on("results:append",function(e){l.append(e.data),t.isOpen()&&l.setClasses()}),t.on("query",function(e){l.hideMessages(),l.showLoading(e)}),t.on("select",function(){t.isOpen()&&(l.setClasses(),l.options.get("scrollAfterSelect")&&l.highlightFirstItem())}),t.on("unselect",function(){t.isOpen()&&(l.setClasses(),l.options.get("scrollAfterSelect")&&l.highlightFirstItem())}),t.on("open",function(){l.$results.attr("aria-expanded","true"),l.$results.attr("aria-hidden","false"),l.setClasses(),l.ensureHighlightVisible()}),t.on("close",function(){l.$results.attr("aria-expanded","false"),l.$results.attr("aria-hidden","true"),l.$results.removeAttr("aria-activedescendant")}),t.on("results:toggle",function(){var e=l.getHighlightedResults();0!==e.length&&e.trigger("mouseup")}),t.on("results:select",function(){var e=l.getHighlightedResults();if(0!==e.length){var t=f.GetData(e[0],"data");"true"==e.attr("aria-selected")?l.trigger("close",{}):l.trigger("select",{data:t})}}),t.on("results:previous",function(){var e=l.getHighlightedResults(),t=l.$results.find("[aria-selected]"),n=t.index(e);if(!(n<=0)){var r=n-1;0===e.length&&(r=0);var i=t.eq(r);i.trigger("mouseenter");var o=l.$results.offset().top,s=i.offset().top,a=l.$results.scrollTop()+(s-o);0===r?l.$results.scrollTop(0):s-o<0&&l.$results.scrollTop(a)}}),t.on("results:next",function(){var e=l.getHighlightedResults(),t=l.$results.find("[aria-selected]"),n=t.index(e)+1;if(!(n>=t.length)){var r=t.eq(n);r.trigger("mouseenter");var i=l.$results.offset().top+l.$results.outerHeight(!1),o=r.offset().top+r.outerHeight(!1),s=l.$results.scrollTop()+o-i;0===n?l.$results.scrollTop(0):i this.$results.outerHeight()||o<0)&&this.$results.scrollTop(i)}},r.prototype.template=function(e,t){var n=this.options.get("templateResult"),r=this.options.get("escapeMarkup"),i=n(e,t);null==i?t.style.display="none":"string"==typeof i?t.innerHTML=r(i):h(t).append(i)},r}),e.define("select2/keys",[],function(){return{BACKSPACE:8,TAB:9,ENTER:13,SHIFT:16,CTRL:17,ALT:18,ESC:27,SPACE:32,PAGE_UP:33,PAGE_DOWN:34,END:35,HOME:36,LEFT:37,UP:38,RIGHT:39,DOWN:40,DELETE:46}}),e.define("select2/selection/base",["jquery","../utils","../keys"],function(n,r,i){function o(e,t){this.$element=e,this.options=t,o.__super__.constructor.call(this)}return r.Extend(o,r.Observable),o.prototype.render=function(){var e=n('');return this._tabindex=0,null!=r.GetData(this.$element[0],"old-tabindex")?this._tabindex=r.GetData(this.$element[0],"old-tabindex"):null!=this.$element.attr("tabindex")&&(this._tabindex=this.$element.attr("tabindex")),e.attr("title",this.$element.attr("title")),e.attr("tabindex",this._tabindex),e.attr("aria-disabled","false"),this.$selection=e},o.prototype.bind=function(e,t){var n=this,r=e.id+"-results";this.container=e,this.$selection.on("focus",function(e){n.trigger("focus",e)}),this.$selection.on("blur",function(e){n._handleBlur(e)}),this.$selection.on("keydown",function(e){n.trigger("keypress",e),e.which===i.SPACE&&e.preventDefault()}),e.on("results:focus",function(e){n.$selection.attr("aria-activedescendant",e.data._resultId)}),e.on("selection:update",function(e){n.update(e.data)}),e.on("open",function(){n.$selection.attr("aria-expanded","true"),n.$selection.attr("aria-owns",r),n._attachCloseHandler(e)}),e.on("close",function(){n.$selection.attr("aria-expanded","false"),n.$selection.removeAttr("aria-activedescendant"),n.$selection.removeAttr("aria-owns"),n.$selection.trigger("focus"),n._detachCloseHandler(e)}),e.on("enable",function(){n.$selection.attr("tabindex",n._tabindex),n.$selection.attr("aria-disabled","false")}),e.on("disable",function(){n.$selection.attr("tabindex","-1"),n.$selection.attr("aria-disabled","true")})},o.prototype._handleBlur=function(e){var t=this;window.setTimeout(function(){document.activeElement==t.$selection[0]||n.contains(t.$selection[0],document.activeElement)||t.trigger("blur",e)},1)},o.prototype._attachCloseHandler=function(e){n(document.body).on("mousedown.select2."+e.id,function(e){var t=n(e.target).closest(".select2");n(".select2.select2-container--open").each(function(){this!=t[0]&&r.GetData(this,"element").select2("close")})})},o.prototype._detachCloseHandler=function(e){n(document.body).off("mousedown.select2."+e.id)},o.prototype.position=function(e,t){t.find(".selection").append(e)},o.prototype.destroy=function(){this._detachCloseHandler(this.container)},o.prototype.update=function(e){throw new Error("The `update` method must be defined in child classes.")},o.prototype.isEnabled=function(){return!this.isDisabled()},o.prototype.isDisabled=function(){return this.options.get("disabled")},o}),e.define("select2/selection/single",["jquery","./base","../utils","../keys"],function(e,t,n,r){function i(){i.__super__.constructor.apply(this,arguments)}return n.Extend(i,t),i.prototype.render=function(){var e=i.__super__.render.call(this);return e.addClass("select2-selection--single"),e.html(''),e},i.prototype.bind=function(t,e){var n=this;i.__super__.bind.apply(this,arguments);var r=t.id+"-container";this.$selection.find(".select2-selection__rendered").attr("id",r).attr("role","textbox").attr("aria-readonly","true"),this.$selection.attr("aria-labelledby",r),this.$selection.on("mousedown",function(e){1===e.which&&n.trigger("toggle",{originalEvent:e})}),this.$selection.on("focus",function(e){}),this.$selection.on("blur",function(e){}),t.on("focus",function(e){t.isOpen()||n.$selection.trigger("focus")})},i.prototype.clear=function(){var e=this.$selection.find(".select2-selection__rendered");e.empty(),e.removeAttr("title")},i.prototype.display=function(e,t){var n=this.options.get("templateSelection");return this.options.get("escapeMarkup")(n(e,t))},i.prototype.selectionContainer=function(){return e("")},i.prototype.update=function(e){if(0!==e.length){var t=e[0],n=this.$selection.find(".select2-selection__rendered"),r=this.display(t,n);n.empty().append(r);var i=t.title||t.text;i?n.attr("title",i):n.removeAttr("title")}else this.clear()},i}),e.define("select2/selection/multiple",["jquery","./base","../utils"],function(i,e,l){function n(e,t){n.__super__.constructor.apply(this,arguments)}return l.Extend(n,e),n.prototype.render=function(){var e=n.__super__.render.call(this);return e.addClass("select2-selection--multiple"),e.html(' '),e},n.prototype.bind=function(e,t){var r=this;n.__super__.bind.apply(this,arguments),this.$selection.on("click",function(e){r.trigger("toggle",{originalEvent:e})}),this.$selection.on("click",".select2-selection__choice__remove",function(e){if(!r.isDisabled()){var t=i(this).parent(),n=l.GetData(t[0],"data");r.trigger("unselect",{originalEvent:e,data:n})}})},n.prototype.clear=function(){var e=this.$selection.find(".select2-selection__rendered");e.empty(),e.removeAttr("title")},n.prototype.display=function(e,t){var n=this.options.get("templateSelection");return this.options.get("escapeMarkup")(n(e,t))},n.prototype.selectionContainer=function(){return i('
× ')},n.prototype.update=function(e){if(this.clear(),0!==e.length){for(var t=[],n=0;n×');a.StoreData(r[0],"data",t),this.$selection.find(".select2-selection__rendered").prepend(r)}},e}),e.define("select2/selection/search",["jquery","../utils","../keys"],function(r,a,l){function e(e,t,n){e.call(this,t,n)}return e.prototype.render=function(e){var t=r('');this.$searchContainer=t,this.$search=t.find("input");var n=e.call(this);return this._transferTabIndex(),n},e.prototype.bind=function(e,t,n){var r=this,i=t.id+"-results";e.call(this,t,n),t.on("open",function(){r.$search.attr("aria-controls",i),r.$search.trigger("focus")}),t.on("close",function(){r.$search.val(""),r.$search.removeAttr("aria-controls"),r.$search.removeAttr("aria-activedescendant"),r.$search.trigger("focus")}),t.on("enable",function(){r.$search.prop("disabled",!1),r._transferTabIndex()}),t.on("disable",function(){r.$search.prop("disabled",!0)}),t.on("focus",function(e){r.$search.trigger("focus")}),t.on("results:focus",function(e){e.data._resultId?r.$search.attr("aria-activedescendant",e.data._resultId):r.$search.removeAttr("aria-activedescendant")}),this.$selection.on("focusin",".select2-search--inline",function(e){r.trigger("focus",e)}),this.$selection.on("focusout",".select2-search--inline",function(e){r._handleBlur(e)}),this.$selection.on("keydown",".select2-search--inline",function(e){if(e.stopPropagation(),r.trigger("keypress",e),r._keyUpPrevented=e.isDefaultPrevented(),e.which===l.BACKSPACE&&""===r.$search.val()){var t=r.$searchContainer.prev(".select2-selection__choice");if(0 this.maximumInputLength?this.trigger("results:message",{message:"inputTooLong",args:{maximum:this.maximumInputLength,input:t.term,params:t}}):e.call(this,t,n)},e}),e.define("select2/data/maximumSelectionLength",[],function(){function e(e,t,n){this.maximumSelectionLength=n.get("maximumSelectionLength"),e.call(this,t,n)}return e.prototype.bind=function(e,t,n){var r=this;e.call(this,t,n),t.on("select",function(){r._checkIfMaximumSelected()})},e.prototype.query=function(e,t,n){var r=this;this._checkIfMaximumSelected(function(){e.call(r,t,n)})},e.prototype._checkIfMaximumSelected=function(e,n){var r=this;this.current(function(e){var t=null!=e?e.length:0;0 =r.maximumSelectionLength?r.trigger("results:message",{message:"maximumSelected",args:{maximum:r.maximumSelectionLength}}):n&&n()})},e}),e.define("select2/dropdown",["jquery","./utils"],function(t,e){function n(e,t){this.$element=e,this.options=t,n.__super__.constructor.call(this)}return e.Extend(n,e.Observable),n.prototype.render=function(){var e=t('');return e.attr("dir",this.options.get("dir")),this.$dropdown=e},n.prototype.bind=function(){},n.prototype.position=function(e,t){},n.prototype.destroy=function(){this.$dropdown.remove()},n}),e.define("select2/dropdown/search",["jquery","../utils"],function(o,e){function t(){}return t.prototype.render=function(e){var t=e.call(this),n=o('');return this.$searchContainer=n,this.$search=n.find("input"),t.prepend(n),t},t.prototype.bind=function(e,t,n){var r=this,i=t.id+"-results";e.call(this,t,n),this.$search.on("keydown",function(e){r.trigger("keypress",e),r._keyUpPrevented=e.isDefaultPrevented()}),this.$search.on("input",function(e){o(this).off("keyup")}),this.$search.on("keyup input",function(e){r.handleSearch(e)}),t.on("open",function(){r.$search.attr("tabindex",0),r.$search.attr("aria-controls",i),r.$search.trigger("focus"),window.setTimeout(function(){r.$search.trigger("focus")},0)}),t.on("close",function(){r.$search.attr("tabindex",-1),r.$search.removeAttr("aria-controls"),r.$search.removeAttr("aria-activedescendant"),r.$search.val(""),r.$search.trigger("blur")}),t.on("focus",function(){t.isOpen()||r.$search.trigger("focus")}),t.on("results:all",function(e){null!=e.query.term&&""!==e.query.term||(r.showSearch(e)?r.$searchContainer.removeClass("select2-search--hide"):r.$searchContainer.addClass("select2-search--hide"))}),t.on("results:focus",function(e){e.data._resultId?r.$search.attr("aria-activedescendant",e.data._resultId):r.$search.removeAttr("aria-activedescendant")})},t.prototype.handleSearch=function(e){if(!this._keyUpPrevented){var t=this.$search.val();this.trigger("query",{term:t})}this._keyUpPrevented=!1},t.prototype.showSearch=function(e,t){return!0},t}),e.define("select2/dropdown/hidePlaceholder",[],function(){function e(e,t,n,r){this.placeholder=this.normalizePlaceholder(n.get("placeholder")),e.call(this,t,n,r)}return e.prototype.append=function(e,t){t.results=this.removePlaceholder(t.results),e.call(this,t)},e.prototype.normalizePlaceholder=function(e,t){return"string"==typeof t&&(t={id:"",text:t}),t},e.prototype.removePlaceholder=function(e,t){for(var n=t.slice(0),r=t.length-1;0<=r;r--){var i=t[r];this.placeholder.id===i.id&&n.splice(r,1)}return n},e}),e.define("select2/dropdown/infiniteScroll",["jquery"],function(n){function e(e,t,n,r){this.lastParams={},e.call(this,t,n,r),this.$loadingMore=this.createLoadingMore(),this.loading=!1}return e.prototype.append=function(e,t){this.$loadingMore.remove(),this.loading=!1,e.call(this,t),this.showLoadingMore(t)&&(this.$results.append(this.$loadingMore),this.loadMoreIfNeeded())},e.prototype.bind=function(e,t,n){var r=this;e.call(this,t,n),t.on("query",function(e){r.lastParams=e,r.loading=!0}),t.on("query:append",function(e){r.lastParams=e,r.loading=!0}),this.$results.on("scroll",this.loadMoreIfNeeded.bind(this))},e.prototype.loadMoreIfNeeded=function(){var e=n.contains(document.documentElement,this.$loadingMore[0]);if(!this.loading&&e){var t=this.$results.offset().top+this.$results.outerHeight(!1);this.$loadingMore.offset().top+this.$loadingMore.outerHeight(!1)<=t+50&&this.loadMore()}},e.prototype.loadMore=function(){this.loading=!0;var e=n.extend({},{page:1},this.lastParams);e.page++,this.trigger("query:append",e)},e.prototype.showLoadingMore=function(e,t){return t.pagination&&t.pagination.more},e.prototype.createLoadingMore=function(){var e=n(''),t=this.options.get("translations").get("loadingMore");return e.html(t(this.lastParams)),e},e}),e.define("select2/dropdown/attachBody",["jquery","../utils"],function(f,a){function e(e,t,n){this.$dropdownParent=f(n.get("dropdownParent")||document.body),e.call(this,t,n)}return e.prototype.bind=function(e,t,n){var r=this;e.call(this,t,n),t.on("open",function(){r._showDropdown(),r._attachPositioningHandler(t),r._bindContainerResultHandlers(t)}),t.on("close",function(){r._hideDropdown(),r._detachPositioningHandler(t)}),this.$dropdownContainer.on("mousedown",function(e){e.stopPropagation()})},e.prototype.destroy=function(e){e.call(this),this.$dropdownContainer.remove()},e.prototype.position=function(e,t,n){t.attr("class",n.attr("class")),t.removeClass("select2"),t.addClass("select2-container--open"),t.css({position:"absolute",top:-999999}),this.$container=n},e.prototype.render=function(e){var t=f(""),n=e.call(this);return t.append(n),this.$dropdownContainer=t},e.prototype._hideDropdown=function(e){this.$dropdownContainer.detach()},e.prototype._bindContainerResultHandlers=function(e,t){if(!this._containerResultsHandlersBound){var n=this;t.on("results:all",function(){n._positionDropdown(),n._resizeDropdown()}),t.on("results:append",function(){n._positionDropdown(),n._resizeDropdown()}),t.on("results:message",function(){n._positionDropdown(),n._resizeDropdown()}),t.on("select",function(){n._positionDropdown(),n._resizeDropdown()}),t.on("unselect",function(){n._positionDropdown(),n._resizeDropdown()}),this._containerResultsHandlersBound=!0}},e.prototype._attachPositioningHandler=function(e,t){var n=this,r="scroll.select2."+t.id,i="resize.select2."+t.id,o="orientationchange.select2."+t.id,s=this.$container.parents().filter(a.hasScroll);s.each(function(){a.StoreData(this,"select2-scroll-position",{x:f(this).scrollLeft(),y:f(this).scrollTop()})}),s.on(r,function(e){var t=a.GetData(this,"select2-scroll-position");f(this).scrollTop(t.y)}),f(window).on(r+" "+i+" "+o,function(e){n._positionDropdown(),n._resizeDropdown()})},e.prototype._detachPositioningHandler=function(e,t){var n="scroll.select2."+t.id,r="resize.select2."+t.id,i="orientationchange.select2."+t.id;this.$container.parents().filter(a.hasScroll).off(n),f(window).off(n+" "+r+" "+i)},e.prototype._positionDropdown=function(){var e=f(window),t=this.$dropdown.hasClass("select2-dropdown--above"),n=this.$dropdown.hasClass("select2-dropdown--below"),r=null,i=this.$container.offset();i.bottom=i.top+this.$container.outerHeight(!1);var o={height:this.$container.outerHeight(!1)};o.top=i.top,o.bottom=i.top+o.height;var s=this.$dropdown.outerHeight(!1),a=e.scrollTop(),l=e.scrollTop()+e.height(),c=a i.bottom+s,d={left:i.left,top:o.bottom},p=this.$dropdownParent;"static"===p.css("position")&&(p=p.offsetParent());var h={top:0,left:0};(f.contains(document.body,p[0])||p[0].isConnected)&&(h=p.offset()),d.top-=h.top,d.left-=h.left,t||n||(r="below"),u||!c||t?!c&&u&&t&&(r="below"):r="above",("above"==r||t&&"below"!==r)&&(d.top=o.top-h.top-s),null!=r&&(this.$dropdown.removeClass("select2-dropdown--below select2-dropdown--above").addClass("select2-dropdown--"+r),this.$container.removeClass("select2-container--below select2-container--above").addClass("select2-container--"+r)),this.$dropdownContainer.css(d)},e.prototype._resizeDropdown=function(){var e={width:this.$container.outerWidth(!1)+"px"};this.options.get("dropdownAutoWidth")&&(e.minWidth=e.width,e.position="relative",e.width="auto"),this.$dropdown.css(e)},e.prototype._showDropdown=function(e){this.$dropdownContainer.appendTo(this.$dropdownParent),this._positionDropdown(),this._resizeDropdown()},e}),e.define("select2/dropdown/minimumResultsForSearch",[],function(){function e(e,t,n,r){this.minimumResultsForSearch=n.get("minimumResultsForSearch"),this.minimumResultsForSearch<0&&(this.minimumResultsForSearch=1/0),e.call(this,t,n,r)}return e.prototype.showSearch=function(e,t){return!(function e(t){for(var n=0,r=0;r ');return e.attr("dir",this.options.get("dir")),this.$container=e,this.$container.addClass("select2-container--"+this.options.get("theme")),u.StoreData(e[0],"element",this.$element),e},d}),e.define("jquery-mousewheel",["jquery"],function(e){return e}),e.define("jquery.select2",["jquery","jquery-mousewheel","./select2/core","./select2/defaults","./select2/utils"],function(i,e,o,t,s){if(null==i.fn.select2){var a=["open","close","destroy"];i.fn.select2=function(t){if("object"==typeof(t=t||{}))return this.each(function(){var e=i.extend(!0,{},t);new o(i(this),e)}),this;if("string"!=typeof t)throw new Error("Invalid arguments for Select2: "+t);var n,r=Array.prototype.slice.call(arguments,1);return this.each(function(){var e=s.GetData(this,"select2");null==e&&window.console&&console.error&&console.error("The select2('"+t+"') method was called on an element that is not using Select2."),n=e[t].apply(e,r)}),-1 ${response.msg} `); + setTimeout(function () { + $('.gitf_feedback').hide(); + location.reload(); + }, 3000); + } else { + $('.gitf_feedback').show(); + $('.gitf_feedback').html(` ${response.msg}
`); + setTimeout(function () { + $('.gitf_feedback').hide(); + // location.reload(); + }, 3000); + } + }, + error: function (err) { + $('.new_app').append(`يوجد مشكلة !!
`) + } + }); + }); +}) \ No newline at end of file diff --git a/odex25_takaful/takaful_portal_sponsor/static/js/sponsorship_creation.js b/odex25_takaful/takaful_portal_sponsor/static/js/sponsorship_creation.js new file mode 100644 index 000000000..4dba7344b --- /dev/null +++ b/odex25_takaful/takaful_portal_sponsor/static/js/sponsorship_creation.js @@ -0,0 +1,102 @@ +$(document).ready(function () { + $(".widow_type").hide() + const urlSearchParams = new URLSearchParams(window.location.search); + const benefit_type = urlSearchParams.get("benefit_type"); + console.log(benefit_type); + const benefit_id = urlSearchParams.get("benefit_id"); + let benefit_type_input = $("#benefit_type_sponsorship") + let benefit_id_input = $("#benefit_id_sponsorship") + benefit_type_input.val(benefit_type); + benefit_id_input.val(benefit_id); + if (benefit_type_input.val() == 'orphan') { + $(".widow_type").hide() + } + else { + $(".widow_type").show() + } + + + $('#orphan_ids').on('change', function () { + var selectedOptions = $('#orphan_ids option:selected'); + $('#selected_options').empty(); // Clear the previous content + selectedOptions.each(function () { + var fullName = $(this).text().trim(); + var firstName = fullName.split(' ')[0]; + var spanElement = ` ${firstName} ` + $('#selected_options').append(spanElement); + }); + }); + + $(document).on('click', '.remove_btn', function () { + $(this).parent('span').remove(); + }); + + //show and hide gifter data depend on is_gift input + $('.gifter_data').hide(); + $('input[name="is_gift"]').change(function () { + if ($(this).val() === 'yes') { + $('.gifter_data').show(); + } else if ($(this).val() === 'no') { + + $('.gifter_data').hide(); + } + }); + $('.months_num').hide(); + $('#sponsorship_duration').change(function () { + if ($(this).val() === 'permanent') { + $('.months_num').hide(); + } else { + $('.months_num').show(); + } + }); + $('#months_number').on('input', function () { + var input1 = $(this).val(); + var input2 = $('#month_amount').val(); + $('#kafala_total').val(input1 * input2) + }); + + $('input[name="with_orphan"]').change(function () { + if ($(this).val() === 'yes') { + $('.isOrphan').show(); + } else if ($(this).val() === 'no') { + $('.isOrphan').hide(); + } + }); + + + let sponsorships_api = "/portal/sponsor/sponsorships/create/"; + $('form#single_sponsorship_form').on('submit', function (evt) { + evt.preventDefault(); + var form_data = $(this).serialize(); + $.ajax({ + type: "POST", + url: sponsorships_api, + data: form_data, + dataType: 'json', + processData: false, + success: function (response) { + console.log(response); + if (response.status === true) { + $('.sponsorship_creation_feedback').show(); + $('.sponsorship_creation_feedback').html(`${response.msg}
`); + setTimeout(function () { + $('.sponsorship_creation_feedback').hide(); + // location.reload(); + $('#SingleKafala').modal('hide'); + + }, 3000); + } else { + $('.sponsorship_creation_feedback').show(); + $('.sponsorship_creation_feedback').html(`${response.msg}
`); + setTimeout(function () { + // $('.sponsorship_creation_feedback').hide(); + // location.reload(); + }, 3000); + } + }, + error: function (err) { + $('.sponsorship_creation_feedback').append(`يوجد مشكلة !!
`) + } + }); + }); +}); diff --git a/odex25_takaful/takaful_portal_sponsor/static/js/sponsorship_gift.js b/odex25_takaful/takaful_portal_sponsor/static/js/sponsorship_gift.js new file mode 100644 index 000000000..7baa0e15d --- /dev/null +++ b/odex25_takaful/takaful_portal_sponsor/static/js/sponsorship_gift.js @@ -0,0 +1,40 @@ +$(document).ready(function () { + const urlSearchParams = new URLSearchParams(window.location.search); + const benefit_id = urlSearchParams.get("benefit_id"); + $("#benefit_id").val(benefit_id); + let payment = "/portal/sponsor/paying_demo/save"; + $('form#gifter_form').on('submit', function (evt) { + evt.preventDefault(); + var form_data = $(this).serialize(); + $.ajax({ + type: "POST", + url: payment, + data: form_data, + dataType:'json', + processData: false, + success: function (response) { + console.log(response); + console.log(response.status); + console.log(response.msg); + if (response.status === true) { + $('.gitf_feedback').show(); + $('.gitf_feedback').html(`${response.msg}
`); + setTimeout(function () { + $('.gitf_feedback').hide(); + // location.reload(); + }, 3000); + } else { + $('.gitf_feedback').show(); + $('.gitf_feedback').html(`${response.msg}
`); + setTimeout(function () { + $('.gitf_feedback').hide(); + // location.reload(); + }, 3000); + } + }, + error: function (err) { + $('.new_app').html(`${err.msg}
`) + } + }); + }); +}) \ No newline at end of file diff --git a/odex25_takaful/takaful_portal_sponsor/static/js/sponsorship_needs_details.js b/odex25_takaful/takaful_portal_sponsor/static/js/sponsorship_needs_details.js new file mode 100644 index 000000000..97faffbdd --- /dev/null +++ b/odex25_takaful/takaful_portal_sponsor/static/js/sponsorship_needs_details.js @@ -0,0 +1,155 @@ +$(document).ready(function () { + const urlSearchParams = new URLSearchParams(window.location.search); + const benefit_type = urlSearchParams.get("benefit_type"); + const benefit_id = urlSearchParams.get("benefit_id"); + // benefit details + $.ajax({ + url: `/portal/sponsor/benefit/info?benefit_type=${benefit_type}&benefit_id=${benefit_id}`, + type: 'GET', + dataType: 'json', + success: function (data) { + result = data.benefit; + if(benefit_type == 'widow'){ + windowOrphans = result.orphan_ids + } + console.log(result); + var html = ''; + if (data.status) { + console.log(result); + html += + ` ++++++++ بيانات اليتيم +
+++
+- +
+الاسم
+ ${result.name} +- +
+الجنس
+ ${result.gender} +- +
+السن
+ ${result.age} +- +
+المدينة
+ ${result.city_id} +- +
+رقم اليتيم
+ ${result.number} +- +
+نوع الحالة
+ ${result.benefit_type} ++++++ بيانات شخصية و إجتماعية +
+++
+- +
+العائل الحالي
+ ${result.responsible} +- +
+حالة السكن
+ ${result.housing_status} +- +
+التعليم
+ ${result.education_status} +- +
+المرحلة الدراسية
+ ${result.education_level} +- +
+الصف الدراسي
+ ${result.class_room} +- +
+الحالة الصحية
+ ${result.health_status} +- +
+كم يحفظ من القران
+ ${result.quran_parts} +++ ` + $('.makfoul_data .need_sponsorship_details').html(html); + $("#gift_modal #name, #contribution_modal #name, #SingleKafala #name").val(result.name) + $("#gift_modal #number, #contribution_modal #number, #SingleKafala #number").val(result.number) + $("#gift_modal #benefit_type, #contribution_modal #benefit_type, #SingleKafala #benefit_type").val(result.benefit_type) + $(".need_sponsorship_name").append( ` اليتيم ${result.name} ` ) + $('#SingleKafala #month_amount').val(result.benefit_total_need) + + windowOrphans.forEach((element, i) => { + $('#orphan_ids').append( + + ` + + ` + ) + + }); + } + else { + console.log(data.msg); + } + }, + error: function (error) { + console.log(error); + } + }); +}) \ No newline at end of file diff --git a/odex25_takaful/takaful_portal_sponsor/static/js/sponsorships_needs.js b/odex25_takaful/takaful_portal_sponsor/static/js/sponsorships_needs.js new file mode 100644 index 000000000..3d36650ca --- /dev/null +++ b/odex25_takaful/takaful_portal_sponsor/static/js/sponsorships_needs.js @@ -0,0 +1,74 @@ + +$(document).ready(function () { + var currentPage = 1; + var benefitType = 'orphan'; // Default value + var prev + var next + function loadNeedSponsorships(page) { + $.ajax({ + url: '/portal/sys/benefits/page/' + page, + type: 'GET', + data: { benefit_type: benefitType }, + dataType: 'json', + success: function (data) { + results = data.results; + console.log(results); + var html = ''; + if (data.status) { + results.forEach((element, i) => { + html += + ` ++++++ احتياجات اليتيم +
+++
+- +
+نسبة الإحتياج
+ ${result.benefit_needs_percent} % +- +
+احتياجات طارئة
+ ${result.benefit_available_need} +- +
+متأخرات مالية
+ ${result.benefit_arrears_value} +- +
+الاحتياج الشهري
+ ${result.benefit_total_need} ++ + ` + $('#benefit_ids').append(``) + }); + $('.need_sponsorship tbody').html(html); + next = data.next_page; + prev = (currentPage > 1) ? currentPage - 1 : null; + currentPage = page; + + } + else { + console.log(data.msg); + } + }, + error: function (error) { + console.log(error); + } + }); + } + loadNeedSponsorships(1); + function updateButtons(next, prev) { + $('#benefits-next').attr('disabled', (next == null)); + $('#benefits-prev').attr('disabled', (prev == null)); + } + + $('#benefit-type').change(function () { + benefitType = $(this).val(); + $('.financial_donation tbody tr #benefit_dtls').data("type", benefitType) + loadNeedSponsorships(1); + }); + $('#benefits-prev').click(function () { + loadNeedSponsorships(currentPage - 1); + updateButtons(next, prev) + + }); + $('#benefits-next').click(function () { + loadNeedSponsorships(currentPage + 1); + updateButtons(next, prev) + }); + +}) \ No newline at end of file diff --git a/odex25_takaful/takaful_portal_sponsor/static/js/sponsorships_pay.js b/odex25_takaful/takaful_portal_sponsor/static/js/sponsorships_pay.js new file mode 100644 index 000000000..bb07849d5 --- /dev/null +++ b/odex25_takaful/takaful_portal_sponsor/static/js/sponsorships_pay.js @@ -0,0 +1,75 @@ +$(document).ready(function () { + var currentPage = 1; + var benefitType = 'orphan'; // Default value + var prev + function sponsorshipPay(page) { + $.ajax({ + url: '/portal/sponsor/sponsorships/page/' + page, + type: 'GET', + data: { benefit_type: benefitType }, + dataType: 'json', + success: function (data) { + results = data.results; + const filteredData = results.filter(item => item.month_count == 0); + console.log(filteredData); + var html = ''; + if (data.status) { + filteredData.forEach((element, i) => { + html += + ` +${i + 1} +${element.first_name} +${element.gender} +${element.age} +${element.city_id} +${element.benefit_type} +${element.benefit_needs_percent} % ++ ++ اكفلني الان +++ + + ` + }); + $('.sponsorships_pay tbody').html(html); + next = data.next_page; + prev = (currentPage > 1) ? currentPage - 1 : null; + currentPage = page; + } + else { + console.log(data.msg); + } + }, + error: function (jqXHR, textStatus, errorThrown) { + console.log(textStatus + ': ' + errorThrown); + } + }); + } + sponsorshipPay(1); + sponsorshipsCancelation(1) + function updateButtons(next, prev) { + $('#benefits-next').attr('disabled', (next == null)); + $('#benefits-prev').attr('disabled', (prev == null)); + } + $('#benefit-type').change(function () { + benefitType = $(this).val(); + $('.financial_donation tbody tr').data("type", benefitType) + sponsorshipPay(1); + }); + $('#benefits-prev').click(function () { + sponsorshipPay(currentPage - 1); + updateButtons(next, prev) + + }); + $('#benefits-next').click(function () { + sponsorshipPay(currentPage + 1); + updateButtons(next, prev) + }); + +}); \ No newline at end of file diff --git a/odex25_takaful/takaful_portal_sponsor/static/libs/bootstrap3/bootstrap-theme.min.css b/odex25_takaful/takaful_portal_sponsor/static/libs/bootstrap3/bootstrap-theme.min.css new file mode 100644 index 000000000..69cc8f2ae --- /dev/null +++ b/odex25_takaful/takaful_portal_sponsor/static/libs/bootstrap3/bootstrap-theme.min.css @@ -0,0 +1,6 @@ +/*! + * Bootstrap v3.3.7 (http://getbootstrap.com) + * Copyright 2011-2016 Twitter, Inc. + * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) + */.btn-danger,.btn-default,.btn-info,.btn-primary,.btn-success,.btn-warning{text-shadow:0 -1px 0 rgba(0,0,0,.2);-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,.15),0 1px 1px rgba(0,0,0,.075);box-shadow:inset 0 1px 0 rgba(255,255,255,.15),0 1px 1px rgba(0,0,0,.075)}.btn-danger.active,.btn-danger:active,.btn-default.active,.btn-default:active,.btn-info.active,.btn-info:active,.btn-primary.active,.btn-primary:active,.btn-success.active,.btn-success:active,.btn-warning.active,.btn-warning:active{-webkit-box-shadow:inset 0 3px 5px rgba(0,0,0,.125);box-shadow:inset 0 3px 5px rgba(0,0,0,.125)}.btn-danger.disabled,.btn-danger[disabled],.btn-default.disabled,.btn-default[disabled],.btn-info.disabled,.btn-info[disabled],.btn-primary.disabled,.btn-primary[disabled],.btn-success.disabled,.btn-success[disabled],.btn-warning.disabled,.btn-warning[disabled],fieldset[disabled] .btn-danger,fieldset[disabled] .btn-default,fieldset[disabled] .btn-info,fieldset[disabled] .btn-primary,fieldset[disabled] .btn-success,fieldset[disabled] .btn-warning{-webkit-box-shadow:none;box-shadow:none}.btn-danger .badge,.btn-default .badge,.btn-info .badge,.btn-primary .badge,.btn-success .badge,.btn-warning .badge{text-shadow:none}.btn.active,.btn:active{background-image:none}.btn-default{text-shadow:0 1px 0 #fff;background-image:-webkit-linear-gradient(top,#fff 0,#e0e0e0 100%);background-image:-o-linear-gradient(top,#fff 0,#e0e0e0 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#fff),to(#e0e0e0));background-image:linear-gradient(to bottom,#fff 0,#e0e0e0 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff', endColorstr='#ffe0e0e0', GradientType=0);filter:progid:DXImageTransform.Microsoft.gradient(enabled=false);background-repeat:repeat-x;border-color:#dbdbdb;border-color:#ccc}.btn-default:focus,.btn-default:hover{background-color:#e0e0e0;background-position:100% -15px}.btn-default.active,.btn-default:active{background-color:#e0e0e0;border-color:#dbdbdb}.btn-default.disabled,.btn-default.disabled.active,.btn-default.disabled.focus,.btn-default.disabled:active,.btn-default.disabled:focus,.btn-default.disabled:hover,.btn-default[disabled],.btn-default[disabled].active,.btn-default[disabled].focus,.btn-default[disabled]:active,.btn-default[disabled]:focus,.btn-default[disabled]:hover,fieldset[disabled] .btn-default,fieldset[disabled] .btn-default.active,fieldset[disabled] .btn-default.focus,fieldset[disabled] .btn-default:active,fieldset[disabled] .btn-default:focus,fieldset[disabled] .btn-default:hover{background-color:#e0e0e0;background-image:none}.btn-primary{background-image:-webkit-linear-gradient(top,#337ab7 0,#265a88 100%);background-image:-o-linear-gradient(top,#337ab7 0,#265a88 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#337ab7),to(#265a88));background-image:linear-gradient(to bottom,#337ab7 0,#265a88 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff337ab7', endColorstr='#ff265a88', GradientType=0);filter:progid:DXImageTransform.Microsoft.gradient(enabled=false);background-repeat:repeat-x;border-color:#245580}.btn-primary:focus,.btn-primary:hover{background-color:#265a88;background-position:100% -15px}.btn-primary.active,.btn-primary:active{background-color:#265a88;border-color:#245580}.btn-primary.disabled,.btn-primary.disabled.active,.btn-primary.disabled.focus,.btn-primary.disabled:active,.btn-primary.disabled:focus,.btn-primary.disabled:hover,.btn-primary[disabled],.btn-primary[disabled].active,.btn-primary[disabled].focus,.btn-primary[disabled]:active,.btn-primary[disabled]:focus,.btn-primary[disabled]:hover,fieldset[disabled] .btn-primary,fieldset[disabled] .btn-primary.active,fieldset[disabled] .btn-primary.focus,fieldset[disabled] .btn-primary:active,fieldset[disabled] .btn-primary:focus,fieldset[disabled] .btn-primary:hover{background-color:#265a88;background-image:none}.btn-success{background-image:-webkit-linear-gradient(top,#5cb85c 0,#419641 100%);background-image:-o-linear-gradient(top,#5cb85c 0,#419641 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#5cb85c),to(#419641));background-image:linear-gradient(to bottom,#5cb85c 0,#419641 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5cb85c', endColorstr='#ff419641', GradientType=0);filter:progid:DXImageTransform.Microsoft.gradient(enabled=false);background-repeat:repeat-x;border-color:#3e8f3e}.btn-success:focus,.btn-success:hover{background-color:#419641;background-position:100% -15px}.btn-success.active,.btn-success:active{background-color:#419641;border-color:#3e8f3e}.btn-success.disabled,.btn-success.disabled.active,.btn-success.disabled.focus,.btn-success.disabled:active,.btn-success.disabled:focus,.btn-success.disabled:hover,.btn-success[disabled],.btn-success[disabled].active,.btn-success[disabled].focus,.btn-success[disabled]:active,.btn-success[disabled]:focus,.btn-success[disabled]:hover,fieldset[disabled] .btn-success,fieldset[disabled] .btn-success.active,fieldset[disabled] .btn-success.focus,fieldset[disabled] .btn-success:active,fieldset[disabled] .btn-success:focus,fieldset[disabled] .btn-success:hover{background-color:#419641;background-image:none}.btn-info{background-image:-webkit-linear-gradient(top,#5bc0de 0,#2aabd2 100%);background-image:-o-linear-gradient(top,#5bc0de 0,#2aabd2 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#5bc0de),to(#2aabd2));background-image:linear-gradient(to bottom,#5bc0de 0,#2aabd2 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5bc0de', endColorstr='#ff2aabd2', GradientType=0);filter:progid:DXImageTransform.Microsoft.gradient(enabled=false);background-repeat:repeat-x;border-color:#28a4c9}.btn-info:focus,.btn-info:hover{background-color:#2aabd2;background-position:100% -15px}.btn-info.active,.btn-info:active{background-color:#2aabd2;border-color:#28a4c9}.btn-info.disabled,.btn-info.disabled.active,.btn-info.disabled.focus,.btn-info.disabled:active,.btn-info.disabled:focus,.btn-info.disabled:hover,.btn-info[disabled],.btn-info[disabled].active,.btn-info[disabled].focus,.btn-info[disabled]:active,.btn-info[disabled]:focus,.btn-info[disabled]:hover,fieldset[disabled] .btn-info,fieldset[disabled] .btn-info.active,fieldset[disabled] .btn-info.focus,fieldset[disabled] .btn-info:active,fieldset[disabled] .btn-info:focus,fieldset[disabled] .btn-info:hover{background-color:#2aabd2;background-image:none}.btn-warning{background-image:-webkit-linear-gradient(top,#f0ad4e 0,#eb9316 100%);background-image:-o-linear-gradient(top,#f0ad4e 0,#eb9316 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#f0ad4e),to(#eb9316));background-image:linear-gradient(to bottom,#f0ad4e 0,#eb9316 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff0ad4e', endColorstr='#ffeb9316', GradientType=0);filter:progid:DXImageTransform.Microsoft.gradient(enabled=false);background-repeat:repeat-x;border-color:#e38d13}.btn-warning:focus,.btn-warning:hover{background-color:#eb9316;background-position:100% -15px}.btn-warning.active,.btn-warning:active{background-color:#eb9316;border-color:#e38d13}.btn-warning.disabled,.btn-warning.disabled.active,.btn-warning.disabled.focus,.btn-warning.disabled:active,.btn-warning.disabled:focus,.btn-warning.disabled:hover,.btn-warning[disabled],.btn-warning[disabled].active,.btn-warning[disabled].focus,.btn-warning[disabled]:active,.btn-warning[disabled]:focus,.btn-warning[disabled]:hover,fieldset[disabled] .btn-warning,fieldset[disabled] .btn-warning.active,fieldset[disabled] .btn-warning.focus,fieldset[disabled] .btn-warning:active,fieldset[disabled] .btn-warning:focus,fieldset[disabled] .btn-warning:hover{background-color:#eb9316;background-image:none}.btn-danger{background-image:-webkit-linear-gradient(top,#d9534f 0,#c12e2a 100%);background-image:-o-linear-gradient(top,#d9534f 0,#c12e2a 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#d9534f),to(#c12e2a));background-image:linear-gradient(to bottom,#d9534f 0,#c12e2a 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffd9534f', endColorstr='#ffc12e2a', GradientType=0);filter:progid:DXImageTransform.Microsoft.gradient(enabled=false);background-repeat:repeat-x;border-color:#b92c28}.btn-danger:focus,.btn-danger:hover{background-color:#c12e2a;background-position:100% -15px}.btn-danger.active,.btn-danger:active{background-color:#c12e2a;border-color:#b92c28}.btn-danger.disabled,.btn-danger.disabled.active,.btn-danger.disabled.focus,.btn-danger.disabled:active,.btn-danger.disabled:focus,.btn-danger.disabled:hover,.btn-danger[disabled],.btn-danger[disabled].active,.btn-danger[disabled].focus,.btn-danger[disabled]:active,.btn-danger[disabled]:focus,.btn-danger[disabled]:hover,fieldset[disabled] .btn-danger,fieldset[disabled] .btn-danger.active,fieldset[disabled] .btn-danger.focus,fieldset[disabled] .btn-danger:active,fieldset[disabled] .btn-danger:focus,fieldset[disabled] .btn-danger:hover{background-color:#c12e2a;background-image:none}.img-thumbnail,.thumbnail{-webkit-box-shadow:0 1px 2px rgba(0,0,0,.075);box-shadow:0 1px 2px rgba(0,0,0,.075)}.dropdown-menu>li>a:focus,.dropdown-menu>li>a:hover{background-color:#e8e8e8;background-image:-webkit-linear-gradient(top,#f5f5f5 0,#e8e8e8 100%);background-image:-o-linear-gradient(top,#f5f5f5 0,#e8e8e8 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#f5f5f5),to(#e8e8e8));background-image:linear-gradient(to bottom,#f5f5f5 0,#e8e8e8 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff5f5f5', endColorstr='#ffe8e8e8', GradientType=0);background-repeat:repeat-x}.dropdown-menu>.active>a,.dropdown-menu>.active>a:focus,.dropdown-menu>.active>a:hover{background-color:#2e6da4;background-image:-webkit-linear-gradient(top,#337ab7 0,#2e6da4 100%);background-image:-o-linear-gradient(top,#337ab7 0,#2e6da4 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#337ab7),to(#2e6da4));background-image:linear-gradient(to bottom,#337ab7 0,#2e6da4 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff337ab7', endColorstr='#ff2e6da4', GradientType=0);background-repeat:repeat-x}.navbar-default{background-image:-webkit-linear-gradient(top,#fff 0,#f8f8f8 100%);background-image:-o-linear-gradient(top,#fff 0,#f8f8f8 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#fff),to(#f8f8f8));background-image:linear-gradient(to bottom,#fff 0,#f8f8f8 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff', endColorstr='#fff8f8f8', GradientType=0);filter:progid:DXImageTransform.Microsoft.gradient(enabled=false);background-repeat:repeat-x;border-radius:4px;-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,.15),0 1px 5px rgba(0,0,0,.075);box-shadow:inset 0 1px 0 rgba(255,255,255,.15),0 1px 5px rgba(0,0,0,.075)}.navbar-default .navbar-nav>.active>a,.navbar-default .navbar-nav>.open>a{background-image:-webkit-linear-gradient(top,#dbdbdb 0,#e2e2e2 100%);background-image:-o-linear-gradient(top,#dbdbdb 0,#e2e2e2 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#dbdbdb),to(#e2e2e2));background-image:linear-gradient(to bottom,#dbdbdb 0,#e2e2e2 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffdbdbdb', endColorstr='#ffe2e2e2', GradientType=0);background-repeat:repeat-x;-webkit-box-shadow:inset 0 3px 9px rgba(0,0,0,.075);box-shadow:inset 0 3px 9px rgba(0,0,0,.075)}.navbar-brand,.navbar-nav>li>a{text-shadow:0 1px 0 rgba(255,255,255,.25)}.navbar-inverse{background-image:-webkit-linear-gradient(top,#3c3c3c 0,#222 100%);background-image:-o-linear-gradient(top,#3c3c3c 0,#222 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#3c3c3c),to(#222));background-image:linear-gradient(to bottom,#3c3c3c 0,#222 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff3c3c3c', endColorstr='#ff222222', GradientType=0);filter:progid:DXImageTransform.Microsoft.gradient(enabled=false);background-repeat:repeat-x;border-radius:4px}.navbar-inverse .navbar-nav>.active>a,.navbar-inverse .navbar-nav>.open>a{background-image:-webkit-linear-gradient(top,#080808 0,#0f0f0f 100%);background-image:-o-linear-gradient(top,#080808 0,#0f0f0f 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#080808),to(#0f0f0f));background-image:linear-gradient(to bottom,#080808 0,#0f0f0f 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff080808', endColorstr='#ff0f0f0f', GradientType=0);background-repeat:repeat-x;-webkit-box-shadow:inset 0 3px 9px rgba(0,0,0,.25);box-shadow:inset 0 3px 9px rgba(0,0,0,.25)}.navbar-inverse .navbar-brand,.navbar-inverse .navbar-nav>li>a{text-shadow:0 -1px 0 rgba(0,0,0,.25)}.navbar-fixed-bottom,.navbar-fixed-top,.navbar-static-top{border-radius:0}@media (max-width:767px){.navbar .navbar-nav .open .dropdown-menu>.active>a,.navbar .navbar-nav .open .dropdown-menu>.active>a:focus,.navbar .navbar-nav .open .dropdown-menu>.active>a:hover{color:#fff;background-image:-webkit-linear-gradient(top,#337ab7 0,#2e6da4 100%);background-image:-o-linear-gradient(top,#337ab7 0,#2e6da4 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#337ab7),to(#2e6da4));background-image:linear-gradient(to bottom,#337ab7 0,#2e6da4 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff337ab7', endColorstr='#ff2e6da4', GradientType=0);background-repeat:repeat-x}}.alert{text-shadow:0 1px 0 rgba(255,255,255,.2);-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,.25),0 1px 2px rgba(0,0,0,.05);box-shadow:inset 0 1px 0 rgba(255,255,255,.25),0 1px 2px rgba(0,0,0,.05)}.alert-success{background-image:-webkit-linear-gradient(top,#dff0d8 0,#c8e5bc 100%);background-image:-o-linear-gradient(top,#dff0d8 0,#c8e5bc 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#dff0d8),to(#c8e5bc));background-image:linear-gradient(to bottom,#dff0d8 0,#c8e5bc 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffdff0d8', endColorstr='#ffc8e5bc', GradientType=0);background-repeat:repeat-x;border-color:#b2dba1}.alert-info{background-image:-webkit-linear-gradient(top,#d9edf7 0,#b9def0 100%);background-image:-o-linear-gradient(top,#d9edf7 0,#b9def0 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#d9edf7),to(#b9def0));background-image:linear-gradient(to bottom,#d9edf7 0,#b9def0 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffd9edf7', endColorstr='#ffb9def0', GradientType=0);background-repeat:repeat-x;border-color:#9acfea}.alert-warning{background-image:-webkit-linear-gradient(top,#fcf8e3 0,#f8efc0 100%);background-image:-o-linear-gradient(top,#fcf8e3 0,#f8efc0 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#fcf8e3),to(#f8efc0));background-image:linear-gradient(to bottom,#fcf8e3 0,#f8efc0 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fffcf8e3', endColorstr='#fff8efc0', GradientType=0);background-repeat:repeat-x;border-color:#f5e79e}.alert-danger{background-image:-webkit-linear-gradient(top,#f2dede 0,#e7c3c3 100%);background-image:-o-linear-gradient(top,#f2dede 0,#e7c3c3 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#f2dede),to(#e7c3c3));background-image:linear-gradient(to bottom,#f2dede 0,#e7c3c3 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff2dede', endColorstr='#ffe7c3c3', GradientType=0);background-repeat:repeat-x;border-color:#dca7a7}.progress{background-image:-webkit-linear-gradient(top,#ebebeb 0,#f5f5f5 100%);background-image:-o-linear-gradient(top,#ebebeb 0,#f5f5f5 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#ebebeb),to(#f5f5f5));background-image:linear-gradient(to bottom,#ebebeb 0,#f5f5f5 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffebebeb', endColorstr='#fff5f5f5', GradientType=0);background-repeat:repeat-x}.progress-bar{background-image:-webkit-linear-gradient(top,#337ab7 0,#286090 100%);background-image:-o-linear-gradient(top,#337ab7 0,#286090 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#337ab7),to(#286090));background-image:linear-gradient(to bottom,#337ab7 0,#286090 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff337ab7', endColorstr='#ff286090', GradientType=0);background-repeat:repeat-x}.progress-bar-success{background-image:-webkit-linear-gradient(top,#5cb85c 0,#449d44 100%);background-image:-o-linear-gradient(top,#5cb85c 0,#449d44 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#5cb85c),to(#449d44));background-image:linear-gradient(to bottom,#5cb85c 0,#449d44 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5cb85c', endColorstr='#ff449d44', GradientType=0);background-repeat:repeat-x}.progress-bar-info{background-image:-webkit-linear-gradient(top,#5bc0de 0,#31b0d5 100%);background-image:-o-linear-gradient(top,#5bc0de 0,#31b0d5 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#5bc0de),to(#31b0d5));background-image:linear-gradient(to bottom,#5bc0de 0,#31b0d5 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5bc0de', endColorstr='#ff31b0d5', GradientType=0);background-repeat:repeat-x}.progress-bar-warning{background-image:-webkit-linear-gradient(top,#f0ad4e 0,#ec971f 100%);background-image:-o-linear-gradient(top,#f0ad4e 0,#ec971f 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#f0ad4e),to(#ec971f));background-image:linear-gradient(to bottom,#f0ad4e 0,#ec971f 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff0ad4e', endColorstr='#ffec971f', GradientType=0);background-repeat:repeat-x}.progress-bar-danger{background-image:-webkit-linear-gradient(top,#d9534f 0,#c9302c 100%);background-image:-o-linear-gradient(top,#d9534f 0,#c9302c 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#d9534f),to(#c9302c));background-image:linear-gradient(to bottom,#d9534f 0,#c9302c 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffd9534f', endColorstr='#ffc9302c', GradientType=0);background-repeat:repeat-x}.progress-bar-striped{background-image:-webkit-linear-gradient(-45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:-o-linear-gradient(-45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:-webkit-linear-gradient(135deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:-o-linear-gradient(135deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:linear-gradient(-45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent)}.list-group{border-radius:4px;-webkit-box-shadow:0 1px 2px rgba(0,0,0,.075);box-shadow:0 1px 2px rgba(0,0,0,.075)}.list-group-item.active,.list-group-item.active:focus,.list-group-item.active:hover{text-shadow:0 -1px 0 #286090;background-image:-webkit-linear-gradient(top,#337ab7 0,#2b669a 100%);background-image:-o-linear-gradient(top,#337ab7 0,#2b669a 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#337ab7),to(#2b669a));background-image:linear-gradient(to bottom,#337ab7 0,#2b669a 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff337ab7', endColorstr='#ff2b669a', GradientType=0);background-repeat:repeat-x;border-color:#2b669a}.list-group-item.active .badge,.list-group-item.active:focus .badge,.list-group-item.active:hover .badge{text-shadow:none}.panel{-webkit-box-shadow:0 1px 2px rgba(0,0,0,.05);box-shadow:0 1px 2px rgba(0,0,0,.05)}.panel-default>.panel-heading{background-image:-webkit-linear-gradient(top,#f5f5f5 0,#e8e8e8 100%);background-image:-o-linear-gradient(top,#f5f5f5 0,#e8e8e8 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#f5f5f5),to(#e8e8e8));background-image:linear-gradient(to bottom,#f5f5f5 0,#e8e8e8 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff5f5f5', endColorstr='#ffe8e8e8', GradientType=0);background-repeat:repeat-x}.panel-primary>.panel-heading{background-image:-webkit-linear-gradient(top,#337ab7 0,#2e6da4 100%);background-image:-o-linear-gradient(top,#337ab7 0,#2e6da4 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#337ab7),to(#2e6da4));background-image:linear-gradient(to bottom,#337ab7 0,#2e6da4 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff337ab7', endColorstr='#ff2e6da4', GradientType=0);background-repeat:repeat-x}.panel-success>.panel-heading{background-image:-webkit-linear-gradient(top,#dff0d8 0,#d0e9c6 100%);background-image:-o-linear-gradient(top,#dff0d8 0,#d0e9c6 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#dff0d8),to(#d0e9c6));background-image:linear-gradient(to bottom,#dff0d8 0,#d0e9c6 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffdff0d8', endColorstr='#ffd0e9c6', GradientType=0);background-repeat:repeat-x}.panel-info>.panel-heading{background-image:-webkit-linear-gradient(top,#d9edf7 0,#c4e3f3 100%);background-image:-o-linear-gradient(top,#d9edf7 0,#c4e3f3 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#d9edf7),to(#c4e3f3));background-image:linear-gradient(to bottom,#d9edf7 0,#c4e3f3 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffd9edf7', endColorstr='#ffc4e3f3', GradientType=0);background-repeat:repeat-x}.panel-warning>.panel-heading{background-image:-webkit-linear-gradient(top,#fcf8e3 0,#faf2cc 100%);background-image:-o-linear-gradient(top,#fcf8e3 0,#faf2cc 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#fcf8e3),to(#faf2cc));background-image:linear-gradient(to bottom,#fcf8e3 0,#faf2cc 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fffcf8e3', endColorstr='#fffaf2cc', GradientType=0);background-repeat:repeat-x}.panel-danger>.panel-heading{background-image:-webkit-linear-gradient(top,#f2dede 0,#ebcccc 100%);background-image:-o-linear-gradient(top,#f2dede 0,#ebcccc 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#f2dede),to(#ebcccc));background-image:linear-gradient(to bottom,#f2dede 0,#ebcccc 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff2dede', endColorstr='#ffebcccc', GradientType=0);background-repeat:repeat-x}.well{background-image:-webkit-linear-gradient(top,#e8e8e8 0,#f5f5f5 100%);background-image:-o-linear-gradient(top,#e8e8e8 0,#f5f5f5 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#e8e8e8),to(#f5f5f5));background-image:linear-gradient(to bottom,#e8e8e8 0,#f5f5f5 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffe8e8e8', endColorstr='#fff5f5f5', GradientType=0);background-repeat:repeat-x;border-color:#dcdcdc;-webkit-box-shadow:inset 0 1px 3px rgba(0,0,0,.05),0 1px 0 rgba(255,255,255,.1);box-shadow:inset 0 1px 3px rgba(0,0,0,.05),0 1px 0 rgba(255,255,255,.1)} +/*# sourceMappingURL=bootstrap-theme.min.css.map */ \ No newline at end of file diff --git a/odex25_takaful/takaful_portal_sponsor/static/libs/bootstrap3/bootstrap.js b/odex25_takaful/takaful_portal_sponsor/static/libs/bootstrap3/bootstrap.js new file mode 100644 index 000000000..01fbbcbaa --- /dev/null +++ b/odex25_takaful/takaful_portal_sponsor/static/libs/bootstrap3/bootstrap.js @@ -0,0 +1,2363 @@ +/*! + * Bootstrap v3.3.6 (http://getbootstrap.com) + * Copyright 2011-2015 Twitter, Inc. + * Licensed under the MIT license + */ + +if (typeof jQuery === 'undefined') { + throw new Error('Bootstrap\'s JavaScript requires jQuery') +} + ++function ($) { + 'use strict'; + var version = $.fn.jquery.split(' ')[0].split('.') + if ((version[0] < 2 && version[1] < 9) || (version[0] == 1 && version[1] == 9 && version[2] < 1) || (version[0] > 2)) { + throw new Error('Bootstrap\'s JavaScript requires jQuery version 1.9.1 or higher, but lower than version 3') + } +}(jQuery); + +/* ======================================================================== + * Bootstrap: transition.js v3.3.6 + * http://getbootstrap.com/javascript/#transitions + * ======================================================================== + * Copyright 2011-2015 Twitter, Inc. + * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) + * ======================================================================== */ + + ++function ($) { + 'use strict'; + + // CSS TRANSITION SUPPORT (Shoutout: http://www.modernizr.com/) + // ============================================================ + + function transitionEnd() { + var el = document.createElement('bootstrap') + + var transEndEventNames = { + WebkitTransition : 'webkitTransitionEnd', + MozTransition : 'transitionend', + OTransition : 'oTransitionEnd otransitionend', + transition : 'transitionend' + } + + for (var name in transEndEventNames) { + if (el.style[name] !== undefined) { + return { end: transEndEventNames[name] } + } + } + + return false // explicit for ie8 ( ._.) + } + + // http://blog.alexmaccaw.com/css-transitions + $.fn.emulateTransitionEnd = function (duration) { + var called = false + var $el = this + $(this).one('bsTransitionEnd', function () { called = true }) + var callback = function () { if (!called) $($el).trigger($.support.transition.end) } + setTimeout(callback, duration) + return this + } + + $(function () { + $.support.transition = transitionEnd() + + if (!$.support.transition) return + + $.event.special.bsTransitionEnd = { + bindType: $.support.transition.end, + delegateType: $.support.transition.end, + handle: function (e) { + if ($(e.target).is(this)) return e.handleObj.handler.apply(this, arguments) + } + } + }) + +}(jQuery); + +/* ======================================================================== + * Bootstrap: alert.js v3.3.6 + * http://getbootstrap.com/javascript/#alerts + * ======================================================================== + * Copyright 2011-2015 Twitter, Inc. + * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) + * ======================================================================== */ + + ++function ($) { + 'use strict'; + + // ALERT CLASS DEFINITION + // ====================== + + var dismiss = '[data-dismiss="alert"]' + var Alert = function (el) { + $(el).on('click', dismiss, this.close) + } + + Alert.VERSION = '3.3.6' + + Alert.TRANSITION_DURATION = 150 + + Alert.prototype.close = function (e) { + var $this = $(this) + var selector = $this.attr('data-target') + + if (!selector) { + selector = $this.attr('href') + selector = selector && selector.replace(/.*(?=#[^\s]*$)/, '') // strip for ie7 + } + + var $parent = $(selector) + + if (e) e.preventDefault() + + if (!$parent.length) { + $parent = $this.closest('.alert') + } + + $parent.trigger(e = $.Event('close.bs.alert')) + + if (e.isDefaultPrevented()) return + + $parent.removeClass('in') + + function removeElement() { + // detach from parent, fire event then clean up data + $parent.detach().trigger('closed.bs.alert').remove() + } + + $.support.transition && $parent.hasClass('fade') ? + $parent + .one('bsTransitionEnd', removeElement) + .emulateTransitionEnd(Alert.TRANSITION_DURATION) : + removeElement() + } + + + // ALERT PLUGIN DEFINITION + // ======================= + + function Plugin(option) { + return this.each(function () { + var $this = $(this) + var data = $this.data('bs.alert') + + if (!data) $this.data('bs.alert', (data = new Alert(this))) + if (typeof option == 'string') data[option].call($this) + }) + } + + var old = $.fn.alert + + $.fn.alert = Plugin + $.fn.alert.Constructor = Alert + + + // ALERT NO CONFLICT + // ================= + + $.fn.alert.noConflict = function () { + $.fn.alert = old + return this + } + + + // ALERT DATA-API + // ============== + + $(document).on('click.bs.alert.data-api', dismiss, Alert.prototype.close) + +}(jQuery); + +/* ======================================================================== + * Bootstrap: button.js v3.3.6 + * http://getbootstrap.com/javascript/#buttons + * ======================================================================== + * Copyright 2011-2015 Twitter, Inc. + * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) + * ======================================================================== */ + + ++function ($) { + 'use strict'; + + // BUTTON PUBLIC CLASS DEFINITION + // ============================== + + var Button = function (element, options) { + this.$element = $(element) + this.options = $.extend({}, Button.DEFAULTS, options) + this.isLoading = false + } + + Button.VERSION = '3.3.6' + + Button.DEFAULTS = { + loadingText: 'loading...' + } + + Button.prototype.setState = function (state) { + var d = 'disabled' + var $el = this.$element + var val = $el.is('input') ? 'val' : 'html' + var data = $el.data() + + state += 'Text' + + if (data.resetText == null) $el.data('resetText', $el[val]()) + + // push to event loop to allow forms to submit + setTimeout($.proxy(function () { + $el[val](data[state] == null ? this.options[state] : data[state]) + + if (state == 'loadingText') { + this.isLoading = true + $el.addClass(d).attr(d, d) + } else if (this.isLoading) { + this.isLoading = false + $el.removeClass(d).removeAttr(d) + } + }, this), 0) + } + + Button.prototype.toggle = function () { + var changed = true + var $parent = this.$element.closest('[data-toggle="buttons"]') + + if ($parent.length) { + var $input = this.$element.find('input') + if ($input.prop('type') == 'radio') { + if ($input.prop('checked')) changed = false + $parent.find('.active').removeClass('active') + this.$element.addClass('active') + } else if ($input.prop('type') == 'checkbox') { + if (($input.prop('checked')) !== this.$element.hasClass('active')) changed = false + this.$element.toggleClass('active') + } + $input.prop('checked', this.$element.hasClass('active')) + if (changed) $input.trigger('change') + } else { + this.$element.attr('aria-pressed', !this.$element.hasClass('active')) + this.$element.toggleClass('active') + } + } + + + // BUTTON PLUGIN DEFINITION + // ======================== + + function Plugin(option) { + return this.each(function () { + var $this = $(this) + var data = $this.data('bs.button') + var options = typeof option == 'object' && option + + if (!data) $this.data('bs.button', (data = new Button(this, options))) + + if (option == 'toggle') data.toggle() + else if (option) data.setState(option) + }) + } + + var old = $.fn.button + + $.fn.button = Plugin + $.fn.button.Constructor = Button + + + // BUTTON NO CONFLICT + // ================== + + $.fn.button.noConflict = function () { + $.fn.button = old + return this + } + + + // BUTTON DATA-API + // =============== + + $(document) + .on('click.bs.button.data-api', '[data-toggle^="button"]', function (e) { + var $btn = $(e.target) + if (!$btn.hasClass('btn')) $btn = $btn.closest('.btn') + Plugin.call($btn, 'toggle') + if (!($(e.target).is('input[type="radio"]') || $(e.target).is('input[type="checkbox"]'))) e.preventDefault() + }) + .on('focus.bs.button.data-api blur.bs.button.data-api', '[data-toggle^="button"]', function (e) { + $(e.target).closest('.btn').toggleClass('focus', /^focus(in)?$/.test(e.type)) + }) + +}(jQuery); + +/* ======================================================================== + * Bootstrap: carousel.js v3.3.6 + * http://getbootstrap.com/javascript/#carousel + * ======================================================================== + * Copyright 2011-2015 Twitter, Inc. + * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) + * ======================================================================== */ + + ++function ($) { + 'use strict'; + + // CAROUSEL CLASS DEFINITION + // ========================= + + var Carousel = function (element, options) { + this.$element = $(element) + this.$indicators = this.$element.find('.carousel-indicators') + this.options = options + this.paused = null + this.sliding = null + this.interval = null + this.$active = null + this.$items = null + + this.options.keyboard && this.$element.on('keydown.bs.carousel', $.proxy(this.keydown, this)) + + this.options.pause == 'hover' && !('ontouchstart' in document.documentElement) && this.$element + .on('mouseenter.bs.carousel', $.proxy(this.pause, this)) + .on('mouseleave.bs.carousel', $.proxy(this.cycle, this)) + } + + Carousel.VERSION = '3.3.6' + + Carousel.TRANSITION_DURATION = 600 + + Carousel.DEFAULTS = { + interval: 5000, + pause: 'hover', + wrap: true, + keyboard: true + } + + Carousel.prototype.keydown = function (e) { + if (/input|textarea/i.test(e.target.tagName)) return + switch (e.which) { + case 37: this.prev(); break + case 39: this.next(); break + default: return + } + + e.preventDefault() + } + + Carousel.prototype.cycle = function (e) { + e || (this.paused = false) + + this.interval && clearInterval(this.interval) + + this.options.interval + && !this.paused + && (this.interval = setInterval($.proxy(this.next, this), this.options.interval)) + + return this + } + + Carousel.prototype.getItemIndex = function (item) { + this.$items = item.parent().children('.item') + return this.$items.index(item || this.$active) + } + + Carousel.prototype.getItemForDirection = function (direction, active) { + var activeIndex = this.getItemIndex(active) + var willWrap = (direction == 'prev' && activeIndex === 0) + || (direction == 'next' && activeIndex == (this.$items.length - 1)) + if (willWrap && !this.options.wrap) return active + var delta = direction == 'prev' ? -1 : 1 + var itemIndex = (activeIndex + delta) % this.$items.length + return this.$items.eq(itemIndex) + } + + Carousel.prototype.to = function (pos) { + var that = this + var activeIndex = this.getItemIndex(this.$active = this.$element.find('.item.active')) + + if (pos > (this.$items.length - 1) || pos < 0) return + + if (this.sliding) return this.$element.one('slid.bs.carousel', function () { that.to(pos) }) // yes, "slid" + if (activeIndex == pos) return this.pause().cycle() + + return this.slide(pos > activeIndex ? 'next' : 'prev', this.$items.eq(pos)) + } + + Carousel.prototype.pause = function (e) { + e || (this.paused = true) + + if (this.$element.find('.next, .prev').length && $.support.transition) { + this.$element.trigger($.support.transition.end) + this.cycle(true) + } + + this.interval = clearInterval(this.interval) + + return this + } + + Carousel.prototype.next = function () { + if (this.sliding) return + return this.slide('next') + } + + Carousel.prototype.prev = function () { + if (this.sliding) return + return this.slide('prev') + } + + Carousel.prototype.slide = function (type, next) { + var $active = this.$element.find('.item.active') + var $next = next || this.getItemForDirection(type, $active) + var isCycling = this.interval + var direction = type == 'next' ? 'left' : 'right' + var that = this + + if ($next.hasClass('active')) return (this.sliding = false) + + var relatedTarget = $next[0] + var slideEvent = $.Event('slide.bs.carousel', { + relatedTarget: relatedTarget, + direction: direction + }) + this.$element.trigger(slideEvent) + if (slideEvent.isDefaultPrevented()) return + + this.sliding = true + + isCycling && this.pause() + + if (this.$indicators.length) { + this.$indicators.find('.active').removeClass('active') + var $nextIndicator = $(this.$indicators.children()[this.getItemIndex($next)]) + $nextIndicator && $nextIndicator.addClass('active') + } + + var slidEvent = $.Event('slid.bs.carousel', { relatedTarget: relatedTarget, direction: direction }) // yes, "slid" + if ($.support.transition && this.$element.hasClass('slide')) { + $next.addClass(type) + $next[0].offsetWidth // force reflow + $active.addClass(direction) + $next.addClass(direction) + $active + .one('bsTransitionEnd', function () { + $next.removeClass([type, direction].join(' ')).addClass('active') + $active.removeClass(['active', direction].join(' ')) + that.sliding = false + setTimeout(function () { + that.$element.trigger(slidEvent) + }, 0) + }) + .emulateTransitionEnd(Carousel.TRANSITION_DURATION) + } else { + $active.removeClass('active') + $next.addClass('active') + this.sliding = false + this.$element.trigger(slidEvent) + } + + isCycling && this.cycle() + + return this + } + + + // CAROUSEL PLUGIN DEFINITION + // ========================== + + function Plugin(option) { + return this.each(function () { + var $this = $(this) + var data = $this.data('bs.carousel') + var options = $.extend({}, Carousel.DEFAULTS, $this.data(), typeof option == 'object' && option) + var action = typeof option == 'string' ? option : options.slide + + if (!data) $this.data('bs.carousel', (data = new Carousel(this, options))) + if (typeof option == 'number') data.to(option) + else if (action) data[action]() + else if (options.interval) data.pause().cycle() + }) + } + + var old = $.fn.carousel + + $.fn.carousel = Plugin + $.fn.carousel.Constructor = Carousel + + + // CAROUSEL NO CONFLICT + // ==================== + + $.fn.carousel.noConflict = function () { + $.fn.carousel = old + return this + } + + + // CAROUSEL DATA-API + // ================= + + var clickHandler = function (e) { + var href + var $this = $(this) + var $target = $($this.attr('data-target') || (href = $this.attr('href')) && href.replace(/.*(?=#[^\s]+$)/, '')) // strip for ie7 + if (!$target.hasClass('carousel')) return + var options = $.extend({}, $target.data(), $this.data()) + var slideIndex = $this.attr('data-slide-to') + if (slideIndex) options.interval = false + + Plugin.call($target, options) + + if (slideIndex) { + $target.data('bs.carousel').to(slideIndex) + } + + e.preventDefault() + } + + $(document) + .on('click.bs.carousel.data-api', '[data-slide]', clickHandler) + .on('click.bs.carousel.data-api', '[data-slide-to]', clickHandler) + + $(window).on('load', function () { + $('[data-ride="carousel"]').each(function () { + var $carousel = $(this) + Plugin.call($carousel, $carousel.data()) + }) + }) + +}(jQuery); + +/* ======================================================================== + * Bootstrap: collapse.js v3.3.6 + * http://getbootstrap.com/javascript/#collapse + * ======================================================================== + * Copyright 2011-2015 Twitter, Inc. + * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) + * ======================================================================== */ + + ++function ($) { + 'use strict'; + + // COLLAPSE PUBLIC CLASS DEFINITION + // ================================ + + var Collapse = function (element, options) { + this.$element = $(element) + this.options = $.extend({}, Collapse.DEFAULTS, options) + this.$trigger = $('[data-toggle="collapse"][href="#' + element.id + '"],' + + '[data-toggle="collapse"][data-target="#' + element.id + '"]') + this.transitioning = null + + if (this.options.parent) { + this.$parent = this.getParent() + } else { + this.addAriaAndCollapsedClass(this.$element, this.$trigger) + } + + if (this.options.toggle) this.toggle() + } + + Collapse.VERSION = '3.3.6' + + Collapse.TRANSITION_DURATION = 350 + + Collapse.DEFAULTS = { + toggle: true + } + + Collapse.prototype.dimension = function () { + var hasWidth = this.$element.hasClass('width') + return hasWidth ? 'width' : 'height' + } + + Collapse.prototype.show = function () { + if (this.transitioning || this.$element.hasClass('in')) return + + var activesData + var actives = this.$parent && this.$parent.children('.panel').children('.in, .collapsing') + + if (actives && actives.length) { + activesData = actives.data('bs.collapse') + if (activesData && activesData.transitioning) return + } + + var startEvent = $.Event('show.bs.collapse') + this.$element.trigger(startEvent) + if (startEvent.isDefaultPrevented()) return + + if (actives && actives.length) { + Plugin.call(actives, 'hide') + activesData || actives.data('bs.collapse', null) + } + + var dimension = this.dimension() + + this.$element + .removeClass('collapse') + .addClass('collapsing')[dimension](0) + .attr('aria-expanded', true) + + this.$trigger + .removeClass('collapsed') + .attr('aria-expanded', true) + + this.transitioning = 1 + + var complete = function () { + this.$element + .removeClass('collapsing') + .addClass('collapse in')[dimension]('') + this.transitioning = 0 + this.$element + .trigger('shown.bs.collapse') + } + + if (!$.support.transition) return complete.call(this) + + var scrollSize = $.camelCase(['scroll', dimension].join('-')) + + this.$element + .one('bsTransitionEnd', $.proxy(complete, this)) + .emulateTransitionEnd(Collapse.TRANSITION_DURATION)[dimension](this.$element[0][scrollSize]) + } + + Collapse.prototype.hide = function () { + if (this.transitioning || !this.$element.hasClass('in')) return + + var startEvent = $.Event('hide.bs.collapse') + this.$element.trigger(startEvent) + if (startEvent.isDefaultPrevented()) return + + var dimension = this.dimension() + + this.$element[dimension](this.$element[dimension]())[0].offsetHeight + + this.$element + .addClass('collapsing') + .removeClass('collapse in') + .attr('aria-expanded', false) + + this.$trigger + .addClass('collapsed') + .attr('aria-expanded', false) + + this.transitioning = 1 + + var complete = function () { + this.transitioning = 0 + this.$element + .removeClass('collapsing') + .addClass('collapse') + .trigger('hidden.bs.collapse') + } + + if (!$.support.transition) return complete.call(this) + + this.$element + [dimension](0) + .one('bsTransitionEnd', $.proxy(complete, this)) + .emulateTransitionEnd(Collapse.TRANSITION_DURATION) + } + + Collapse.prototype.toggle = function () { + this[this.$element.hasClass('in') ? 'hide' : 'show']() + } + + Collapse.prototype.getParent = function () { + return $(this.options.parent) + .find('[data-toggle="collapse"][data-parent="' + this.options.parent + '"]') + .each($.proxy(function (i, element) { + var $element = $(element) + this.addAriaAndCollapsedClass(getTargetFromTrigger($element), $element) + }, this)) + .end() + } + + Collapse.prototype.addAriaAndCollapsedClass = function ($element, $trigger) { + var isOpen = $element.hasClass('in') + + $element.attr('aria-expanded', isOpen) + $trigger + .toggleClass('collapsed', !isOpen) + .attr('aria-expanded', isOpen) + } + + function getTargetFromTrigger($trigger) { + var href + var target = $trigger.attr('data-target') + || (href = $trigger.attr('href')) && href.replace(/.*(?=#[^\s]+$)/, '') // strip for ie7 + + return $(target) + } + + + // COLLAPSE PLUGIN DEFINITION + // ========================== + + function Plugin(option) { + return this.each(function () { + var $this = $(this) + var data = $this.data('bs.collapse') + var options = $.extend({}, Collapse.DEFAULTS, $this.data(), typeof option == 'object' && option) + + if (!data && options.toggle && /show|hide/.test(option)) options.toggle = false + if (!data) $this.data('bs.collapse', (data = new Collapse(this, options))) + if (typeof option == 'string') data[option]() + }) + } + + var old = $.fn.collapse + + $.fn.collapse = Plugin + $.fn.collapse.Constructor = Collapse + + + // COLLAPSE NO CONFLICT + // ==================== + + $.fn.collapse.noConflict = function () { + $.fn.collapse = old + return this + } + + + // COLLAPSE DATA-API + // ================= + + $(document).on('click.bs.collapse.data-api', '[data-toggle="collapse"]', function (e) { + var $this = $(this) + + if (!$this.attr('data-target')) e.preventDefault() + + var $target = getTargetFromTrigger($this) + var data = $target.data('bs.collapse') + var option = data ? 'toggle' : $this.data() + + Plugin.call($target, option) + }) + +}(jQuery); + +/* ======================================================================== + * Bootstrap: dropdown.js v3.3.6 + * http://getbootstrap.com/javascript/#dropdowns + * ======================================================================== + * Copyright 2011-2015 Twitter, Inc. + * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) + * ======================================================================== */ + + ++function ($) { + 'use strict'; + + // DROPDOWN CLASS DEFINITION + // ========================= + + var backdrop = '.dropdown-backdrop' + var toggle = '[data-toggle="dropdown"]' + var Dropdown = function (element) { + $(element).on('click.bs.dropdown', this.toggle) + } + + Dropdown.VERSION = '3.3.6' + + function getParent($this) { + var selector = $this.attr('data-target') + + if (!selector) { + selector = $this.attr('href') + selector = selector && /#[A-Za-z]/.test(selector) && selector.replace(/.*(?=#[^\s]*$)/, '') // strip for ie7 + } + + var $parent = selector && $(selector) + + return $parent && $parent.length ? $parent : $this.parent() + } + + function clearMenus(e) { + if (e && e.which === 3) return + $(backdrop).remove() + $(toggle).each(function () { + var $this = $(this) + var $parent = getParent($this) + var relatedTarget = { relatedTarget: this } + + if (!$parent.hasClass('open')) return + + if (e && e.type == 'click' && /input|textarea/i.test(e.target.tagName) && $.contains($parent[0], e.target)) return + + $parent.trigger(e = $.Event('hide.bs.dropdown', relatedTarget)) + + if (e.isDefaultPrevented()) return + + $this.attr('aria-expanded', 'false') + $parent.removeClass('open').trigger($.Event('hidden.bs.dropdown', relatedTarget)) + }) + } + + Dropdown.prototype.toggle = function (e) { + var $this = $(this) + + if ($this.is('.disabled, :disabled')) return + + var $parent = getParent($this) + var isActive = $parent.hasClass('open') + + clearMenus() + + if (!isActive) { + if ('ontouchstart' in document.documentElement && !$parent.closest('.navbar-nav').length) { + // if mobile we use a backdrop because click events don't delegate + $(document.createElement('div')) + .addClass('dropdown-backdrop') + .insertAfter($(this)) + .on('click', clearMenus) + } + + var relatedTarget = { relatedTarget: this } + $parent.trigger(e = $.Event('show.bs.dropdown', relatedTarget)) + + if (e.isDefaultPrevented()) return + + $this + .trigger('focus') + .attr('aria-expanded', 'true') + + $parent + .toggleClass('open') + .trigger($.Event('shown.bs.dropdown', relatedTarget)) + } + + return false + } + + Dropdown.prototype.keydown = function (e) { + if (!/(38|40|27|32)/.test(e.which) || /input|textarea/i.test(e.target.tagName)) return + + var $this = $(this) + + e.preventDefault() + e.stopPropagation() + + if ($this.is('.disabled, :disabled')) return + + var $parent = getParent($this) + var isActive = $parent.hasClass('open') + + if (!isActive && e.which != 27 || isActive && e.which == 27) { + if (e.which == 27) $parent.find(toggle).trigger('focus') + return $this.trigger('click') + } + + var desc = ' li:not(.disabled):visible a' + var $items = $parent.find('.dropdown-menu' + desc) + + if (!$items.length) return + + var index = $items.index(e.target) + + if (e.which == 38 && index > 0) index-- // up + if (e.which == 40 && index < $items.length - 1) index++ // down + if (!~index) index = 0 + + $items.eq(index).trigger('focus') + } + + + // DROPDOWN PLUGIN DEFINITION + // ========================== + + function Plugin(option) { + return this.each(function () { + var $this = $(this) + var data = $this.data('bs.dropdown') + + if (!data) $this.data('bs.dropdown', (data = new Dropdown(this))) + if (typeof option == 'string') data[option].call($this) + }) + } + + var old = $.fn.dropdown + + $.fn.dropdown = Plugin + $.fn.dropdown.Constructor = Dropdown + + + // DROPDOWN NO CONFLICT + // ==================== + + $.fn.dropdown.noConflict = function () { + $.fn.dropdown = old + return this + } + + + // APPLY TO STANDARD DROPDOWN ELEMENTS + // =================================== + + $(document) + .on('click.bs.dropdown.data-api', clearMenus) + .on('click.bs.dropdown.data-api', '.dropdown form', function (e) { e.stopPropagation() }) + .on('click.bs.dropdown.data-api', toggle, Dropdown.prototype.toggle) + .on('keydown.bs.dropdown.data-api', toggle, Dropdown.prototype.keydown) + .on('keydown.bs.dropdown.data-api', '.dropdown-menu', Dropdown.prototype.keydown) + +}(jQuery); + +/* ======================================================================== + * Bootstrap: modal.js v3.3.6 + * http://getbootstrap.com/javascript/#modals + * ======================================================================== + * Copyright 2011-2015 Twitter, Inc. + * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) + * ======================================================================== */ + + ++function ($) { + 'use strict'; + + // MODAL CLASS DEFINITION + // ====================== + + var Modal = function (element, options) { + this.options = options + this.$body = $(document.body) + this.$element = $(element) + this.$dialog = this.$element.find('.modal-dialog') + this.$backdrop = null + this.isShown = null + this.originalBodyPad = null + this.scrollbarWidth = 0 + this.ignoreBackdropClick = false + + if (this.options.remote) { + this.$element + .find('.modal-content') + .load(this.options.remote, $.proxy(function () { + this.$element.trigger('loaded.bs.modal') + }, this)) + } + } + + Modal.VERSION = '3.3.6' + + Modal.TRANSITION_DURATION = 300 + Modal.BACKDROP_TRANSITION_DURATION = 150 + + Modal.DEFAULTS = { + backdrop: true, + keyboard: true, + show: true + } + + Modal.prototype.toggle = function (_relatedTarget) { + return this.isShown ? this.hide() : this.show(_relatedTarget) + } + + Modal.prototype.show = function (_relatedTarget) { + var that = this + var e = $.Event('show.bs.modal', { relatedTarget: _relatedTarget }) + + this.$element.trigger(e) + + if (this.isShown || e.isDefaultPrevented()) return + + this.isShown = true + + this.checkScrollbar() + this.setScrollbar() + this.$body.addClass('modal-open') + + this.escape() + this.resize() + + this.$element.on('click.dismiss.bs.modal', '[data-dismiss="modal"]', $.proxy(this.hide, this)) + + this.$dialog.on('mousedown.dismiss.bs.modal', function () { + that.$element.one('mouseup.dismiss.bs.modal', function (e) { + if ($(e.target).is(that.$element)) that.ignoreBackdropClick = true + }) + }) + + this.backdrop(function () { + var transition = $.support.transition && that.$element.hasClass('fade') + + if (!that.$element.parent().length) { + that.$element.appendTo(that.$body) // don't move modals dom position + } + + that.$element + .show() + .scrollTop(0) + + that.adjustDialog() + + if (transition) { + that.$element[0].offsetWidth // force reflow + } + + that.$element.addClass('in') + + that.enforceFocus() + + var e = $.Event('shown.bs.modal', { relatedTarget: _relatedTarget }) + + transition ? + that.$dialog // wait for modal to slide in + .one('bsTransitionEnd', function () { + that.$element.trigger('focus').trigger(e) + }) + .emulateTransitionEnd(Modal.TRANSITION_DURATION) : + that.$element.trigger('focus').trigger(e) + }) + } + + Modal.prototype.hide = function (e) { + if (e) e.preventDefault() + + e = $.Event('hide.bs.modal') + + this.$element.trigger(e) + + if (!this.isShown || e.isDefaultPrevented()) return + + this.isShown = false + + this.escape() + this.resize() + + $(document).off('focusin.bs.modal') + + this.$element + .removeClass('in') + .off('click.dismiss.bs.modal') + .off('mouseup.dismiss.bs.modal') + + this.$dialog.off('mousedown.dismiss.bs.modal') + + $.support.transition && this.$element.hasClass('fade') ? + this.$element + .one('bsTransitionEnd', $.proxy(this.hideModal, this)) + .emulateTransitionEnd(Modal.TRANSITION_DURATION) : + this.hideModal() + } + + Modal.prototype.enforceFocus = function () { + $(document) + .off('focusin.bs.modal') // guard against infinite focus loop + .on('focusin.bs.modal', $.proxy(function (e) { + if (this.$element[0] !== e.target && !this.$element.has(e.target).length) { + this.$element.trigger('focus') + } + }, this)) + } + + Modal.prototype.escape = function () { + if (this.isShown && this.options.keyboard) { + this.$element.on('keydown.dismiss.bs.modal', $.proxy(function (e) { + e.which == 27 && this.hide() + }, this)) + } else if (!this.isShown) { + this.$element.off('keydown.dismiss.bs.modal') + } + } + + Modal.prototype.resize = function () { + if (this.isShown) { + $(window).on('resize.bs.modal', $.proxy(this.handleUpdate, this)) + } else { + $(window).off('resize.bs.modal') + } + } + + Modal.prototype.hideModal = function () { + var that = this + this.$element.hide() + this.backdrop(function () { + that.$body.removeClass('modal-open') + that.resetAdjustments() + that.resetScrollbar() + that.$element.trigger('hidden.bs.modal') + }) + } + + Modal.prototype.removeBackdrop = function () { + this.$backdrop && this.$backdrop.remove() + this.$backdrop = null + } + + Modal.prototype.backdrop = function (callback) { + var that = this + var animate = this.$element.hasClass('fade') ? 'fade' : '' + + if (this.isShown && this.options.backdrop) { + var doAnimate = $.support.transition && animate + + this.$backdrop = $(document.createElement('div')) + .addClass('modal-backdrop ' + animate) + .appendTo(this.$body) + + this.$element.on('click.dismiss.bs.modal', $.proxy(function (e) { + if (this.ignoreBackdropClick) { + this.ignoreBackdropClick = false + return + } + if (e.target !== e.currentTarget) return + this.options.backdrop == 'static' + ? this.$element[0].focus() + : this.hide() + }, this)) + + if (doAnimate) this.$backdrop[0].offsetWidth // force reflow + + this.$backdrop.addClass('in') + + if (!callback) return + + doAnimate ? + this.$backdrop + .one('bsTransitionEnd', callback) + .emulateTransitionEnd(Modal.BACKDROP_TRANSITION_DURATION) : + callback() + + } else if (!this.isShown && this.$backdrop) { + this.$backdrop.removeClass('in') + + var callbackRemove = function () { + that.removeBackdrop() + callback && callback() + } + $.support.transition && this.$element.hasClass('fade') ? + this.$backdrop + .one('bsTransitionEnd', callbackRemove) + .emulateTransitionEnd(Modal.BACKDROP_TRANSITION_DURATION) : + callbackRemove() + + } else if (callback) { + callback() + } + } + + // these following methods are used to handle overflowing modals + + Modal.prototype.handleUpdate = function () { + this.adjustDialog() + } + + Modal.prototype.adjustDialog = function () { + var modalIsOverflowing = this.$element[0].scrollHeight > document.documentElement.clientHeight + + this.$element.css({ + paddingLeft: !this.bodyIsOverflowing && modalIsOverflowing ? this.scrollbarWidth : '', + paddingRight: this.bodyIsOverflowing && !modalIsOverflowing ? this.scrollbarWidth : '' + }) + } + + Modal.prototype.resetAdjustments = function () { + this.$element.css({ + paddingLeft: '', + paddingRight: '' + }) + } + + Modal.prototype.checkScrollbar = function () { + var fullWindowWidth = window.innerWidth + if (!fullWindowWidth) { // workaround for missing window.innerWidth in IE8 + var documentElementRect = document.documentElement.getBoundingClientRect() + fullWindowWidth = documentElementRect.right - Math.abs(documentElementRect.left) + } + this.bodyIsOverflowing = document.body.clientWidth < fullWindowWidth + this.scrollbarWidth = this.measureScrollbar() + } + + Modal.prototype.setScrollbar = function () { + var bodyPad = parseInt((this.$body.css('padding-right') || 0), 10) + this.originalBodyPad = document.body.style.paddingRight || '' + if (this.bodyIsOverflowing) this.$body.css('padding-right', bodyPad + this.scrollbarWidth) + } + + Modal.prototype.resetScrollbar = function () { + this.$body.css('padding-right', this.originalBodyPad) + } + + Modal.prototype.measureScrollbar = function () { // thx walsh + var scrollDiv = document.createElement('div') + scrollDiv.className = 'modal-scrollbar-measure' + this.$body.append(scrollDiv) + var scrollbarWidth = scrollDiv.offsetWidth - scrollDiv.clientWidth + this.$body[0].removeChild(scrollDiv) + return scrollbarWidth + } + + + // MODAL PLUGIN DEFINITION + // ======================= + + function Plugin(option, _relatedTarget) { + return this.each(function () { + var $this = $(this) + var data = $this.data('bs.modal') + var options = $.extend({}, Modal.DEFAULTS, $this.data(), typeof option == 'object' && option) + + if (!data) $this.data('bs.modal', (data = new Modal(this, options))) + if (typeof option == 'string') data[option](_relatedTarget) + else if (options.show) data.show(_relatedTarget) + }) + } + + var old = $.fn.modal + + $.fn.modal = Plugin + $.fn.modal.Constructor = Modal + + + // MODAL NO CONFLICT + // ================= + + $.fn.modal.noConflict = function () { + $.fn.modal = old + return this + } + + + // MODAL DATA-API + // ============== + + $(document).on('click.bs.modal.data-api', '[data-toggle="modal"]', function (e) { + var $this = $(this) + var href = $this.attr('href') + var $target = $($this.attr('data-target') || (href && href.replace(/.*(?=#[^\s]+$)/, ''))) // strip for ie7 + var option = $target.data('bs.modal') ? 'toggle' : $.extend({ remote: !/#/.test(href) && href }, $target.data(), $this.data()) + + if ($this.is('a')) e.preventDefault() + + $target.one('show.bs.modal', function (showEvent) { + if (showEvent.isDefaultPrevented()) return // only register focus restorer if modal will actually get shown + $target.one('hidden.bs.modal', function () { + $this.is(':visible') && $this.trigger('focus') + }) + }) + Plugin.call($target, option, this) + }) + +}(jQuery); + +/* ======================================================================== + * Bootstrap: tooltip.js v3.3.6 + * http://getbootstrap.com/javascript/#tooltip + * Inspired by the original jQuery.tipsy by Jason Frame + * ======================================================================== + * Copyright 2011-2015 Twitter, Inc. + * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) + * ======================================================================== */ + + ++function ($) { + 'use strict'; + + // TOOLTIP PUBLIC CLASS DEFINITION + // =============================== + + var Tooltip = function (element, options) { + this.type = null + this.options = null + this.enabled = null + this.timeout = null + this.hoverState = null + this.$element = null + this.inState = null + + this.init('tooltip', element, options) + } + + Tooltip.VERSION = '3.3.6' + + Tooltip.TRANSITION_DURATION = 150 + + Tooltip.DEFAULTS = { + animation: true, + placement: 'top', + selector: false, + template: '${i + 1} +${element.benefit_id.name} +${element.benefit_id.gender} +${element.benefit_id.age} +${element.benefit_id.city_id} +${element.benefit_id.benefit_type} +${element.benefit_id.benefit_needs_percent} % +${element.benefit_id.benefit_arrears_value} +${element.start_date} ++ ++ بحاجة للتجديد + سداد ++', + trigger: 'hover focus', + title: '', + delay: 0, + html: false, + container: false, + viewport: { + selector: 'body', + padding: 0 + } + } + + Tooltip.prototype.init = function (type, element, options) { + this.enabled = true + this.type = type + this.$element = $(element) + this.options = this.getOptions(options) + this.$viewport = this.options.viewport && $($.isFunction(this.options.viewport) ? this.options.viewport.call(this, this.$element) : (this.options.viewport.selector || this.options.viewport)) + this.inState = { click: false, hover: false, focus: false } + + if (this.$element[0] instanceof document.constructor && !this.options.selector) { + throw new Error('`selector` option must be specified when initializing ' + this.type + ' on the window.document object!') + } + + var triggers = this.options.trigger.split(' ') + + for (var i = triggers.length; i--;) { + var trigger = triggers[i] + + if (trigger == 'click') { + this.$element.on('click.' + this.type, this.options.selector, $.proxy(this.toggle, this)) + } else if (trigger != 'manual') { + var eventIn = trigger == 'hover' ? 'mouseenter' : 'focusin' + var eventOut = trigger == 'hover' ? 'mouseleave' : 'focusout' + + this.$element.on(eventIn + '.' + this.type, this.options.selector, $.proxy(this.enter, this)) + this.$element.on(eventOut + '.' + this.type, this.options.selector, $.proxy(this.leave, this)) + } + } + + this.options.selector ? + (this._options = $.extend({}, this.options, { trigger: 'manual', selector: '' })) : + this.fixTitle() + } + + Tooltip.prototype.getDefaults = function () { + return Tooltip.DEFAULTS + } + + Tooltip.prototype.getOptions = function (options) { + options = $.extend({}, this.getDefaults(), this.$element.data(), options) + + if (options.delay && typeof options.delay == 'number') { + options.delay = { + show: options.delay, + hide: options.delay + } + } + + return options + } + + Tooltip.prototype.getDelegateOptions = function () { + var options = {} + var defaults = this.getDefaults() + + this._options && $.each(this._options, function (key, value) { + if (defaults[key] != value) options[key] = value + }) + + return options + } + + Tooltip.prototype.enter = function (obj) { + var self = obj instanceof this.constructor ? + obj : $(obj.currentTarget).data('bs.' + this.type) + + if (!self) { + self = new this.constructor(obj.currentTarget, this.getDelegateOptions()) + $(obj.currentTarget).data('bs.' + this.type, self) + } + + if (obj instanceof $.Event) { + self.inState[obj.type == 'focusin' ? 'focus' : 'hover'] = true + } + + if (self.tip().hasClass('in') || self.hoverState == 'in') { + self.hoverState = 'in' + return + } + + clearTimeout(self.timeout) + + self.hoverState = 'in' + + if (!self.options.delay || !self.options.delay.show) return self.show() + + self.timeout = setTimeout(function () { + if (self.hoverState == 'in') self.show() + }, self.options.delay.show) + } + + Tooltip.prototype.isInStateTrue = function () { + for (var key in this.inState) { + if (this.inState[key]) return true + } + + return false + } + + Tooltip.prototype.leave = function (obj) { + var self = obj instanceof this.constructor ? + obj : $(obj.currentTarget).data('bs.' + this.type) + + if (!self) { + self = new this.constructor(obj.currentTarget, this.getDelegateOptions()) + $(obj.currentTarget).data('bs.' + this.type, self) + } + + if (obj instanceof $.Event) { + self.inState[obj.type == 'focusout' ? 'focus' : 'hover'] = false + } + + if (self.isInStateTrue()) return + + clearTimeout(self.timeout) + + self.hoverState = 'out' + + if (!self.options.delay || !self.options.delay.hide) return self.hide() + + self.timeout = setTimeout(function () { + if (self.hoverState == 'out') self.hide() + }, self.options.delay.hide) + } + + Tooltip.prototype.show = function () { + var e = $.Event('show.bs.' + this.type) + + if (this.hasContent() && this.enabled) { + this.$element.trigger(e) + + var inDom = $.contains(this.$element[0].ownerDocument.documentElement, this.$element[0]) + if (e.isDefaultPrevented() || !inDom) return + var that = this + + var $tip = this.tip() + + var tipId = this.getUID(this.type) + + this.setContent() + $tip.attr('id', tipId) + this.$element.attr('aria-describedby', tipId) + + if (this.options.animation) $tip.addClass('fade') + + var placement = typeof this.options.placement == 'function' ? + this.options.placement.call(this, $tip[0], this.$element[0]) : + this.options.placement + + var autoToken = /\s?auto?\s?/i + var autoPlace = autoToken.test(placement) + if (autoPlace) placement = placement.replace(autoToken, '') || 'top' + + $tip + .detach() + .css({ top: 0, left: 0, display: 'block' }) + .addClass(placement) + .data('bs.' + this.type, this) + + this.options.container ? $tip.appendTo(this.options.container) : $tip.insertAfter(this.$element) + this.$element.trigger('inserted.bs.' + this.type) + + var pos = this.getPosition() + var actualWidth = $tip[0].offsetWidth + var actualHeight = $tip[0].offsetHeight + + if (autoPlace) { + var orgPlacement = placement + var viewportDim = this.getPosition(this.$viewport) + + placement = placement == 'bottom' && pos.bottom + actualHeight > viewportDim.bottom ? 'top' : + placement == 'top' && pos.top - actualHeight < viewportDim.top ? 'bottom' : + placement == 'right' && pos.right + actualWidth > viewportDim.width ? 'left' : + placement == 'left' && pos.left - actualWidth < viewportDim.left ? 'right' : + placement + + $tip + .removeClass(orgPlacement) + .addClass(placement) + } + + var calculatedOffset = this.getCalculatedOffset(placement, pos, actualWidth, actualHeight) + + this.applyPlacement(calculatedOffset, placement) + + var complete = function () { + var prevHoverState = that.hoverState + that.$element.trigger('shown.bs.' + that.type) + that.hoverState = null + + if (prevHoverState == 'out') that.leave(that) + } + + $.support.transition && this.$tip.hasClass('fade') ? + $tip + .one('bsTransitionEnd', complete) + .emulateTransitionEnd(Tooltip.TRANSITION_DURATION) : + complete() + } + } + + Tooltip.prototype.applyPlacement = function (offset, placement) { + var $tip = this.tip() + var width = $tip[0].offsetWidth + var height = $tip[0].offsetHeight + + // manually read margins because getBoundingClientRect includes difference + var marginTop = parseInt($tip.css('margin-top'), 10) + var marginLeft = parseInt($tip.css('margin-left'), 10) + + // we must check for NaN for ie 8/9 + if (isNaN(marginTop)) marginTop = 0 + if (isNaN(marginLeft)) marginLeft = 0 + + offset.top += marginTop + offset.left += marginLeft + + // $.fn.offset doesn't round pixel values + // so we use setOffset directly with our own function B-0 + $.offset.setOffset($tip[0], $.extend({ + using: function (props) { + $tip.css({ + top: Math.round(props.top), + left: Math.round(props.left) + }) + } + }, offset), 0) + + $tip.addClass('in') + + // check to see if placing tip in new offset caused the tip to resize itself + var actualWidth = $tip[0].offsetWidth + var actualHeight = $tip[0].offsetHeight + + if (placement == 'top' && actualHeight != height) { + offset.top = offset.top + height - actualHeight + } + + var delta = this.getViewportAdjustedDelta(placement, offset, actualWidth, actualHeight) + + if (delta.left) offset.left += delta.left + else offset.top += delta.top + + var isVertical = /top|bottom/.test(placement) + var arrowDelta = isVertical ? delta.left * 2 - width + actualWidth : delta.top * 2 - height + actualHeight + var arrowOffsetPosition = isVertical ? 'offsetWidth' : 'offsetHeight' + + $tip.offset(offset) + this.replaceArrow(arrowDelta, $tip[0][arrowOffsetPosition], isVertical) + } + + Tooltip.prototype.replaceArrow = function (delta, dimension, isVertical) { + this.arrow() + .css(isVertical ? 'left' : 'top', 50 * (1 - delta / dimension) + '%') + .css(isVertical ? 'top' : 'left', '') + } + + Tooltip.prototype.setContent = function () { + var $tip = this.tip() + var title = this.getTitle() + + $tip.find('.tooltip-inner')[this.options.html ? 'html' : 'text'](title) + $tip.removeClass('fade in top bottom left right') + } + + Tooltip.prototype.hide = function (callback) { + var that = this + var $tip = $(this.$tip) + var e = $.Event('hide.bs.' + this.type) + + function complete() { + if (that.hoverState != 'in') $tip.detach() + that.$element + .removeAttr('aria-describedby') + .trigger('hidden.bs.' + that.type) + callback && callback() + } + + this.$element.trigger(e) + + if (e.isDefaultPrevented()) return + + $tip.removeClass('in') + + $.support.transition && $tip.hasClass('fade') ? + $tip + .one('bsTransitionEnd', complete) + .emulateTransitionEnd(Tooltip.TRANSITION_DURATION) : + complete() + + this.hoverState = null + + return this + } + + Tooltip.prototype.fixTitle = function () { + var $e = this.$element + if ($e.attr('title') || typeof $e.attr('data-original-title') != 'string') { + $e.attr('data-original-title', $e.attr('title') || '').attr('title', '') + } + } + + Tooltip.prototype.hasContent = function () { + return this.getTitle() + } + + Tooltip.prototype.getPosition = function ($element) { + $element = $element || this.$element + + var el = $element[0] + var isBody = el.tagName == 'BODY' + + var elRect = el.getBoundingClientRect() + if (elRect.width == null) { + // width and height are missing in IE8, so compute them manually; see https://github.com/twbs/bootstrap/issues/14093 + elRect = $.extend({}, elRect, { width: elRect.right - elRect.left, height: elRect.bottom - elRect.top }) + } + var elOffset = isBody ? { top: 0, left: 0 } : $element.offset() + var scroll = { scroll: isBody ? document.documentElement.scrollTop || document.body.scrollTop : $element.scrollTop() } + var outerDims = isBody ? { width: $(window).width(), height: $(window).height() } : null + + return $.extend({}, elRect, scroll, outerDims, elOffset) + } + + Tooltip.prototype.getCalculatedOffset = function (placement, pos, actualWidth, actualHeight) { + return placement == 'bottom' ? { top: pos.top + pos.height, left: pos.left + pos.width / 2 - actualWidth / 2 } : + placement == 'top' ? { top: pos.top - actualHeight, left: pos.left + pos.width / 2 - actualWidth / 2 } : + placement == 'left' ? { top: pos.top + pos.height / 2 - actualHeight / 2, left: pos.left - actualWidth } : + /* placement == 'right' */ { top: pos.top + pos.height / 2 - actualHeight / 2, left: pos.left + pos.width } + + } + + Tooltip.prototype.getViewportAdjustedDelta = function (placement, pos, actualWidth, actualHeight) { + var delta = { top: 0, left: 0 } + if (!this.$viewport) return delta + + var viewportPadding = this.options.viewport && this.options.viewport.padding || 0 + var viewportDimensions = this.getPosition(this.$viewport) + + if (/right|left/.test(placement)) { + var topEdgeOffset = pos.top - viewportPadding - viewportDimensions.scroll + var bottomEdgeOffset = pos.top + viewportPadding - viewportDimensions.scroll + actualHeight + if (topEdgeOffset < viewportDimensions.top) { // top overflow + delta.top = viewportDimensions.top - topEdgeOffset + } else if (bottomEdgeOffset > viewportDimensions.top + viewportDimensions.height) { // bottom overflow + delta.top = viewportDimensions.top + viewportDimensions.height - bottomEdgeOffset + } + } else { + var leftEdgeOffset = pos.left - viewportPadding + var rightEdgeOffset = pos.left + viewportPadding + actualWidth + if (leftEdgeOffset < viewportDimensions.left) { // left overflow + delta.left = viewportDimensions.left - leftEdgeOffset + } else if (rightEdgeOffset > viewportDimensions.right) { // right overflow + delta.left = viewportDimensions.left + viewportDimensions.width - rightEdgeOffset + } + } + + return delta + } + + Tooltip.prototype.getTitle = function () { + var title + var $e = this.$element + var o = this.options + + title = $e.attr('data-original-title') + || (typeof o.title == 'function' ? o.title.call($e[0]) : o.title) + + return title + } + + Tooltip.prototype.getUID = function (prefix) { + do prefix += ~~(Math.random() * 1000000) + while (document.getElementById(prefix)) + return prefix + } + + Tooltip.prototype.tip = function () { + if (!this.$tip) { + this.$tip = $(this.options.template) + if (this.$tip.length != 1) { + throw new Error(this.type + ' `template` option must consist of exactly 1 top-level element!') + } + } + return this.$tip + } + + Tooltip.prototype.arrow = function () { + return (this.$arrow = this.$arrow || this.tip().find('.tooltip-arrow')) + } + + Tooltip.prototype.enable = function () { + this.enabled = true + } + + Tooltip.prototype.disable = function () { + this.enabled = false + } + + Tooltip.prototype.toggleEnabled = function () { + this.enabled = !this.enabled + } + + Tooltip.prototype.toggle = function (e) { + var self = this + if (e) { + self = $(e.currentTarget).data('bs.' + this.type) + if (!self) { + self = new this.constructor(e.currentTarget, this.getDelegateOptions()) + $(e.currentTarget).data('bs.' + this.type, self) + } + } + + if (e) { + self.inState.click = !self.inState.click + if (self.isInStateTrue()) self.enter(self) + else self.leave(self) + } else { + self.tip().hasClass('in') ? self.leave(self) : self.enter(self) + } + } + + Tooltip.prototype.destroy = function () { + var that = this + clearTimeout(this.timeout) + this.hide(function () { + that.$element.off('.' + that.type).removeData('bs.' + that.type) + if (that.$tip) { + that.$tip.detach() + } + that.$tip = null + that.$arrow = null + that.$viewport = null + }) + } + + + // TOOLTIP PLUGIN DEFINITION + // ========================= + + function Plugin(option) { + return this.each(function () { + var $this = $(this) + var data = $this.data('bs.tooltip') + var options = typeof option == 'object' && option + + if (!data && /destroy|hide/.test(option)) return + if (!data) $this.data('bs.tooltip', (data = new Tooltip(this, options))) + if (typeof option == 'string') data[option]() + }) + } + + var old = $.fn.tooltip + + $.fn.tooltip = Plugin + $.fn.tooltip.Constructor = Tooltip + + + // TOOLTIP NO CONFLICT + // =================== + + $.fn.tooltip.noConflict = function () { + $.fn.tooltip = old + return this + } + +}(jQuery); + +/* ======================================================================== + * Bootstrap: popover.js v3.3.6 + * http://getbootstrap.com/javascript/#popovers + * ======================================================================== + * Copyright 2011-2015 Twitter, Inc. + * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) + * ======================================================================== */ + + ++function ($) { + 'use strict'; + + // POPOVER PUBLIC CLASS DEFINITION + // =============================== + + var Popover = function (element, options) { + this.init('popover', element, options) + } + + if (!$.fn.tooltip) throw new Error('Popover requires tooltip.js') + + Popover.VERSION = '3.3.6' + + Popover.DEFAULTS = $.extend({}, $.fn.tooltip.Constructor.DEFAULTS, { + placement: 'right', + trigger: 'click', + content: '', + template: '' + }) + + + // NOTE: POPOVER EXTENDS tooltip.js + // ================================ + + Popover.prototype = $.extend({}, $.fn.tooltip.Constructor.prototype) + + Popover.prototype.constructor = Popover + + Popover.prototype.getDefaults = function () { + return Popover.DEFAULTS + } + + Popover.prototype.setContent = function () { + var $tip = this.tip() + var title = this.getTitle() + var content = this.getContent() + + $tip.find('.popover-title')[this.options.html ? 'html' : 'text'](title) + $tip.find('.popover-content').children().detach().end()[ // we use append for html objects to maintain js events + this.options.html ? (typeof content == 'string' ? 'html' : 'append') : 'text' + ](content) + + $tip.removeClass('fade top bottom left right in') + + // IE8 doesn't accept hiding via the `:empty` pseudo selector, we have to do + // this manually by checking the contents. + if (!$tip.find('.popover-title').html()) $tip.find('.popover-title').hide() + } + + Popover.prototype.hasContent = function () { + return this.getTitle() || this.getContent() + } + + Popover.prototype.getContent = function () { + var $e = this.$element + var o = this.options + + return $e.attr('data-content') + || (typeof o.content == 'function' ? + o.content.call($e[0]) : + o.content) + } + + Popover.prototype.arrow = function () { + return (this.$arrow = this.$arrow || this.tip().find('.arrow')) + } + + + // POPOVER PLUGIN DEFINITION + // ========================= + + function Plugin(option) { + return this.each(function () { + var $this = $(this) + var data = $this.data('bs.popover') + var options = typeof option == 'object' && option + + if (!data && /destroy|hide/.test(option)) return + if (!data) $this.data('bs.popover', (data = new Popover(this, options))) + if (typeof option == 'string') data[option]() + }) + } + + var old = $.fn.popover + + $.fn.popover = Plugin + $.fn.popover.Constructor = Popover + + + // POPOVER NO CONFLICT + // =================== + + $.fn.popover.noConflict = function () { + $.fn.popover = old + return this + } + +}(jQuery); + +/* ======================================================================== + * Bootstrap: scrollspy.js v3.3.6 + * http://getbootstrap.com/javascript/#scrollspy + * ======================================================================== + * Copyright 2011-2015 Twitter, Inc. + * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) + * ======================================================================== */ + + ++function ($) { + 'use strict'; + + // SCROLLSPY CLASS DEFINITION + // ========================== + + function ScrollSpy(element, options) { + this.$body = $(document.body) + this.$scrollElement = $(element).is(document.body) ? $(window) : $(element) + this.options = $.extend({}, ScrollSpy.DEFAULTS, options) + this.selector = (this.options.target || '') + ' .nav li > a' + this.offsets = [] + this.targets = [] + this.activeTarget = null + this.scrollHeight = 0 + + this.$scrollElement.on('scroll.bs.scrollspy', $.proxy(this.process, this)) + this.refresh() + this.process() + } + + ScrollSpy.VERSION = '3.3.6' + + ScrollSpy.DEFAULTS = { + offset: 10 + } + + ScrollSpy.prototype.getScrollHeight = function () { + return this.$scrollElement[0].scrollHeight || Math.max(this.$body[0].scrollHeight, document.documentElement.scrollHeight) + } + + ScrollSpy.prototype.refresh = function () { + var that = this + var offsetMethod = 'offset' + var offsetBase = 0 + + this.offsets = [] + this.targets = [] + this.scrollHeight = this.getScrollHeight() + + if (!$.isWindow(this.$scrollElement[0])) { + offsetMethod = 'position' + offsetBase = this.$scrollElement.scrollTop() + } + + this.$body + .find(this.selector) + .map(function () { + var $el = $(this) + var href = $el.data('target') || $el.attr('href') + var $href = /^#./.test(href) && $(href) + + return ($href + && $href.length + && $href.is(':visible') + && [[$href[offsetMethod]().top + offsetBase, href]]) || null + }) + .sort(function (a, b) { return a[0] - b[0] }) + .each(function () { + that.offsets.push(this[0]) + that.targets.push(this[1]) + }) + } + + ScrollSpy.prototype.process = function () { + var scrollTop = this.$scrollElement.scrollTop() + this.options.offset + var scrollHeight = this.getScrollHeight() + var maxScroll = this.options.offset + scrollHeight - this.$scrollElement.height() + var offsets = this.offsets + var targets = this.targets + var activeTarget = this.activeTarget + var i + + if (this.scrollHeight != scrollHeight) { + this.refresh() + } + + if (scrollTop >= maxScroll) { + return activeTarget != (i = targets[targets.length - 1]) && this.activate(i) + } + + if (activeTarget && scrollTop < offsets[0]) { + this.activeTarget = null + return this.clear() + } + + for (i = offsets.length; i--;) { + activeTarget != targets[i] + && scrollTop >= offsets[i] + && (offsets[i + 1] === undefined || scrollTop < offsets[i + 1]) + && this.activate(targets[i]) + } + } + + ScrollSpy.prototype.activate = function (target) { + this.activeTarget = target + + this.clear() + + var selector = this.selector + + '[data-target="' + target + '"],' + + this.selector + '[href="' + target + '"]' + + var active = $(selector) + .parents('li') + .addClass('active') + + if (active.parent('.dropdown-menu').length) { + active = active + .closest('li.dropdown') + .addClass('active') + } + + active.trigger('activate.bs.scrollspy') + } + + ScrollSpy.prototype.clear = function () { + $(this.selector) + .parentsUntil(this.options.target, '.active') + .removeClass('active') + } + + + // SCROLLSPY PLUGIN DEFINITION + // =========================== + + function Plugin(option) { + return this.each(function () { + var $this = $(this) + var data = $this.data('bs.scrollspy') + var options = typeof option == 'object' && option + + if (!data) $this.data('bs.scrollspy', (data = new ScrollSpy(this, options))) + if (typeof option == 'string') data[option]() + }) + } + + var old = $.fn.scrollspy + + $.fn.scrollspy = Plugin + $.fn.scrollspy.Constructor = ScrollSpy + + + // SCROLLSPY NO CONFLICT + // ===================== + + $.fn.scrollspy.noConflict = function () { + $.fn.scrollspy = old + return this + } + + + // SCROLLSPY DATA-API + // ================== + + $(window).on('load.bs.scrollspy.data-api', function () { + $('[data-spy="scroll"]').each(function () { + var $spy = $(this) + Plugin.call($spy, $spy.data()) + }) + }) + +}(jQuery); + +/* ======================================================================== + * Bootstrap: tab.js v3.3.6 + * http://getbootstrap.com/javascript/#tabs + * ======================================================================== + * Copyright 2011-2015 Twitter, Inc. + * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) + * ======================================================================== */ + + ++function ($) { + 'use strict'; + + // TAB CLASS DEFINITION + // ==================== + + var Tab = function (element) { + // jscs:disable requireDollarBeforejQueryAssignment + this.element = $(element) + // jscs:enable requireDollarBeforejQueryAssignment + } + + Tab.VERSION = '3.3.6' + + Tab.TRANSITION_DURATION = 150 + + Tab.prototype.show = function () { + var $this = this.element + var $ul = $this.closest('ul:not(.dropdown-menu)') + var selector = $this.data('target') + + if (!selector) { + selector = $this.attr('href') + selector = selector && selector.replace(/.*(?=#[^\s]*$)/, '') // strip for ie7 + } + + if ($this.parent('li').hasClass('active')) return + + var $previous = $ul.find('.active:last a') + var hideEvent = $.Event('hide.bs.tab', { + relatedTarget: $this[0] + }) + var showEvent = $.Event('show.bs.tab', { + relatedTarget: $previous[0] + }) + + $previous.trigger(hideEvent) + $this.trigger(showEvent) + + if (showEvent.isDefaultPrevented() || hideEvent.isDefaultPrevented()) return + + var $target = $(selector) + + this.activate($this.closest('li'), $ul) + this.activate($target, $target.parent(), function () { + $previous.trigger({ + type: 'hidden.bs.tab', + relatedTarget: $this[0] + }) + $this.trigger({ + type: 'shown.bs.tab', + relatedTarget: $previous[0] + }) + }) + } + + Tab.prototype.activate = function (element, container, callback) { + var $active = container.find('> .active') + var transition = callback + && $.support.transition + && ($active.length && $active.hasClass('fade') || !!container.find('> .fade').length) + + function next() { + $active + .removeClass('active') + .find('> .dropdown-menu > .active') + .removeClass('active') + .end() + .find('[data-toggle="tab"]') + .attr('aria-expanded', false) + + element + .addClass('active') + .find('[data-toggle="tab"]') + .attr('aria-expanded', true) + + if (transition) { + element[0].offsetWidth // reflow for transition + element.addClass('in') + } else { + element.removeClass('fade') + } + + if (element.parent('.dropdown-menu').length) { + element + .closest('li.dropdown') + .addClass('active') + .end() + .find('[data-toggle="tab"]') + .attr('aria-expanded', true) + } + + callback && callback() + } + + $active.length && transition ? + $active + .one('bsTransitionEnd', next) + .emulateTransitionEnd(Tab.TRANSITION_DURATION) : + next() + + $active.removeClass('in') + } + + + // TAB PLUGIN DEFINITION + // ===================== + + function Plugin(option) { + return this.each(function () { + var $this = $(this) + var data = $this.data('bs.tab') + + if (!data) $this.data('bs.tab', (data = new Tab(this))) + if (typeof option == 'string') data[option]() + }) + } + + var old = $.fn.tab + + $.fn.tab = Plugin + $.fn.tab.Constructor = Tab + + + // TAB NO CONFLICT + // =============== + + $.fn.tab.noConflict = function () { + $.fn.tab = old + return this + } + + + // TAB DATA-API + // ============ + + var clickHandler = function (e) { + e.preventDefault() + Plugin.call($(this), 'show') + } + + $(document) + .on('click.bs.tab.data-api', '[data-toggle="tab"]', clickHandler) + .on('click.bs.tab.data-api', '[data-toggle="pill"]', clickHandler) + +}(jQuery); + +/* ======================================================================== + * Bootstrap: affix.js v3.3.6 + * http://getbootstrap.com/javascript/#affix + * ======================================================================== + * Copyright 2011-2015 Twitter, Inc. + * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) + * ======================================================================== */ + + ++function ($) { + 'use strict'; + + // AFFIX CLASS DEFINITION + // ====================== + + var Affix = function (element, options) { + this.options = $.extend({}, Affix.DEFAULTS, options) + + this.$target = $(this.options.target) + .on('scroll.bs.affix.data-api', $.proxy(this.checkPosition, this)) + .on('click.bs.affix.data-api', $.proxy(this.checkPositionWithEventLoop, this)) + + this.$element = $(element) + this.affixed = null + this.unpin = null + this.pinnedOffset = null + + this.checkPosition() + } + + Affix.VERSION = '3.3.6' + + Affix.RESET = 'affix affix-top affix-bottom' + + Affix.DEFAULTS = { + offset: 0, + target: window + } + + Affix.prototype.getState = function (scrollHeight, height, offsetTop, offsetBottom) { + var scrollTop = this.$target.scrollTop() + var position = this.$element.offset() + var targetHeight = this.$target.height() + + if (offsetTop != null && this.affixed == 'top') return scrollTop < offsetTop ? 'top' : false + + if (this.affixed == 'bottom') { + if (offsetTop != null) return (scrollTop + this.unpin <= position.top) ? false : 'bottom' + return (scrollTop + targetHeight <= scrollHeight - offsetBottom) ? false : 'bottom' + } + + var initializing = this.affixed == null + var colliderTop = initializing ? scrollTop : position.top + var colliderHeight = initializing ? targetHeight : height + + if (offsetTop != null && scrollTop <= offsetTop) return 'top' + if (offsetBottom != null && (colliderTop + colliderHeight >= scrollHeight - offsetBottom)) return 'bottom' + + return false + } + + Affix.prototype.getPinnedOffset = function () { + if (this.pinnedOffset) return this.pinnedOffset + this.$element.removeClass(Affix.RESET).addClass('affix') + var scrollTop = this.$target.scrollTop() + var position = this.$element.offset() + return (this.pinnedOffset = position.top - scrollTop) + } + + Affix.prototype.checkPositionWithEventLoop = function () { + setTimeout($.proxy(this.checkPosition, this), 1) + } + + Affix.prototype.checkPosition = function () { + if (!this.$element.is(':visible')) return + + var height = this.$element.height() + var offset = this.options.offset + var offsetTop = offset.top + var offsetBottom = offset.bottom + var scrollHeight = Math.max($(document).height(), $(document.body).height()) + + if (typeof offset != 'object') offsetBottom = offsetTop = offset + if (typeof offsetTop == 'function') offsetTop = offset.top(this.$element) + if (typeof offsetBottom == 'function') offsetBottom = offset.bottom(this.$element) + + var affix = this.getState(scrollHeight, height, offsetTop, offsetBottom) + + if (this.affixed != affix) { + if (this.unpin != null) this.$element.css('top', '') + + var affixType = 'affix' + (affix ? '-' + affix : '') + var e = $.Event(affixType + '.bs.affix') + + this.$element.trigger(e) + + if (e.isDefaultPrevented()) return + + this.affixed = affix + this.unpin = affix == 'bottom' ? this.getPinnedOffset() : null + + this.$element + .removeClass(Affix.RESET) + .addClass(affixType) + .trigger(affixType.replace('affix', 'affixed') + '.bs.affix') + } + + if (affix == 'bottom') { + this.$element.offset({ + top: scrollHeight - height - offsetBottom + }) + } + } + + + // AFFIX PLUGIN DEFINITION + // ======================= + + function Plugin(option) { + return this.each(function () { + var $this = $(this) + var data = $this.data('bs.affix') + var options = typeof option == 'object' && option + + if (!data) $this.data('bs.affix', (data = new Affix(this, options))) + if (typeof option == 'string') data[option]() + }) + } + + var old = $.fn.affix + + $.fn.affix = Plugin + $.fn.affix.Constructor = Affix + + + // AFFIX NO CONFLICT + // ================= + + $.fn.affix.noConflict = function () { + $.fn.affix = old + return this + } + + + // AFFIX DATA-API + // ============== + + $(window).on('load', function () { + $('[data-spy="affix"]').each(function () { + var $spy = $(this) + var data = $spy.data() + + data.offset = data.offset || {} + + if (data.offsetBottom != null) data.offset.bottom = data.offsetBottom + if (data.offsetTop != null) data.offset.top = data.offsetTop + + Plugin.call($spy, data) + }) + }) + +}(jQuery); diff --git a/odex25_takaful/takaful_portal_sponsor/static/libs/bootstrap3/bootstrap.min.css b/odex25_takaful/takaful_portal_sponsor/static/libs/bootstrap3/bootstrap.min.css new file mode 100644 index 000000000..6a8dab392 --- /dev/null +++ b/odex25_takaful/takaful_portal_sponsor/static/libs/bootstrap3/bootstrap.min.css @@ -0,0 +1,6 @@ +/*! + * Bootstrap v3.3.7 (http://getbootstrap.com) + * Copyright 2011-2016 Twitter, Inc. + * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) + *//*! normalize.css v3.0.3 | MIT License | github.com/necolas/normalize.css */html{font-family:sans-serif;-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%}body{margin:0}article,aside,details,figcaption,figure,footer,header,hgroup,main,menu,nav,section,summary{display:block}audio,canvas,progress,video{display:inline-block;vertical-align:baseline}audio:not([controls]){display:none;height:0}[hidden],template{display:none}a{background-color:transparent}a:active,a:hover{outline:0}abbr[title]{border-bottom:1px dotted}b,strong{font-weight:700}dfn{font-style:italic}h1{margin:.67em 0;font-size:2em}mark{color:#000;background:#ff0}small{font-size:80%}sub,sup{position:relative;font-size:75%;line-height:0;vertical-align:baseline}sup{top:-.5em}sub{bottom:-.25em}img{border:0}svg:not(:root){overflow:hidden}figure{margin:1em 40px}hr{height:0;-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box}pre{overflow:auto}code,kbd,pre,samp{font-family:monospace,monospace;font-size:1em}button,input,optgroup,select,textarea{margin:0;font:inherit;color:inherit}button{overflow:visible}button,select{text-transform:none}button,html input[type=button],input[type=reset],input[type=submit]{-webkit-appearance:button;cursor:pointer}button[disabled],html input[disabled]{cursor:default}button::-moz-focus-inner,input::-moz-focus-inner{padding:0;border:0}input{line-height:normal}input[type=checkbox],input[type=radio]{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;padding:0}input[type=number]::-webkit-inner-spin-button,input[type=number]::-webkit-outer-spin-button{height:auto}input[type=search]{-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;-webkit-appearance:textfield}input[type=search]::-webkit-search-cancel-button,input[type=search]::-webkit-search-decoration{-webkit-appearance:none}fieldset{padding:.35em .625em .75em;margin:0 2px;border:1px solid silver}legend{padding:0;border:0}textarea{overflow:auto}optgroup{font-weight:700}table{border-spacing:0;border-collapse:collapse}td,th{padding:0}/*! Source: https://github.com/h5bp/html5-boilerplate/blob/master/src/css/main.css */@media print{*,:after,:before{color:#000!important;text-shadow:none!important;background:0 0!important;-webkit-box-shadow:none!important;box-shadow:none!important}a,a:visited{text-decoration:underline}a[href]:after{content:" (" attr(href) ")"}abbr[title]:after{content:" (" attr(title) ")"}a[href^="javascript:"]:after,a[href^="#"]:after{content:""}blockquote,pre{border:1px solid #999;page-break-inside:avoid}thead{display:table-header-group}img,tr{page-break-inside:avoid}img{max-width:100%!important}h2,h3,p{orphans:3;widows:3}h2,h3{page-break-after:avoid}.navbar{display:none}.btn>.caret,.dropup>.btn>.caret{border-top-color:#000!important}.label{border:1px solid #000}.table{border-collapse:collapse!important}.table td,.table th{background-color:#fff!important}.table-bordered td,.table-bordered th{border:1px solid #ddd!important}}@font-face{font-family:'Glyphicons Halflings';src:url(../fonts/glyphicons-halflings-regular.eot);src:url(../fonts/glyphicons-halflings-regular.eot?#iefix) format('embedded-opentype'),url(../fonts/glyphicons-halflings-regular.woff2) format('woff2'),url(../fonts/glyphicons-halflings-regular.woff) format('woff'),url(../fonts/glyphicons-halflings-regular.ttf) format('truetype'),url(../fonts/glyphicons-halflings-regular.svg#glyphicons_halflingsregular) format('svg')}.glyphicon{position:relative;top:1px;display:inline-block;font-family:'Glyphicons Halflings';font-style:normal;font-weight:400;line-height:1;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.glyphicon-asterisk:before{content:"\002a"}.glyphicon-plus:before{content:"\002b"}.glyphicon-eur:before,.glyphicon-euro:before{content:"\20ac"}.glyphicon-minus:before{content:"\2212"}.glyphicon-cloud:before{content:"\2601"}.glyphicon-envelope:before{content:"\2709"}.glyphicon-pencil:before{content:"\270f"}.glyphicon-glass:before{content:"\e001"}.glyphicon-music:before{content:"\e002"}.glyphicon-search:before{content:"\e003"}.glyphicon-heart:before{content:"\e005"}.glyphicon-star:before{content:"\e006"}.glyphicon-star-empty:before{content:"\e007"}.glyphicon-user:before{content:"\e008"}.glyphicon-film:before{content:"\e009"}.glyphicon-th-large:before{content:"\e010"}.glyphicon-th:before{content:"\e011"}.glyphicon-th-list:before{content:"\e012"}.glyphicon-ok:before{content:"\e013"}.glyphicon-remove:before{content:"\e014"}.glyphicon-zoom-in:before{content:"\e015"}.glyphicon-zoom-out:before{content:"\e016"}.glyphicon-off:before{content:"\e017"}.glyphicon-signal:before{content:"\e018"}.glyphicon-cog:before{content:"\e019"}.glyphicon-trash:before{content:"\e020"}.glyphicon-home:before{content:"\e021"}.glyphicon-file:before{content:"\e022"}.glyphicon-time:before{content:"\e023"}.glyphicon-road:before{content:"\e024"}.glyphicon-download-alt:before{content:"\e025"}.glyphicon-download:before{content:"\e026"}.glyphicon-upload:before{content:"\e027"}.glyphicon-inbox:before{content:"\e028"}.glyphicon-play-circle:before{content:"\e029"}.glyphicon-repeat:before{content:"\e030"}.glyphicon-refresh:before{content:"\e031"}.glyphicon-list-alt:before{content:"\e032"}.glyphicon-lock:before{content:"\e033"}.glyphicon-flag:before{content:"\e034"}.glyphicon-headphones:before{content:"\e035"}.glyphicon-volume-off:before{content:"\e036"}.glyphicon-volume-down:before{content:"\e037"}.glyphicon-volume-up:before{content:"\e038"}.glyphicon-qrcode:before{content:"\e039"}.glyphicon-barcode:before{content:"\e040"}.glyphicon-tag:before{content:"\e041"}.glyphicon-tags:before{content:"\e042"}.glyphicon-book:before{content:"\e043"}.glyphicon-bookmark:before{content:"\e044"}.glyphicon-print:before{content:"\e045"}.glyphicon-camera:before{content:"\e046"}.glyphicon-font:before{content:"\e047"}.glyphicon-bold:before{content:"\e048"}.glyphicon-italic:before{content:"\e049"}.glyphicon-text-height:before{content:"\e050"}.glyphicon-text-width:before{content:"\e051"}.glyphicon-align-left:before{content:"\e054"}.glyphicon-align-center:before{content:"\e053"}.glyphicon-align-right:before{content:"\e052"}.glyphicon-align-justify:before{content:"\e055"}.glyphicon-list:before{content:"\e056"}.glyphicon-indent-left:before{content:"\e058"}.glyphicon-indent-right:before{content:"\e057"}.glyphicon-facetime-video:before{content:"\e059"}.glyphicon-picture:before{content:"\e060"}.glyphicon-map-marker:before{content:"\e062"}.glyphicon-adjust:before{content:"\e063"}.glyphicon-tint:before{content:"\e064"}.glyphicon-edit:before{content:"\e065"}.glyphicon-share:before{content:"\e066"}.glyphicon-check:before{content:"\e067"}.glyphicon-move:before{content:"\e068"}.glyphicon-step-backward:before{content:"\e069"}.glyphicon-fast-backward:before{content:"\e070"}.glyphicon-backward:before{content:"\e071"}.glyphicon-play:before{content:"\e072"}.glyphicon-pause:before{content:"\e073"}.glyphicon-stop:before{content:"\e074"}.glyphicon-forward:before{content:"\e075"}.glyphicon-fast-forward:before{content:"\e076"}.glyphicon-step-forward:before{content:"\e077"}.glyphicon-eject:before{content:"\e078"}.glyphicon-chevron-left:before{content:"\e080"}.glyphicon-chevron-right:before{content:"\e079"}.glyphicon-plus-sign:before{content:"\e081"}.glyphicon-minus-sign:before{content:"\e082"}.glyphicon-remove-sign:before{content:"\e083"}.glyphicon-ok-sign:before{content:"\e084"}.glyphicon-question-sign:before{content:"\e085"}.glyphicon-info-sign:before{content:"\e086"}.glyphicon-screenshot:before{content:"\e087"}.glyphicon-remove-circle:before{content:"\e088"}.glyphicon-ok-circle:before{content:"\e089"}.glyphicon-ban-circle:before{content:"\e090"}.glyphicon-arrow-left:before{content:"\e092"}.glyphicon-arrow-right:before{content:"\e091"}.glyphicon-arrow-up:before{content:"\e093"}.glyphicon-arrow-down:before{content:"\e094"}.glyphicon-share-alt:before{content:"\e095"}.glyphicon-resize-full:before{content:"\e096"}.glyphicon-resize-small:before{content:"\e097"}.glyphicon-exclamation-sign:before{content:"\e101"}.glyphicon-gift:before{content:"\e102"}.glyphicon-leaf:before{content:"\e103"}.glyphicon-fire:before{content:"\e104"}.glyphicon-eye-open:before{content:"\e105"}.glyphicon-eye-close:before{content:"\e106"}.glyphicon-warning-sign:before{content:"\e107"}.glyphicon-plane:before{content:"\e108"}.glyphicon-calendar:before{content:"\e109"}.glyphicon-random:before{content:"\e110"}.glyphicon-comment:before{content:"\e111"}.glyphicon-magnet:before{content:"\e112"}.glyphicon-chevron-up:before{content:"\e113"}.glyphicon-chevron-down:before{content:"\e114"}.glyphicon-retweet:before{content:"\e115"}.glyphicon-shopping-cart:before{content:"\e116"}.glyphicon-folder-close:before{content:"\e117"}.glyphicon-folder-open:before{content:"\e118"}.glyphicon-resize-vertical:before{content:"\e119"}.glyphicon-resize-horizontal:before{content:"\e120"}.glyphicon-hdd:before{content:"\e121"}.glyphicon-bullhorn:before{content:"\e122"}.glyphicon-bell:before{content:"\e123"}.glyphicon-certificate:before{content:"\e124"}.glyphicon-thumbs-up:before{content:"\e125"}.glyphicon-thumbs-down:before{content:"\e126"}.glyphicon-hand-right:before{content:"\e128"}.glyphicon-hand-left:before{content:"\e127"}.glyphicon-hand-up:before{content:"\e129"}.glyphicon-hand-down:before{content:"\e130"}.glyphicon-circle-arrow-right:before{content:"\e132"}.glyphicon-circle-arrow-left:before{content:"\e131"}.glyphicon-circle-arrow-up:before{content:"\e133"}.glyphicon-circle-arrow-down:before{content:"\e134"}.glyphicon-globe:before{content:"\e135"}.glyphicon-wrench:before{content:"\e136"}.glyphicon-tasks:before{content:"\e137"}.glyphicon-filter:before{content:"\e138"}.glyphicon-briefcase:before{content:"\e139"}.glyphicon-fullscreen:before{content:"\e140"}.glyphicon-dashboard:before{content:"\e141"}.glyphicon-paperclip:before{content:"\e142"}.glyphicon-heart-empty:before{content:"\e143"}.glyphicon-link:before{content:"\e144"}.glyphicon-phone:before{content:"\e145"}.glyphicon-pushpin:before{content:"\e146"}.glyphicon-usd:before{content:"\e148"}.glyphicon-gbp:before{content:"\e149"}.glyphicon-sort:before{content:"\e150"}.glyphicon-sort-by-alphabet:before{content:"\e151"}.glyphicon-sort-by-alphabet-alt:before{content:"\e152"}.glyphicon-sort-by-order:before{content:"\e153"}.glyphicon-sort-by-order-alt:before{content:"\e154"}.glyphicon-sort-by-attributes:before{content:"\e155"}.glyphicon-sort-by-attributes-alt:before{content:"\e156"}.glyphicon-unchecked:before{content:"\e157"}.glyphicon-expand:before{content:"\e158"}.glyphicon-collapse-down:before{content:"\e159"}.glyphicon-collapse-up:before{content:"\e160"}.glyphicon-log-in:before{content:"\e161"}.glyphicon-flash:before{content:"\e162"}.glyphicon-log-out:before{content:"\e163"}.glyphicon-new-window:before{content:"\e164"}.glyphicon-record:before{content:"\e165"}.glyphicon-save:before{content:"\e166"}.glyphicon-open:before{content:"\e167"}.glyphicon-saved:before{content:"\e168"}.glyphicon-import:before{content:"\e169"}.glyphicon-export:before{content:"\e170"}.glyphicon-send:before{content:"\e171"}.glyphicon-floppy-disk:before{content:"\e172"}.glyphicon-floppy-saved:before{content:"\e173"}.glyphicon-floppy-remove:before{content:"\e174"}.glyphicon-floppy-save:before{content:"\e175"}.glyphicon-floppy-open:before{content:"\e176"}.glyphicon-credit-card:before{content:"\e177"}.glyphicon-transfer:before{content:"\e178"}.glyphicon-cutlery:before{content:"\e179"}.glyphicon-header:before{content:"\e180"}.glyphicon-compressed:before{content:"\e181"}.glyphicon-earphone:before{content:"\e182"}.glyphicon-phone-alt:before{content:"\e183"}.glyphicon-tower:before{content:"\e184"}.glyphicon-stats:before{content:"\e185"}.glyphicon-sd-video:before{content:"\e186"}.glyphicon-hd-video:before{content:"\e187"}.glyphicon-subtitles:before{content:"\e188"}.glyphicon-sound-stereo:before{content:"\e189"}.glyphicon-sound-dolby:before{content:"\e190"}.glyphicon-sound-5-1:before{content:"\e191"}.glyphicon-sound-6-1:before{content:"\e192"}.glyphicon-sound-7-1:before{content:"\e193"}.glyphicon-copyright-mark:before{content:"\e194"}.glyphicon-registration-mark:before{content:"\e195"}.glyphicon-cloud-download:before{content:"\e197"}.glyphicon-cloud-upload:before{content:"\e198"}.glyphicon-tree-conifer:before{content:"\e199"}.glyphicon-tree-deciduous:before{content:"\e200"}.glyphicon-cd:before{content:"\e201"}.glyphicon-save-file:before{content:"\e202"}.glyphicon-open-file:before{content:"\e203"}.glyphicon-level-up:before{content:"\e204"}.glyphicon-copy:before{content:"\e205"}.glyphicon-paste:before{content:"\e206"}.glyphicon-alert:before{content:"\e209"}.glyphicon-equalizer:before{content:"\e210"}.glyphicon-king:before{content:"\e211"}.glyphicon-queen:before{content:"\e212"}.glyphicon-pawn:before{content:"\e213"}.glyphicon-bishop:before{content:"\e214"}.glyphicon-knight:before{content:"\e215"}.glyphicon-baby-formula:before{content:"\e216"}.glyphicon-tent:before{content:"\26fa"}.glyphicon-blackboard:before{content:"\e218"}.glyphicon-bed:before{content:"\e219"}.glyphicon-apple:before{content:"\f8ff"}.glyphicon-erase:before{content:"\e221"}.glyphicon-hourglass:before{content:"\231b"}.glyphicon-lamp:before{content:"\e223"}.glyphicon-duplicate:before{content:"\e224"}.glyphicon-piggy-bank:before{content:"\e225"}.glyphicon-scissors:before{content:"\e226"}.glyphicon-bitcoin:before{content:"\e227"}.glyphicon-btc:before{content:"\e227"}.glyphicon-xbt:before{content:"\e227"}.glyphicon-yen:before{content:"\00a5"}.glyphicon-jpy:before{content:"\00a5"}.glyphicon-ruble:before{content:"\20bd"}.glyphicon-rub:before{content:"\20bd"}.glyphicon-scale:before{content:"\e230"}.glyphicon-ice-lolly:before{content:"\e231"}.glyphicon-ice-lolly-tasted:before{content:"\e232"}.glyphicon-education:before{content:"\e233"}.glyphicon-option-horizontal:before{content:"\e234"}.glyphicon-option-vertical:before{content:"\e235"}.glyphicon-menu-hamburger:before{content:"\e236"}.glyphicon-modal-window:before{content:"\e237"}.glyphicon-oil:before{content:"\e238"}.glyphicon-grain:before{content:"\e239"}.glyphicon-sunglasses:before{content:"\e240"}.glyphicon-text-size:before{content:"\e241"}.glyphicon-text-color:before{content:"\e242"}.glyphicon-text-background:before{content:"\e243"}.glyphicon-object-align-top:before{content:"\e244"}.glyphicon-object-align-bottom:before{content:"\e245"}.glyphicon-object-align-horizontal:before{content:"\e246"}.glyphicon-object-align-left:before{content:"\e249"}.glyphicon-object-align-vertical:before{content:"\e248"}.glyphicon-object-align-right:before{content:"\e247"}.glyphicon-triangle-right:before{content:"\e251"}.glyphicon-triangle-left:before{content:"\e250"}.glyphicon-triangle-bottom:before{content:"\e252"}.glyphicon-triangle-top:before{content:"\e253"}.glyphicon-console:before{content:"\e254"}.glyphicon-superscript:before{content:"\e255"}.glyphicon-subscript:before{content:"\e256"}.glyphicon-menu-left:before{content:"\e258"}.glyphicon-menu-right:before{content:"\e257"}.glyphicon-menu-down:before{content:"\e259"}.glyphicon-menu-up:before{content:"\e260"}*{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}:after,:before{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}html{font-size:10px;-webkit-tap-highlight-color:rgba(0,0,0,0)}body{font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:14px;line-height:1.42857143;color:#333;background-color:#fff}button,input,select,textarea{font-family:inherit;font-size:inherit;line-height:inherit}a{color:#337ab7;text-decoration:none}a:focus,a:hover{color:#23527c;text-decoration:underline}a:focus{outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}figure{margin:0}img{vertical-align:middle}.carousel-inner>.item>a>img,.carousel-inner>.item>img,.img-responsive,.thumbnail a>img,.thumbnail>img{display:block;max-width:100%;height:auto}.img-rounded{border-radius:6px}.img-thumbnail{display:inline-block;max-width:100%;height:auto;padding:4px;line-height:1.42857143;background-color:#fff;border:1px solid #ddd;border-radius:4px;-webkit-transition:all .2s ease-in-out;-o-transition:all .2s ease-in-out;transition:all .2s ease-in-out}.img-circle{border-radius:50%}hr{margin-top:20px;margin-bottom:20px;border:0;border-top:1px solid #eee}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);border:0}.sr-only-focusable:active,.sr-only-focusable:focus{position:static;width:auto;height:auto;margin:0;overflow:visible;clip:auto}[role=button]{cursor:pointer}.h1,.h2,.h3,.h4,.h5,.h6,h1,h2,h3,h4,h5,h6{font-family:inherit;font-weight:500;line-height:1.1;color:inherit}.h1 .small,.h1 small,.h2 .small,.h2 small,.h3 .small,.h3 small,.h4 .small,.h4 small,.h5 .small,.h5 small,.h6 .small,.h6 small,h1 .small,h1 small,h2 .small,h2 small,h3 .small,h3 small,h4 .small,h4 small,h5 .small,h5 small,h6 .small,h6 small{font-weight:400;line-height:1;color:#777}.h1,.h2,.h3,h1,h2,h3{margin-top:20px;margin-bottom:10px}.h1 .small,.h1 small,.h2 .small,.h2 small,.h3 .small,.h3 small,h1 .small,h1 small,h2 .small,h2 small,h3 .small,h3 small{font-size:65%}.h4,.h5,.h6,h4,h5,h6{margin-top:10px;margin-bottom:10px}.h4 .small,.h4 small,.h5 .small,.h5 small,.h6 .small,.h6 small,h4 .small,h4 small,h5 .small,h5 small,h6 .small,h6 small{font-size:75%}.h1,h1{font-size:36px}.h2,h2{font-size:30px}.h3,h3{font-size:24px}.h4,h4{font-size:18px}.h5,h5{font-size:14px}.h6,h6{font-size:12px}p{margin:0 0 10px}.lead{margin-bottom:20px;font-size:16px;font-weight:300;line-height:1.4}@media (min-width:768px){.lead{font-size:21px}}.small,small{font-size:85%}.mark,mark{padding:.2em;background-color:#fcf8e3}.text-left{text-align:right}.text-right{text-align:left}.text-center{text-align:center}.text-justify{text-align:justify}.text-nowrap{white-space:nowrap}.text-lowercase{text-transform:lowercase}.text-uppercase{text-transform:uppercase}.text-capitalize{text-transform:capitalize}.text-muted{color:#777}.text-primary{color:#337ab7}a.text-primary:focus,a.text-primary:hover{color:#286090}.text-success{color:#3c763d}a.text-success:focus,a.text-success:hover{color:#2b542c}.text-info{color:#31708f}a.text-info:focus,a.text-info:hover{color:#245269}.text-warning{color:#8a6d3b}a.text-warning:focus,a.text-warning:hover{color:#66512c}.text-danger{color:#a94442}a.text-danger:focus,a.text-danger:hover{color:#843534}.bg-primary{color:#fff;background-color:#337ab7}a.bg-primary:focus,a.bg-primary:hover{background-color:#286090}.bg-success{background-color:#dff0d8}a.bg-success:focus,a.bg-success:hover{background-color:#c1e2b3}.bg-info{background-color:#d9edf7}a.bg-info:focus,a.bg-info:hover{background-color:#afd9ee}.bg-warning{background-color:#fcf8e3}a.bg-warning:focus,a.bg-warning:hover{background-color:#f7ecb5}.bg-danger{background-color:#f2dede}a.bg-danger:focus,a.bg-danger:hover{background-color:#e4b9b9}.page-header{padding-bottom:9px;margin:40px 0 20px;border-bottom:1px solid #eee}ol,ul{margin-top:0;margin-bottom:10px}ol ol,ol ul,ul ol,ul ul{margin-bottom:0}.list-unstyled{padding-right:0;list-style:none}.list-inline{padding-right:0;margin-right:-5px;list-style:none}.list-inline>li{display:inline-block;padding-right:5px;padding-left:5px}dl{margin-top:0;margin-bottom:20px}dd,dt{line-height:1.42857143}dt{font-weight:700}dd{margin-right:0}@media (min-width:768px){.dl-horizontal dt{float:right;width:160px;overflow:hidden;clear:right;text-align:left;text-overflow:ellipsis;white-space:nowrap}.dl-horizontal dd{margin-right:180px}}abbr[data-original-title],abbr[title]{cursor:help;border-bottom:1px dotted #777}.initialism{font-size:90%;text-transform:uppercase}blockquote{padding:10px 20px;margin:0 0 20px;font-size:17.5px;border-right:5px solid #eee}blockquote ol:last-child,blockquote p:last-child,blockquote ul:last-child{margin-bottom:0}blockquote .small,blockquote footer,blockquote small{display:block;font-size:80%;line-height:1.42857143;color:#777}blockquote .small:before,blockquote footer:before,blockquote small:before{content:'\2014 \00A0'}.blockquote-reverse,blockquote.pull-right{padding-right:0;padding-left:15px;text-align:left;border-right:0;border-left:5px solid #eee}.blockquote-reverse .small:before,.blockquote-reverse footer:before,.blockquote-reverse small:before,blockquote.pull-right .small:before,blockquote.pull-right footer:before,blockquote.pull-right small:before{content:''}.blockquote-reverse .small:after,.blockquote-reverse footer:after,.blockquote-reverse small:after,blockquote.pull-right .small:after,blockquote.pull-right footer:after,blockquote.pull-right small:after{content:'\00A0 \2014'}address{margin-bottom:20px;font-style:normal;line-height:1.42857143}code,kbd,pre,samp{font-family:Menlo,Monaco,Consolas,"Courier New",monospace}code{padding:2px 4px;font-size:90%;color:#c7254e;background-color:#f9f2f4;border-radius:4px}kbd{padding:2px 4px;font-size:90%;color:#fff;background-color:#333;border-radius:3px;-webkit-box-shadow:inset 0 -1px 0 rgba(0,0,0,.25);box-shadow:inset 0 -1px 0 rgba(0,0,0,.25)}kbd kbd{padding:0;font-size:100%;font-weight:700;-webkit-box-shadow:none;box-shadow:none}pre{display:block;padding:9.5px;margin:0 0 10px;font-size:13px;line-height:1.42857143;color:#333;word-break:break-all;word-wrap:break-word;background-color:#f5f5f5;border:1px solid #ccc;border-radius:4px}pre code{padding:0;font-size:inherit;color:inherit;white-space:pre-wrap;background-color:transparent;border-radius:0}.pre-scrollable{max-height:340px;overflow-y:scroll}.container{padding-right:15px;padding-left:15px;margin-right:auto;margin-left:auto}@media (min-width:768px){.container{width:750px}}@media (min-width:992px){.container{width:970px}}@media (min-width:1200px){.container{width:1170px}}.container-fluid{padding-right:15px;padding-left:15px;margin-right:auto;margin-left:auto}.row{margin-right:-15px;margin-left:-15px}.col-lg-1,.col-lg-10,.col-lg-11,.col-lg-12,.col-lg-2,.col-lg-3,.col-lg-4,.col-lg-5,.col-lg-6,.col-lg-7,.col-lg-8,.col-lg-9,.col-md-1,.col-md-10,.col-md-11,.col-md-12,.col-md-2,.col-md-3,.col-md-4,.col-md-5,.col-md-6,.col-md-7,.col-md-8,.col-md-9,.col-sm-1,.col-sm-10,.col-sm-11,.col-sm-12,.col-sm-2,.col-sm-3,.col-sm-4,.col-sm-5,.col-sm-6,.col-sm-7,.col-sm-8,.col-sm-9,.col-xs-1,.col-xs-10,.col-xs-11,.col-xs-12,.col-xs-2,.col-xs-3,.col-xs-4,.col-xs-5,.col-xs-6,.col-xs-7,.col-xs-8,.col-xs-9{position:relative;min-height:1px;padding-right:15px;padding-left:15px}.col-xs-1,.col-xs-10,.col-xs-11,.col-xs-12,.col-xs-2,.col-xs-3,.col-xs-4,.col-xs-5,.col-xs-6,.col-xs-7,.col-xs-8,.col-xs-9{float:right}.col-xs-12{width:100%}.col-xs-11{width:91.66666667%}.col-xs-10{width:83.33333333%}.col-xs-9{width:75%}.col-xs-8{width:66.66666667%}.col-xs-7{width:58.33333333%}.col-xs-6{width:50%}.col-xs-5{width:41.66666667%}.col-xs-4{width:33.33333333%}.col-xs-3{width:25%}.col-xs-2{width:16.66666667%}.col-xs-1{width:8.33333333%}.col-xs-pull-12{left:100%}.col-xs-pull-11{left:91.66666667%}.col-xs-pull-10{left:83.33333333%}.col-xs-pull-9{left:75%}.col-xs-pull-8{left:66.66666667%}.col-xs-pull-7{left:58.33333333%}.col-xs-pull-6{left:50%}.col-xs-pull-5{left:41.66666667%}.col-xs-pull-4{left:33.33333333%}.col-xs-pull-3{left:25%}.col-xs-pull-2{left:16.66666667%}.col-xs-pull-1{left:8.33333333%}.col-xs-pull-0{left:auto}.col-xs-push-12{right:100%}.col-xs-push-11{right:91.66666667%}.col-xs-push-10{right:83.33333333%}.col-xs-push-9{right:75%}.col-xs-push-8{right:66.66666667%}.col-xs-push-7{right:58.33333333%}.col-xs-push-6{right:50%}.col-xs-push-5{right:41.66666667%}.col-xs-push-4{right:33.33333333%}.col-xs-push-3{right:25%}.col-xs-push-2{right:16.66666667%}.col-xs-push-1{right:8.33333333%}.col-xs-push-0{right:auto}.col-xs-offset-12{margin-right:100%}.col-xs-offset-11{margin-right:91.66666667%}.col-xs-offset-10{margin-right:83.33333333%}.col-xs-offset-9{margin-right:75%}.col-xs-offset-8{margin-right:66.66666667%}.col-xs-offset-7{margin-right:58.33333333%}.col-xs-offset-6{margin-right:50%}.col-xs-offset-5{margin-right:41.66666667%}.col-xs-offset-4{margin-right:33.33333333%}.col-xs-offset-3{margin-right:25%}.col-xs-offset-2{margin-right:16.66666667%}.col-xs-offset-1{margin-right:8.33333333%}.col-xs-offset-0{margin-right:0}@media (min-width:768px){.col-sm-1,.col-sm-10,.col-sm-11,.col-sm-12,.col-sm-2,.col-sm-3,.col-sm-4,.col-sm-5,.col-sm-6,.col-sm-7,.col-sm-8,.col-sm-9{float:right}.col-sm-12{width:100%}.col-sm-11{width:91.66666667%}.col-sm-10{width:83.33333333%}.col-sm-9{width:75%}.col-sm-8{width:66.66666667%}.col-sm-7{width:58.33333333%}.col-sm-6{width:50%}.col-sm-5{width:41.66666667%}.col-sm-4{width:33.33333333%}.col-sm-3{width:25%}.col-sm-2{width:16.66666667%}.col-sm-1{width:8.33333333%}.col-sm-pull-12{left:100%}.col-sm-pull-11{left:91.66666667%}.col-sm-pull-10{left:83.33333333%}.col-sm-pull-9{left:75%}.col-sm-pull-8{left:66.66666667%}.col-sm-pull-7{left:58.33333333%}.col-sm-pull-6{left:50%}.col-sm-pull-5{left:41.66666667%}.col-sm-pull-4{left:33.33333333%}.col-sm-pull-3{left:25%}.col-sm-pull-2{left:16.66666667%}.col-sm-pull-1{left:8.33333333%}.col-sm-pull-0{left:auto}.col-sm-push-12{right:100%}.col-sm-push-11{right:91.66666667%}.col-sm-push-10{right:83.33333333%}.col-sm-push-9{right:75%}.col-sm-push-8{right:66.66666667%}.col-sm-push-7{right:58.33333333%}.col-sm-push-6{right:50%}.col-sm-push-5{right:41.66666667%}.col-sm-push-4{right:33.33333333%}.col-sm-push-3{right:25%}.col-sm-push-2{right:16.66666667%}.col-sm-push-1{right:8.33333333%}.col-sm-push-0{right:auto}.col-sm-offset-12{margin-right:100%}.col-sm-offset-11{margin-right:91.66666667%}.col-sm-offset-10{margin-right:83.33333333%}.col-sm-offset-9{margin-right:75%}.col-sm-offset-8{margin-right:66.66666667%}.col-sm-offset-7{margin-right:58.33333333%}.col-sm-offset-6{margin-right:50%}.col-sm-offset-5{margin-right:41.66666667%}.col-sm-offset-4{margin-right:33.33333333%}.col-sm-offset-3{margin-right:25%}.col-sm-offset-2{margin-right:16.66666667%}.col-sm-offset-1{margin-right:8.33333333%}.col-sm-offset-0{margin-right:0}}@media (min-width:992px){.col-md-1,.col-md-10,.col-md-11,.col-md-12,.col-md-2,.col-md-3,.col-md-4,.col-md-5,.col-md-6,.col-md-7,.col-md-8,.col-md-9{float:right}.col-md-12{width:100%}.col-md-11{width:91.66666667%}.col-md-10{width:83.33333333%}.col-md-9{width:75%}.col-md-8{width:66.66666667%}.col-md-7{width:58.33333333%}.col-md-6{width:50%}.col-md-5{width:41.66666667%}.col-md-4{width:33.33333333%}.col-md-3{width:25%}.col-md-2{width:16.66666667%}.col-md-1{width:8.33333333%}.col-md-pull-12{left:100%}.col-md-pull-11{left:91.66666667%}.col-md-pull-10{left:83.33333333%}.col-md-pull-9{left:75%}.col-md-pull-8{left:66.66666667%}.col-md-pull-7{left:58.33333333%}.col-md-pull-6{left:50%}.col-md-pull-5{left:41.66666667%}.col-md-pull-4{left:33.33333333%}.col-md-pull-3{left:25%}.col-md-pull-2{left:16.66666667%}.col-md-pull-1{left:8.33333333%}.col-md-pull-0{left:auto}.col-md-push-12{right:100%}.col-md-push-11{right:91.66666667%}.col-md-push-10{right:83.33333333%}.col-md-push-9{right:75%}.col-md-push-8{right:66.66666667%}.col-md-push-7{right:58.33333333%}.col-md-push-6{right:50%}.col-md-push-5{right:41.66666667%}.col-md-push-4{right:33.33333333%}.col-md-push-3{right:25%}.col-md-push-2{right:16.66666667%}.col-md-push-1{right:8.33333333%}.col-md-push-0{right:auto}.col-md-offset-12{margin-right:100%}.col-md-offset-11{margin-right:91.66666667%}.col-md-offset-10{margin-right:83.33333333%}.col-md-offset-9{margin-right:75%}.col-md-offset-8{margin-right:66.66666667%}.col-md-offset-7{margin-right:58.33333333%}.col-md-offset-6{margin-right:50%}.col-md-offset-5{margin-right:41.66666667%}.col-md-offset-4{margin-right:33.33333333%}.col-md-offset-3{margin-right:25%}.col-md-offset-2{margin-right:16.66666667%}.col-md-offset-1{margin-right:8.33333333%}.col-md-offset-0{margin-right:0}}@media (min-width:1200px){.col-lg-1,.col-lg-10,.col-lg-11,.col-lg-12,.col-lg-2,.col-lg-3,.col-lg-4,.col-lg-5,.col-lg-6,.col-lg-7,.col-lg-8,.col-lg-9{float:right}.col-lg-12{width:100%}.col-lg-11{width:91.66666667%}.col-lg-10{width:83.33333333%}.col-lg-9{width:75%}.col-lg-8{width:66.66666667%}.col-lg-7{width:58.33333333%}.col-lg-6{width:50%}.col-lg-5{width:41.66666667%}.col-lg-4{width:33.33333333%}.col-lg-3{width:25%}.col-lg-2{width:16.66666667%}.col-lg-1{width:8.33333333%}.col-lg-pull-12{left:100%}.col-lg-pull-11{left:91.66666667%}.col-lg-pull-10{left:83.33333333%}.col-lg-pull-9{left:75%}.col-lg-pull-8{left:66.66666667%}.col-lg-pull-7{left:58.33333333%}.col-lg-pull-6{left:50%}.col-lg-pull-5{left:41.66666667%}.col-lg-pull-4{left:33.33333333%}.col-lg-pull-3{left:25%}.col-lg-pull-2{left:16.66666667%}.col-lg-pull-1{left:8.33333333%}.col-lg-pull-0{left:auto}.col-lg-push-12{right:100%}.col-lg-push-11{right:91.66666667%}.col-lg-push-10{right:83.33333333%}.col-lg-push-9{right:75%}.col-lg-push-8{right:66.66666667%}.col-lg-push-7{right:58.33333333%}.col-lg-push-6{right:50%}.col-lg-push-5{right:41.66666667%}.col-lg-push-4{right:33.33333333%}.col-lg-push-3{right:25%}.col-lg-push-2{right:16.66666667%}.col-lg-push-1{right:8.33333333%}.col-lg-push-0{right:auto}.col-lg-offset-12{margin-right:100%}.col-lg-offset-11{margin-right:91.66666667%}.col-lg-offset-10{margin-right:83.33333333%}.col-lg-offset-9{margin-right:75%}.col-lg-offset-8{margin-right:66.66666667%}.col-lg-offset-7{margin-right:58.33333333%}.col-lg-offset-6{margin-right:50%}.col-lg-offset-5{margin-right:41.66666667%}.col-lg-offset-4{margin-right:33.33333333%}.col-lg-offset-3{margin-right:25%}.col-lg-offset-2{margin-right:16.66666667%}.col-lg-offset-1{margin-right:8.33333333%}.col-lg-offset-0{margin-right:0}}table{background-color:transparent}caption{padding-top:8px;padding-bottom:8px;color:#777;text-align:right}th{text-align:right}.table{width:100%;max-width:100%;margin-bottom:20px}.table>tbody>tr>td,.table>tbody>tr>th,.table>tfoot>tr>td,.table>tfoot>tr>th,.table>thead>tr>td,.table>thead>tr>th{padding:8px;line-height:1.42857143;vertical-align:top;border-top:1px solid #ddd}.table>thead>tr>th{vertical-align:bottom;border-bottom:2px solid #ddd}.table>caption+thead>tr:first-child>td,.table>caption+thead>tr:first-child>th,.table>colgroup+thead>tr:first-child>td,.table>colgroup+thead>tr:first-child>th,.table>thead:first-child>tr:first-child>td,.table>thead:first-child>tr:first-child>th{border-top:0}.table>tbody+tbody{border-top:2px solid #ddd}.table .table{background-color:#fff}.table-condensed>tbody>tr>td,.table-condensed>tbody>tr>th,.table-condensed>tfoot>tr>td,.table-condensed>tfoot>tr>th,.table-condensed>thead>tr>td,.table-condensed>thead>tr>th{padding:5px}.table-bordered{border:1px solid #ddd}.table-bordered>tbody>tr>td,.table-bordered>tbody>tr>th,.table-bordered>tfoot>tr>td,.table-bordered>tfoot>tr>th,.table-bordered>thead>tr>td,.table-bordered>thead>tr>th{border:1px solid #ddd}.table-bordered>thead>tr>td,.table-bordered>thead>tr>th{border-bottom-width:2px}.table-striped>tbody>tr:nth-of-type(odd){background-color:#f9f9f9}.table-hover>tbody>tr:hover{background-color:#f5f5f5}table col[class*=col-]{position:static;display:table-column;float:none}table td[class*=col-],table th[class*=col-]{position:static;display:table-cell;float:none}.table>tbody>tr.active>td,.table>tbody>tr.active>th,.table>tbody>tr>td.active,.table>tbody>tr>th.active,.table>tfoot>tr.active>td,.table>tfoot>tr.active>th,.table>tfoot>tr>td.active,.table>tfoot>tr>th.active,.table>thead>tr.active>td,.table>thead>tr.active>th,.table>thead>tr>td.active,.table>thead>tr>th.active{background-color:#f5f5f5}.table-hover>tbody>tr.active:hover>td,.table-hover>tbody>tr.active:hover>th,.table-hover>tbody>tr:hover>.active,.table-hover>tbody>tr>td.active:hover,.table-hover>tbody>tr>th.active:hover{background-color:#e8e8e8}.table>tbody>tr.success>td,.table>tbody>tr.success>th,.table>tbody>tr>td.success,.table>tbody>tr>th.success,.table>tfoot>tr.success>td,.table>tfoot>tr.success>th,.table>tfoot>tr>td.success,.table>tfoot>tr>th.success,.table>thead>tr.success>td,.table>thead>tr.success>th,.table>thead>tr>td.success,.table>thead>tr>th.success{background-color:#dff0d8}.table-hover>tbody>tr.success:hover>td,.table-hover>tbody>tr.success:hover>th,.table-hover>tbody>tr:hover>.success,.table-hover>tbody>tr>td.success:hover,.table-hover>tbody>tr>th.success:hover{background-color:#d0e9c6}.table>tbody>tr.info>td,.table>tbody>tr.info>th,.table>tbody>tr>td.info,.table>tbody>tr>th.info,.table>tfoot>tr.info>td,.table>tfoot>tr.info>th,.table>tfoot>tr>td.info,.table>tfoot>tr>th.info,.table>thead>tr.info>td,.table>thead>tr.info>th,.table>thead>tr>td.info,.table>thead>tr>th.info{background-color:#d9edf7}.table-hover>tbody>tr.info:hover>td,.table-hover>tbody>tr.info:hover>th,.table-hover>tbody>tr:hover>.info,.table-hover>tbody>tr>td.info:hover,.table-hover>tbody>tr>th.info:hover{background-color:#c4e3f3}.table>tbody>tr.warning>td,.table>tbody>tr.warning>th,.table>tbody>tr>td.warning,.table>tbody>tr>th.warning,.table>tfoot>tr.warning>td,.table>tfoot>tr.warning>th,.table>tfoot>tr>td.warning,.table>tfoot>tr>th.warning,.table>thead>tr.warning>td,.table>thead>tr.warning>th,.table>thead>tr>td.warning,.table>thead>tr>th.warning{background-color:#fcf8e3}.table-hover>tbody>tr.warning:hover>td,.table-hover>tbody>tr.warning:hover>th,.table-hover>tbody>tr:hover>.warning,.table-hover>tbody>tr>td.warning:hover,.table-hover>tbody>tr>th.warning:hover{background-color:#faf2cc}.table>tbody>tr.danger>td,.table>tbody>tr.danger>th,.table>tbody>tr>td.danger,.table>tbody>tr>th.danger,.table>tfoot>tr.danger>td,.table>tfoot>tr.danger>th,.table>tfoot>tr>td.danger,.table>tfoot>tr>th.danger,.table>thead>tr.danger>td,.table>thead>tr.danger>th,.table>thead>tr>td.danger,.table>thead>tr>th.danger{background-color:#f2dede}.table-hover>tbody>tr.danger:hover>td,.table-hover>tbody>tr.danger:hover>th,.table-hover>tbody>tr:hover>.danger,.table-hover>tbody>tr>td.danger:hover,.table-hover>tbody>tr>th.danger:hover{background-color:#ebcccc}.table-responsive{min-height:.01%;overflow-x:auto}@media screen and (max-width:767px){.table-responsive{width:100%;margin-bottom:15px;overflow-y:hidden;-ms-overflow-style:-ms-autohiding-scrollbar;border:1px solid #ddd}.table-responsive>.table{margin-bottom:0}.table-responsive>.table>tbody>tr>td,.table-responsive>.table>tbody>tr>th,.table-responsive>.table>tfoot>tr>td,.table-responsive>.table>tfoot>tr>th,.table-responsive>.table>thead>tr>td,.table-responsive>.table>thead>tr>th{white-space:nowrap}.table-responsive>.table-bordered{border:0}.table-responsive>.table-bordered>tbody>tr>td:first-child,.table-responsive>.table-bordered>tbody>tr>th:first-child,.table-responsive>.table-bordered>tfoot>tr>td:first-child,.table-responsive>.table-bordered>tfoot>tr>th:first-child,.table-responsive>.table-bordered>thead>tr>td:first-child,.table-responsive>.table-bordered>thead>tr>th:first-child{border-right:0}.table-responsive>.table-bordered>tbody>tr>td:last-child,.table-responsive>.table-bordered>tbody>tr>th:last-child,.table-responsive>.table-bordered>tfoot>tr>td:last-child,.table-responsive>.table-bordered>tfoot>tr>th:last-child,.table-responsive>.table-bordered>thead>tr>td:last-child,.table-responsive>.table-bordered>thead>tr>th:last-child{border-left:0}.table-responsive>.table-bordered>tbody>tr:last-child>td,.table-responsive>.table-bordered>tbody>tr:last-child>th,.table-responsive>.table-bordered>tfoot>tr:last-child>td,.table-responsive>.table-bordered>tfoot>tr:last-child>th{border-bottom:0}}fieldset{min-width:0;padding:0;margin:0;border:0}legend{display:block;width:100%;padding:0;margin-bottom:20px;font-size:21px;line-height:inherit;color:#333;border:0;border-bottom:1px solid #e5e5e5}label{display:inline-block;max-width:100%;margin-bottom:5px;font-weight:700}input[type=search]{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}input[type=checkbox],input[type=radio]{margin:4px 0 0;margin-top:1px\9;line-height:normal}input[type=file]{display:block}input[type=range]{display:block;width:100%}select[multiple],select[size]{height:auto}input[type=file]:focus,input[type=checkbox]:focus,input[type=radio]:focus{outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}output{display:block;padding-top:7px;font-size:14px;line-height:1.42857143;color:#555}.form-control{display:block;width:100%;height:34px;padding:6px 12px;font-size:14px;line-height:1.42857143;color:#555;background-color:#fff;background-image:none;border:1px solid #ccc;border-radius:4px;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075);box-shadow:inset 0 1px 1px rgba(0,0,0,.075);-webkit-transition:border-color ease-in-out .15s,-webkit-box-shadow ease-in-out .15s;-o-transition:border-color ease-in-out .15s,box-shadow ease-in-out .15s;transition:border-color ease-in-out .15s,box-shadow ease-in-out .15s}.form-control:focus{border-color:#66afe9;outline:0;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 8px rgba(102,175,233,.6);box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 8px rgba(102,175,233,.6)}.form-control::-moz-placeholder{color:#999;opacity:1}.form-control:-ms-input-placeholder{color:#999}.form-control::-webkit-input-placeholder{color:#999}.form-control::-ms-expand{background-color:transparent;border:0}.form-control[disabled],.form-control[readonly],fieldset[disabled] .form-control{background-color:#eee;opacity:1}.form-control[disabled],fieldset[disabled] .form-control{cursor:not-allowed}textarea.form-control{height:auto}input[type=search]{-webkit-appearance:none}@media screen and (-webkit-min-device-pixel-ratio:0){input[type=date].form-control,input[type=time].form-control,input[type=datetime-local].form-control,input[type=month].form-control{line-height:34px}.input-group-sm input[type=date],.input-group-sm input[type=time],.input-group-sm input[type=datetime-local],.input-group-sm input[type=month],input[type=date].input-sm,input[type=time].input-sm,input[type=datetime-local].input-sm,input[type=month].input-sm{line-height:30px}.input-group-lg input[type=date],.input-group-lg input[type=time],.input-group-lg input[type=datetime-local],.input-group-lg input[type=month],input[type=date].input-lg,input[type=time].input-lg,input[type=datetime-local].input-lg,input[type=month].input-lg{line-height:46px}}.form-group{margin-bottom:15px}.checkbox,.radio{position:relative;display:block;margin-top:10px;margin-bottom:10px}.checkbox label,.radio label{min-height:20px;padding-right:20px;margin-bottom:0;font-weight:400;cursor:pointer}.checkbox input[type=checkbox],.checkbox-inline input[type=checkbox],.radio input[type=radio],.radio-inline input[type=radio]{position:absolute;margin-top:4px\9;margin-right:-20px}.checkbox+.checkbox,.radio+.radio{margin-top:-5px}.checkbox-inline,.radio-inline{position:relative;display:inline-block;padding-right:20px;margin-bottom:0;font-weight:400;vertical-align:middle;cursor:pointer}.checkbox-inline+.checkbox-inline,.radio-inline+.radio-inline{margin-top:0;margin-right:10px}fieldset[disabled] input[type=checkbox],fieldset[disabled] input[type=radio],input[type=checkbox].disabled,input[type=checkbox][disabled],input[type=radio].disabled,input[type=radio][disabled]{cursor:not-allowed}.checkbox-inline.disabled,.radio-inline.disabled,fieldset[disabled] .checkbox-inline,fieldset[disabled] .radio-inline{cursor:not-allowed}.checkbox.disabled label,.radio.disabled label,fieldset[disabled] .checkbox label,fieldset[disabled] .radio label{cursor:not-allowed}.form-control-static{min-height:34px;padding-top:7px;padding-bottom:7px;margin-bottom:0}.form-control-static.input-lg,.form-control-static.input-sm{padding-right:0;padding-left:0}.input-sm{height:30px;padding:5px 10px;font-size:12px;line-height:1.5;border-radius:3px}select.input-sm{height:30px;line-height:30px}select[multiple].input-sm,textarea.input-sm{height:auto}.form-group-sm .form-control{height:30px;padding:5px 10px;font-size:12px;line-height:1.5;border-radius:3px}.form-group-sm select.form-control{height:30px;line-height:30px}.form-group-sm select[multiple].form-control,.form-group-sm textarea.form-control{height:auto}.form-group-sm .form-control-static{height:30px;min-height:32px;padding:6px 10px;font-size:12px;line-height:1.5}.input-lg{height:46px;padding:10px 16px;font-size:18px;line-height:1.3333333;border-radius:6px}select.input-lg{height:46px;line-height:46px}select[multiple].input-lg,textarea.input-lg{height:auto}.form-group-lg .form-control{height:46px;padding:10px 16px;font-size:18px;line-height:1.3333333;border-radius:6px}.form-group-lg select.form-control{height:46px;line-height:46px}.form-group-lg select[multiple].form-control,.form-group-lg textarea.form-control{height:auto}.form-group-lg .form-control-static{height:46px;min-height:38px;padding:11px 16px;font-size:18px;line-height:1.3333333}.has-feedback{position:relative}.has-feedback .form-control{padding-left:42.5px}.form-control-feedback{position:absolute;top:0;left:0;z-index:2;display:block;width:34px;height:34px;line-height:34px;text-align:center;pointer-events:none}.form-group-lg .form-control+.form-control-feedback,.input-group-lg+.form-control-feedback,.input-lg+.form-control-feedback{width:46px;height:46px;line-height:46px}.form-group-sm .form-control+.form-control-feedback,.input-group-sm+.form-control-feedback,.input-sm+.form-control-feedback{width:30px;height:30px;line-height:30px}.has-success .checkbox,.has-success .checkbox-inline,.has-success .control-label,.has-success .help-block,.has-success .radio,.has-success .radio-inline,.has-success.checkbox label,.has-success.checkbox-inline label,.has-success.radio label,.has-success.radio-inline label{color:#3c763d}.has-success .form-control{border-color:#3c763d;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075);box-shadow:inset 0 1px 1px rgba(0,0,0,.075)}.has-success .form-control:focus{border-color:#2b542c;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #67b168;box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #67b168}.has-success .input-group-addon{color:#3c763d;background-color:#dff0d8;border-color:#3c763d}.has-success .form-control-feedback{color:#3c763d}.has-warning .checkbox,.has-warning .checkbox-inline,.has-warning .control-label,.has-warning .help-block,.has-warning .radio,.has-warning .radio-inline,.has-warning.checkbox label,.has-warning.checkbox-inline label,.has-warning.radio label,.has-warning.radio-inline label{color:#8a6d3b}.has-warning .form-control{border-color:#8a6d3b;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075);box-shadow:inset 0 1px 1px rgba(0,0,0,.075)}.has-warning .form-control:focus{border-color:#66512c;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #c0a16b;box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #c0a16b}.has-warning .input-group-addon{color:#8a6d3b;background-color:#fcf8e3;border-color:#8a6d3b}.has-warning .form-control-feedback{color:#8a6d3b}.has-error .checkbox,.has-error .checkbox-inline,.has-error .control-label,.has-error .help-block,.has-error .radio,.has-error .radio-inline,.has-error.checkbox label,.has-error.checkbox-inline label,.has-error.radio label,.has-error.radio-inline label{color:#a94442}.has-error .form-control{border-color:#a94442;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075);box-shadow:inset 0 1px 1px rgba(0,0,0,.075)}.has-error .form-control:focus{border-color:#843534;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #ce8483;box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #ce8483}.has-error .input-group-addon{color:#a94442;background-color:#f2dede;border-color:#a94442}.has-error .form-control-feedback{color:#a94442}.has-feedback label~.form-control-feedback{top:25px}.has-feedback label.sr-only~.form-control-feedback{top:0}.help-block{display:block;margin-top:5px;margin-bottom:10px;color:#737373}@media (min-width:768px){.form-inline .form-group{display:inline-block;margin-bottom:0;vertical-align:middle}.form-inline .form-control{display:inline-block;width:auto;vertical-align:middle}.form-inline .form-control-static{display:inline-block}.form-inline .input-group{display:inline-table;vertical-align:middle}.form-inline .input-group .form-control,.form-inline .input-group .input-group-addon,.form-inline .input-group .input-group-btn{width:auto}.form-inline .input-group>.form-control{width:100%}.form-inline .control-label{margin-bottom:0;vertical-align:middle}.form-inline .checkbox,.form-inline .radio{display:inline-block;margin-top:0;margin-bottom:0;vertical-align:middle}.form-inline .checkbox label,.form-inline .radio label{padding-right:0}.form-inline .checkbox input[type=checkbox],.form-inline .radio input[type=radio]{position:relative;margin-right:0}.form-inline .has-feedback .form-control-feedback{top:0}}.form-horizontal .checkbox,.form-horizontal .checkbox-inline,.form-horizontal .radio,.form-horizontal .radio-inline{padding-top:7px;margin-top:0;margin-bottom:0}.form-horizontal .checkbox,.form-horizontal .radio{min-height:27px}.form-horizontal .form-group{margin-right:-15px;margin-left:-15px}@media (min-width:768px){.form-horizontal .control-label{padding-top:7px;margin-bottom:0;text-align:left}}.form-horizontal .has-feedback .form-control-feedback{left:15px}@media (min-width:768px){.form-horizontal .form-group-lg .control-label{padding-top:11px;font-size:18px}}@media (min-width:768px){.form-horizontal .form-group-sm .control-label{padding-top:6px;font-size:12px}}.btn{display:inline-block;padding:6px 12px;margin-bottom:0;font-size:14px;font-weight:400;line-height:1.42857143;text-align:center;white-space:nowrap;vertical-align:middle;-ms-touch-action:manipulation;touch-action:manipulation;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;background-image:none;border:1px solid transparent;border-radius:4px}.btn.active.focus,.btn.active:focus,.btn.focus,.btn:active.focus,.btn:active:focus,.btn:focus{outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}.btn.focus,.btn:focus,.btn:hover{color:#333;text-decoration:none}.btn.active,.btn:active{background-image:none;outline:0;-webkit-box-shadow:inset 0 3px 5px rgba(0,0,0,.125);box-shadow:inset 0 3px 5px rgba(0,0,0,.125)}.btn.disabled,.btn[disabled],fieldset[disabled] .btn{cursor:not-allowed;filter:alpha(opacity=65);-webkit-box-shadow:none;box-shadow:none;opacity:.65}a.btn.disabled,fieldset[disabled] a.btn{pointer-events:none}.btn-default{color:#333;background-color:#fff;border-color:#ccc}.btn-default.focus,.btn-default:focus{color:#333;background-color:#e6e6e6;border-color:#8c8c8c}.btn-default:hover{color:#333;background-color:#e6e6e6;border-color:#adadad}.btn-default.active,.btn-default:active,.open>.dropdown-toggle.btn-default{color:#333;background-color:#e6e6e6;border-color:#adadad}.btn-default.active.focus,.btn-default.active:focus,.btn-default.active:hover,.btn-default:active.focus,.btn-default:active:focus,.btn-default:active:hover,.open>.dropdown-toggle.btn-default.focus,.open>.dropdown-toggle.btn-default:focus,.open>.dropdown-toggle.btn-default:hover{color:#333;background-color:#d4d4d4;border-color:#8c8c8c}.btn-default.active,.btn-default:active,.open>.dropdown-toggle.btn-default{background-image:none}.btn-default.disabled.focus,.btn-default.disabled:focus,.btn-default.disabled:hover,.btn-default[disabled].focus,.btn-default[disabled]:focus,.btn-default[disabled]:hover,fieldset[disabled] .btn-default.focus,fieldset[disabled] .btn-default:focus,fieldset[disabled] .btn-default:hover{background-color:#fff;border-color:#ccc}.btn-default .badge{color:#fff;background-color:#333}.btn-primary{color:#fff;background-color:#337ab7;border-color:#2e6da4}.btn-primary.focus,.btn-primary:focus{color:#fff;background-color:#286090;border-color:#122b40}.btn-primary:hover{color:#fff;background-color:#286090;border-color:#204d74}.btn-primary.active,.btn-primary:active,.open>.dropdown-toggle.btn-primary{color:#fff;background-color:#286090;border-color:#204d74}.btn-primary.active.focus,.btn-primary.active:focus,.btn-primary.active:hover,.btn-primary:active.focus,.btn-primary:active:focus,.btn-primary:active:hover,.open>.dropdown-toggle.btn-primary.focus,.open>.dropdown-toggle.btn-primary:focus,.open>.dropdown-toggle.btn-primary:hover{color:#fff;background-color:#204d74;border-color:#122b40}.btn-primary.active,.btn-primary:active,.open>.dropdown-toggle.btn-primary{background-image:none}.btn-primary.disabled.focus,.btn-primary.disabled:focus,.btn-primary.disabled:hover,.btn-primary[disabled].focus,.btn-primary[disabled]:focus,.btn-primary[disabled]:hover,fieldset[disabled] .btn-primary.focus,fieldset[disabled] .btn-primary:focus,fieldset[disabled] .btn-primary:hover{background-color:#337ab7;border-color:#2e6da4}.btn-primary .badge{color:#337ab7;background-color:#fff}.btn-success{color:#fff;background-color:#5cb85c;border-color:#4cae4c}.btn-success.focus,.btn-success:focus{color:#fff;background-color:#449d44;border-color:#255625}.btn-success:hover{color:#fff;background-color:#449d44;border-color:#398439}.btn-success.active,.btn-success:active,.open>.dropdown-toggle.btn-success{color:#fff;background-color:#449d44;border-color:#398439}.btn-success.active.focus,.btn-success.active:focus,.btn-success.active:hover,.btn-success:active.focus,.btn-success:active:focus,.btn-success:active:hover,.open>.dropdown-toggle.btn-success.focus,.open>.dropdown-toggle.btn-success:focus,.open>.dropdown-toggle.btn-success:hover{color:#fff;background-color:#398439;border-color:#255625}.btn-success.active,.btn-success:active,.open>.dropdown-toggle.btn-success{background-image:none}.btn-success.disabled.focus,.btn-success.disabled:focus,.btn-success.disabled:hover,.btn-success[disabled].focus,.btn-success[disabled]:focus,.btn-success[disabled]:hover,fieldset[disabled] .btn-success.focus,fieldset[disabled] .btn-success:focus,fieldset[disabled] .btn-success:hover{background-color:#5cb85c;border-color:#4cae4c}.btn-success .badge{color:#5cb85c;background-color:#fff}.btn-info{color:#fff;background-color:#5bc0de;border-color:#46b8da}.btn-info.focus,.btn-info:focus{color:#fff;background-color:#31b0d5;border-color:#1b6d85}.btn-info:hover{color:#fff;background-color:#31b0d5;border-color:#269abc}.btn-info.active,.btn-info:active,.open>.dropdown-toggle.btn-info{color:#fff;background-color:#31b0d5;border-color:#269abc}.btn-info.active.focus,.btn-info.active:focus,.btn-info.active:hover,.btn-info:active.focus,.btn-info:active:focus,.btn-info:active:hover,.open>.dropdown-toggle.btn-info.focus,.open>.dropdown-toggle.btn-info:focus,.open>.dropdown-toggle.btn-info:hover{color:#fff;background-color:#269abc;border-color:#1b6d85}.btn-info.active,.btn-info:active,.open>.dropdown-toggle.btn-info{background-image:none}.btn-info.disabled.focus,.btn-info.disabled:focus,.btn-info.disabled:hover,.btn-info[disabled].focus,.btn-info[disabled]:focus,.btn-info[disabled]:hover,fieldset[disabled] .btn-info.focus,fieldset[disabled] .btn-info:focus,fieldset[disabled] .btn-info:hover{background-color:#5bc0de;border-color:#46b8da}.btn-info .badge{color:#5bc0de;background-color:#fff}.btn-warning{color:#fff;background-color:#f0ad4e;border-color:#eea236}.btn-warning.focus,.btn-warning:focus{color:#fff;background-color:#ec971f;border-color:#985f0d}.btn-warning:hover{color:#fff;background-color:#ec971f;border-color:#d58512}.btn-warning.active,.btn-warning:active,.open>.dropdown-toggle.btn-warning{color:#fff;background-color:#ec971f;border-color:#d58512}.btn-warning.active.focus,.btn-warning.active:focus,.btn-warning.active:hover,.btn-warning:active.focus,.btn-warning:active:focus,.btn-warning:active:hover,.open>.dropdown-toggle.btn-warning.focus,.open>.dropdown-toggle.btn-warning:focus,.open>.dropdown-toggle.btn-warning:hover{color:#fff;background-color:#d58512;border-color:#985f0d}.btn-warning.active,.btn-warning:active,.open>.dropdown-toggle.btn-warning{background-image:none}.btn-warning.disabled.focus,.btn-warning.disabled:focus,.btn-warning.disabled:hover,.btn-warning[disabled].focus,.btn-warning[disabled]:focus,.btn-warning[disabled]:hover,fieldset[disabled] .btn-warning.focus,fieldset[disabled] .btn-warning:focus,fieldset[disabled] .btn-warning:hover{background-color:#f0ad4e;border-color:#eea236}.btn-warning .badge{color:#f0ad4e;background-color:#fff}.btn-danger{color:#fff;background-color:#d9534f;border-color:#d43f3a}.btn-danger.focus,.btn-danger:focus{color:#fff;background-color:#c9302c;border-color:#761c19}.btn-danger:hover{color:#fff;background-color:#c9302c;border-color:#ac2925}.btn-danger.active,.btn-danger:active,.open>.dropdown-toggle.btn-danger{color:#fff;background-color:#c9302c;border-color:#ac2925}.btn-danger.active.focus,.btn-danger.active:focus,.btn-danger.active:hover,.btn-danger:active.focus,.btn-danger:active:focus,.btn-danger:active:hover,.open>.dropdown-toggle.btn-danger.focus,.open>.dropdown-toggle.btn-danger:focus,.open>.dropdown-toggle.btn-danger:hover{color:#fff;background-color:#ac2925;border-color:#761c19}.btn-danger.active,.btn-danger:active,.open>.dropdown-toggle.btn-danger{background-image:none}.btn-danger.disabled.focus,.btn-danger.disabled:focus,.btn-danger.disabled:hover,.btn-danger[disabled].focus,.btn-danger[disabled]:focus,.btn-danger[disabled]:hover,fieldset[disabled] .btn-danger.focus,fieldset[disabled] .btn-danger:focus,fieldset[disabled] .btn-danger:hover{background-color:#d9534f;border-color:#d43f3a}.btn-danger .badge{color:#d9534f;background-color:#fff}.btn-link{font-weight:400;color:#337ab7;border-radius:0}.btn-link,.btn-link.active,.btn-link:active,.btn-link[disabled],fieldset[disabled] .btn-link{background-color:transparent;-webkit-box-shadow:none;box-shadow:none}.btn-link,.btn-link:active,.btn-link:focus,.btn-link:hover{border-color:transparent}.btn-link:focus,.btn-link:hover{color:#23527c;text-decoration:underline;background-color:transparent}.btn-link[disabled]:focus,.btn-link[disabled]:hover,fieldset[disabled] .btn-link:focus,fieldset[disabled] .btn-link:hover{color:#777;text-decoration:none}.btn-group-lg>.btn,.btn-lg{padding:10px 16px;font-size:18px;line-height:1.3333333;border-radius:6px}.btn-group-sm>.btn,.btn-sm{padding:5px 10px;font-size:12px;line-height:1.5;border-radius:3px}.btn-group-xs>.btn,.btn-xs{padding:1px 5px;font-size:12px;line-height:1.5;border-radius:3px}.btn-block{display:block;width:100%}.btn-block+.btn-block{margin-top:5px}input[type=button].btn-block,input[type=reset].btn-block,input[type=submit].btn-block{width:100%}.fade{opacity:0;-webkit-transition:opacity .15s linear;-o-transition:opacity .15s linear;transition:opacity .15s linear}.fade.in{opacity:1}.collapse{display:none}.collapse.in{display:block}tr.collapse.in{display:table-row}tbody.collapse.in{display:table-row-group}.collapsing{position:relative;height:0;overflow:hidden;-webkit-transition-timing-function:ease;-o-transition-timing-function:ease;transition-timing-function:ease;-webkit-transition-duration:.35s;-o-transition-duration:.35s;transition-duration:.35s;-webkit-transition-property:height,visibility;-o-transition-property:height,visibility;transition-property:height,visibility}.caret{display:inline-block;width:0;height:0;margin-right:2px;vertical-align:middle;border-top:4px dashed;border-top:4px solid\9;border-right:4px solid transparent;border-left:4px solid transparent}.dropdown,.dropup{position:relative}.dropdown-toggle:focus{outline:0}.dropdown-menu{position:absolute;top:100%;right:0;z-index:1000;display:none;float:right;min-width:160px;padding:5px 0;margin:2px 0 0;font-size:14px;text-align:right;list-style:none;background-color:#fff;-webkit-background-clip:padding-box;background-clip:padding-box;border:1px solid #ccc;border:1px solid rgba(0,0,0,.15);border-radius:4px;-webkit-box-shadow:0 6px 12px rgba(0,0,0,.175);box-shadow:0 6px 12px rgba(0,0,0,.175)}.dropdown-menu.pull-right{right:auto;left:0}.dropdown-menu .divider{height:1px;margin:9px 0;overflow:hidden;background-color:#e5e5e5}.dropdown-menu>li>a{display:block;padding:3px 20px;clear:both;font-weight:400;line-height:1.42857143;color:#333;white-space:nowrap}.dropdown-menu>li>a:focus,.dropdown-menu>li>a:hover{color:#262626;text-decoration:none;background-color:#f5f5f5}.dropdown-menu>.active>a,.dropdown-menu>.active>a:focus,.dropdown-menu>.active>a:hover{color:#fff;text-decoration:none;background-color:#337ab7;outline:0}.dropdown-menu>.disabled>a,.dropdown-menu>.disabled>a:focus,.dropdown-menu>.disabled>a:hover{color:#777}.dropdown-menu>.disabled>a:focus,.dropdown-menu>.disabled>a:hover{text-decoration:none;cursor:not-allowed;background-color:transparent;background-image:none;filter:progid:DXImageTransform.Microsoft.gradient(enabled=false)}.open>.dropdown-menu{display:block}.open>a{outline:0}.dropdown-menu-right{right:auto;left:0}.dropdown-menu-left{right:0;left:auto}.dropdown-header{display:block;padding:3px 20px;font-size:12px;line-height:1.42857143;color:#777;white-space:nowrap}.dropdown-backdrop{position:fixed;top:0;right:0;bottom:0;left:0;z-index:990}.pull-right>.dropdown-menu{right:auto;left:0}.dropup .caret,.navbar-fixed-bottom .dropdown .caret{content:"";border-top:0;border-bottom:4px dashed;border-bottom:4px solid\9}.dropup .dropdown-menu,.navbar-fixed-bottom .dropdown .dropdown-menu{top:auto;bottom:100%;margin-bottom:2px}@media (min-width:768px){.navbar-right .dropdown-menu{right:auto;left:0}.navbar-right .dropdown-menu-left{right:0;left:auto}}.btn-group,.btn-group-vertical{position:relative;display:inline-block;vertical-align:middle}.btn-group-vertical>.btn,.btn-group>.btn{position:relative;float:right}.btn-group-vertical>.btn.active,.btn-group-vertical>.btn:active,.btn-group-vertical>.btn:focus,.btn-group-vertical>.btn:hover,.btn-group>.btn.active,.btn-group>.btn:active,.btn-group>.btn:focus,.btn-group>.btn:hover{z-index:2}.btn-group .btn+.btn,.btn-group .btn+.btn-group,.btn-group .btn-group+.btn,.btn-group .btn-group+.btn-group{margin-right:-1px}.btn-toolbar{margin-right:-5px}.btn-toolbar .btn,.btn-toolbar .btn-group,.btn-toolbar .input-group{float:right}.btn-toolbar>.btn,.btn-toolbar>.btn-group,.btn-toolbar>.input-group{margin-right:5px}.btn-group>.btn:not(:first-child):not(:last-child):not(.dropdown-toggle){border-radius:0}.btn-group>.btn:first-child{margin-right:0}.btn-group>.btn:first-child:not(:last-child):not(.dropdown-toggle){border-top-left-radius:0;border-bottom-left-radius:0}.btn-group>.btn:last-child:not(:first-child),.btn-group>.dropdown-toggle:not(:first-child){border-top-right-radius:0;border-bottom-right-radius:0}.btn-group>.btn-group{float:right}.btn-group>.btn-group:not(:first-child):not(:last-child)>.btn{border-radius:0}.btn-group>.btn-group:first-child:not(:last-child)>.btn:last-child,.btn-group>.btn-group:first-child:not(:last-child)>.dropdown-toggle{border-top-left-radius:0;border-bottom-left-radius:0}.btn-group>.btn-group:last-child:not(:first-child)>.btn:first-child{border-top-right-radius:0;border-bottom-right-radius:0}.btn-group .dropdown-toggle:active,.btn-group.open .dropdown-toggle{outline:0}.btn-group>.btn+.dropdown-toggle{padding-right:8px;padding-left:8px}.btn-group>.btn-lg+.dropdown-toggle{padding-right:12px;padding-left:12px}.btn-group.open .dropdown-toggle{-webkit-box-shadow:inset 0 3px 5px rgba(0,0,0,.125);box-shadow:inset 0 3px 5px rgba(0,0,0,.125)}.btn-group.open .dropdown-toggle.btn-link{-webkit-box-shadow:none;box-shadow:none}.btn .caret{margin-right:0}.btn-lg .caret{border-width:5px 5px 0;border-bottom-width:0}.dropup .btn-lg .caret{border-width:0 5px 5px}.btn-group-vertical>.btn,.btn-group-vertical>.btn-group,.btn-group-vertical>.btn-group>.btn{display:block;float:none;width:100%;max-width:100%}.btn-group-vertical>.btn-group>.btn{float:none}.btn-group-vertical>.btn+.btn,.btn-group-vertical>.btn+.btn-group,.btn-group-vertical>.btn-group+.btn,.btn-group-vertical>.btn-group+.btn-group{margin-top:-1px;margin-right:0}.btn-group-vertical>.btn:not(:first-child):not(:last-child){border-radius:0}.btn-group-vertical>.btn:first-child:not(:last-child){border-top-left-radius:4px;border-top-right-radius:4px;border-bottom-right-radius:0;border-bottom-left-radius:0}.btn-group-vertical>.btn:last-child:not(:first-child){border-top-left-radius:0;border-top-right-radius:0;border-bottom-right-radius:4px;border-bottom-left-radius:4px}.btn-group-vertical>.btn-group:not(:first-child):not(:last-child)>.btn{border-radius:0}.btn-group-vertical>.btn-group:first-child:not(:last-child)>.btn:last-child,.btn-group-vertical>.btn-group:first-child:not(:last-child)>.dropdown-toggle{border-bottom-right-radius:0;border-bottom-left-radius:0}.btn-group-vertical>.btn-group:last-child:not(:first-child)>.btn:first-child{border-top-left-radius:0;border-top-right-radius:0}.btn-group-justified{display:table;width:100%;table-layout:fixed;border-collapse:separate}.btn-group-justified>.btn,.btn-group-justified>.btn-group{display:table-cell;float:none;width:1%}.btn-group-justified>.btn-group .btn{width:100%}.btn-group-justified>.btn-group .dropdown-menu{right:auto}[data-toggle=buttons]>.btn input[type=checkbox],[data-toggle=buttons]>.btn input[type=radio],[data-toggle=buttons]>.btn-group>.btn input[type=checkbox],[data-toggle=buttons]>.btn-group>.btn input[type=radio]{position:absolute;clip:rect(0,0,0,0);pointer-events:none}.input-group{position:relative;display:table;border-collapse:separate}.input-group[class*=col-]{float:none;padding-right:0;padding-left:0}.input-group .form-control{position:relative;z-index:2;float:right;width:100%;margin-bottom:0}.input-group .form-control:focus{z-index:3}.input-group-lg>.form-control,.input-group-lg>.input-group-addon,.input-group-lg>.input-group-btn>.btn{height:46px;padding:10px 16px;font-size:18px;line-height:1.3333333;border-radius:6px}select.input-group-lg>.form-control,select.input-group-lg>.input-group-addon,select.input-group-lg>.input-group-btn>.btn{height:46px;line-height:46px}select[multiple].input-group-lg>.form-control,select[multiple].input-group-lg>.input-group-addon,select[multiple].input-group-lg>.input-group-btn>.btn,textarea.input-group-lg>.form-control,textarea.input-group-lg>.input-group-addon,textarea.input-group-lg>.input-group-btn>.btn{height:auto}.input-group-sm>.form-control,.input-group-sm>.input-group-addon,.input-group-sm>.input-group-btn>.btn{height:30px;padding:5px 10px;font-size:12px;line-height:1.5;border-radius:3px}select.input-group-sm>.form-control,select.input-group-sm>.input-group-addon,select.input-group-sm>.input-group-btn>.btn{height:30px;line-height:30px}select[multiple].input-group-sm>.form-control,select[multiple].input-group-sm>.input-group-addon,select[multiple].input-group-sm>.input-group-btn>.btn,textarea.input-group-sm>.form-control,textarea.input-group-sm>.input-group-addon,textarea.input-group-sm>.input-group-btn>.btn{height:auto}.input-group .form-control,.input-group-addon,.input-group-btn{display:table-cell}.input-group .form-control:not(:first-child):not(:last-child),.input-group-addon:not(:first-child):not(:last-child),.input-group-btn:not(:first-child):not(:last-child){border-radius:0}.input-group-addon,.input-group-btn{width:1%;white-space:nowrap;vertical-align:middle}.input-group-addon{padding:6px 12px;font-size:14px;font-weight:400;line-height:1;color:#555;text-align:center;background-color:#eee;border:1px solid #ccc;border-radius:4px}.input-group-addon.input-sm{padding:5px 10px;font-size:12px;border-radius:3px}.input-group-addon.input-lg{padding:10px 16px;font-size:18px;border-radius:6px}.input-group-addon input[type=checkbox],.input-group-addon input[type=radio]{margin-top:0}.input-group .form-control:first-child,.input-group-addon:first-child,.input-group-btn:first-child>.btn,.input-group-btn:first-child>.btn-group>.btn,.input-group-btn:first-child>.dropdown-toggle,.input-group-btn:last-child>.btn-group:not(:last-child)>.btn,.input-group-btn:last-child>.btn:not(:last-child):not(.dropdown-toggle){border-top-left-radius:0;border-bottom-left-radius:0}.input-group-addon:first-child{border-left:0}.input-group .form-control:last-child,.input-group-addon:last-child,.input-group-btn:first-child>.btn-group:not(:first-child)>.btn,.input-group-btn:first-child>.btn:not(:first-child),.input-group-btn:last-child>.btn,.input-group-btn:last-child>.btn-group>.btn,.input-group-btn:last-child>.dropdown-toggle{border-top-right-radius:0;border-bottom-right-radius:0}.input-group-addon:last-child{border-right:0}.input-group-btn{position:relative;font-size:0;white-space:nowrap}.input-group-btn>.btn{position:relative}.input-group-btn>.btn+.btn{margin-right:-1px}.input-group-btn>.btn:active,.input-group-btn>.btn:focus,.input-group-btn>.btn:hover{z-index:2}.input-group-btn:first-child>.btn,.input-group-btn:first-child>.btn-group{margin-left:-1px}.input-group-btn:last-child>.btn,.input-group-btn:last-child>.btn-group{z-index:2;margin-right:-1px}.nav{padding-right:0;margin-bottom:0;list-style:none}.nav>li{position:relative;display:block}.nav>li>a{position:relative;display:block;padding:10px 15px}.nav>li>a:focus,.nav>li>a:hover{text-decoration:none;background-color:#eee}.nav>li.disabled>a{color:#777}.nav>li.disabled>a:focus,.nav>li.disabled>a:hover{color:#777;text-decoration:none;cursor:not-allowed;background-color:transparent}.nav .open>a,.nav .open>a:focus,.nav .open>a:hover{background-color:#eee;border-color:#337ab7}.nav .nav-divider{height:1px;margin:9px 0;overflow:hidden;background-color:#e5e5e5}.nav>li>a>img{max-width:none}.nav-tabs{border-bottom:1px solid #ddd}.nav-tabs>li{float:right;margin-bottom:-1px}.nav-tabs>li>a{margin-left:2px;line-height:1.42857143;border:1px solid transparent;border-radius:4px 4px 0 0}.nav-tabs>li>a:hover{border-color:#eee #eee #ddd}.nav-tabs>li.active>a,.nav-tabs>li.active>a:focus,.nav-tabs>li.active>a:hover{color:#555;cursor:default;background-color:#fff;border:1px solid #ddd;border-bottom-color:transparent}.nav-tabs.nav-justified{width:100%;border-bottom:0}.nav-tabs.nav-justified>li{float:none}.nav-tabs.nav-justified>li>a{margin-bottom:5px;text-align:center}.nav-tabs.nav-justified>.dropdown .dropdown-menu{top:auto;right:auto}@media (min-width:768px){.nav-tabs.nav-justified>li{display:table-cell;width:1%}.nav-tabs.nav-justified>li>a{margin-bottom:0}}.nav-tabs.nav-justified>li>a{margin-left:0;border-radius:4px}.nav-tabs.nav-justified>.active>a,.nav-tabs.nav-justified>.active>a:focus,.nav-tabs.nav-justified>.active>a:hover{border:1px solid #ddd}@media (min-width:768px){.nav-tabs.nav-justified>li>a{border-bottom:1px solid #ddd;border-radius:4px 4px 0 0}.nav-tabs.nav-justified>.active>a,.nav-tabs.nav-justified>.active>a:focus,.nav-tabs.nav-justified>.active>a:hover{border-bottom-color:#fff}}.nav-pills>li{float:right}.nav-pills>li>a{border-radius:4px}.nav-pills>li+li{margin-right:2px}.nav-pills>li.active>a,.nav-pills>li.active>a:focus,.nav-pills>li.active>a:hover{color:#fff;background-color:#337ab7}.nav-stacked>li{float:none}.nav-stacked>li+li{margin-top:2px;margin-right:0}.nav-justified{width:100%}.nav-justified>li{float:none}.nav-justified>li>a{margin-bottom:5px;text-align:center}.nav-justified>.dropdown .dropdown-menu{top:auto;right:auto}@media (min-width:768px){.nav-justified>li{display:table-cell;width:1%}.nav-justified>li>a{margin-bottom:0}}.nav-tabs-justified{border-bottom:0}.nav-tabs-justified>li>a{margin-left:0;border-radius:4px}.nav-tabs-justified>.active>a,.nav-tabs-justified>.active>a:focus,.nav-tabs-justified>.active>a:hover{border:1px solid #ddd}@media (min-width:768px){.nav-tabs-justified>li>a{border-bottom:1px solid #ddd;border-radius:4px 4px 0 0}.nav-tabs-justified>.active>a,.nav-tabs-justified>.active>a:focus,.nav-tabs-justified>.active>a:hover{border-bottom-color:#fff}}.tab-content>.tab-pane{display:none}.tab-content>.active{display:block}.nav-tabs .dropdown-menu{margin-top:-1px;border-top-left-radius:0;border-top-right-radius:0}.navbar{position:relative;min-height:50px;margin-bottom:20px;border:1px solid transparent}@media (min-width:768px){.navbar{border-radius:4px}}@media (min-width:768px){.navbar-header{float:right}}.navbar-collapse{padding-right:15px;padding-left:15px;overflow-x:visible;-webkit-overflow-scrolling:touch;border-top:1px solid transparent;-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,.1);box-shadow:inset 0 1px 0 rgba(255,255,255,.1)}.navbar-collapse.in{overflow-y:auto}@media (min-width:768px){.navbar-collapse{width:auto;border-top:0;-webkit-box-shadow:none;box-shadow:none}.navbar-collapse.collapse{display:block!important;height:auto!important;padding-bottom:0;overflow:visible!important}.navbar-collapse.in{overflow-y:visible}.navbar-fixed-bottom .navbar-collapse,.navbar-fixed-top .navbar-collapse,.navbar-static-top .navbar-collapse{padding-right:0;padding-left:0}}.navbar-fixed-bottom .navbar-collapse,.navbar-fixed-top .navbar-collapse{max-height:340px}@media (max-device-width:480px) and (orientation:landscape){.navbar-fixed-bottom .navbar-collapse,.navbar-fixed-top .navbar-collapse{max-height:200px}}.container-fluid>.navbar-collapse,.container-fluid>.navbar-header,.container>.navbar-collapse,.container>.navbar-header{margin-right:-15px;margin-left:-15px}@media (min-width:768px){.container-fluid>.navbar-collapse,.container-fluid>.navbar-header,.container>.navbar-collapse,.container>.navbar-header{margin-right:0;margin-left:0}}.navbar-static-top{z-index:1000;border-width:0 0 1px}@media (min-width:768px){.navbar-static-top{border-radius:0}}.navbar-fixed-bottom,.navbar-fixed-top{position:fixed;right:0;left:0;z-index:1030}@media (min-width:768px){.navbar-fixed-bottom,.navbar-fixed-top{border-radius:0}}.navbar-fixed-top{top:0;border-width:0 0 1px}.navbar-fixed-bottom{bottom:0;margin-bottom:0;border-width:1px 0 0}.navbar-brand{float:right;height:50px;padding:15px 15px;font-size:18px;line-height:20px}.navbar-brand:focus,.navbar-brand:hover{text-decoration:none}.navbar-brand>img{display:block}@media (min-width:768px){.navbar>.container .navbar-brand,.navbar>.container-fluid .navbar-brand{margin-right:-15px}}.navbar-toggle{position:relative;float:left;padding:9px 10px;margin-top:8px;margin-bottom:8px;margin-left:15px;background-color:transparent;background-image:none;border:1px solid transparent;border-radius:4px}.navbar-toggle:focus{outline:0}.navbar-toggle .icon-bar{display:block;width:22px;height:2px;border-radius:1px}.navbar-toggle .icon-bar+.icon-bar{margin-top:4px}@media (min-width:768px){.navbar-toggle{display:none}}.navbar-nav{margin:7.5px -15px}.navbar-nav>li>a{padding-top:10px;padding-bottom:10px;line-height:20px}@media (max-width:767px){.navbar-nav .open .dropdown-menu{position:static;float:none;width:auto;margin-top:0;background-color:transparent;border:0;-webkit-box-shadow:none;box-shadow:none}.navbar-nav .open .dropdown-menu .dropdown-header,.navbar-nav .open .dropdown-menu>li>a{padding:5px 25px 5px 15px}.navbar-nav .open .dropdown-menu>li>a{line-height:20px}.navbar-nav .open .dropdown-menu>li>a:focus,.navbar-nav .open .dropdown-menu>li>a:hover{background-image:none}}@media (min-width:768px){.navbar-nav{float:right;margin:0}.navbar-nav>li{float:right}.navbar-nav>li>a{padding-top:15px;padding-bottom:15px}}.navbar-form{padding:10px 15px;margin-top:8px;margin-right:-15px;margin-bottom:8px;margin-left:-15px;border-top:1px solid transparent;border-bottom:1px solid transparent;-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,.1),0 1px 0 rgba(255,255,255,.1);box-shadow:inset 0 1px 0 rgba(255,255,255,.1),0 1px 0 rgba(255,255,255,.1)}@media (min-width:768px){.navbar-form .form-group{display:inline-block;margin-bottom:0;vertical-align:middle}.navbar-form .form-control{display:inline-block;width:auto;vertical-align:middle}.navbar-form .form-control-static{display:inline-block}.navbar-form .input-group{display:inline-table;vertical-align:middle}.navbar-form .input-group .form-control,.navbar-form .input-group .input-group-addon,.navbar-form .input-group .input-group-btn{width:auto}.navbar-form .input-group>.form-control{width:100%}.navbar-form .control-label{margin-bottom:0;vertical-align:middle}.navbar-form .checkbox,.navbar-form .radio{display:inline-block;margin-top:0;margin-bottom:0;vertical-align:middle}.navbar-form .checkbox label,.navbar-form .radio label{padding-right:0}.navbar-form .checkbox input[type=checkbox],.navbar-form .radio input[type=radio]{position:relative;margin-right:0}.navbar-form .has-feedback .form-control-feedback{top:0}}@media (max-width:767px){.navbar-form .form-group{margin-bottom:5px}.navbar-form .form-group:last-child{margin-bottom:0}}@media (min-width:768px){.navbar-form{width:auto;padding-top:0;padding-bottom:0;margin-right:0;margin-left:0;border:0;-webkit-box-shadow:none;box-shadow:none}}.navbar-nav>li>.dropdown-menu{margin-top:0;border-top-left-radius:0;border-top-right-radius:0}.navbar-fixed-bottom .navbar-nav>li>.dropdown-menu{margin-bottom:0;border-top-left-radius:4px;border-top-right-radius:4px;border-bottom-right-radius:0;border-bottom-left-radius:0}.navbar-btn{margin-top:8px;margin-bottom:8px}.navbar-btn.btn-sm{margin-top:10px;margin-bottom:10px}.navbar-btn.btn-xs{margin-top:14px;margin-bottom:14px}.navbar-text{margin-top:15px;margin-bottom:15px}@media (min-width:768px){.navbar-text{float:right;margin-right:15px;margin-left:15px}}@media (min-width:768px){.navbar-left{float:right!important}.navbar-right{float:left!important;margin-left:-15px}.navbar-right~.navbar-right{margin-left:0}}.navbar-default{background-color:#f8f8f8;border-color:#e7e7e7}.navbar-default .navbar-brand{color:#777}.navbar-default .navbar-brand:focus,.navbar-default .navbar-brand:hover{color:#5e5e5e;background-color:transparent}.navbar-default .navbar-text{color:#777}.navbar-default .navbar-nav>li>a{color:#777}.navbar-default .navbar-nav>li>a:focus,.navbar-default .navbar-nav>li>a:hover{color:#333;background-color:transparent}.navbar-default .navbar-nav>.active>a,.navbar-default .navbar-nav>.active>a:focus,.navbar-default .navbar-nav>.active>a:hover{color:#555;background-color:#e7e7e7}.navbar-default .navbar-nav>.disabled>a,.navbar-default .navbar-nav>.disabled>a:focus,.navbar-default .navbar-nav>.disabled>a:hover{color:#ccc;background-color:transparent}.navbar-default .navbar-toggle{border-color:#ddd}.navbar-default .navbar-toggle:focus,.navbar-default .navbar-toggle:hover{background-color:#ddd}.navbar-default .navbar-toggle .icon-bar{background-color:#888}.navbar-default .navbar-collapse,.navbar-default .navbar-form{border-color:#e7e7e7}.navbar-default .navbar-nav>.open>a,.navbar-default .navbar-nav>.open>a:focus,.navbar-default .navbar-nav>.open>a:hover{color:#555;background-color:#e7e7e7}@media (max-width:767px){.navbar-default .navbar-nav .open .dropdown-menu>li>a{color:#777}.navbar-default .navbar-nav .open .dropdown-menu>li>a:focus,.navbar-default .navbar-nav .open .dropdown-menu>li>a:hover{color:#333;background-color:transparent}.navbar-default .navbar-nav .open .dropdown-menu>.active>a,.navbar-default .navbar-nav .open .dropdown-menu>.active>a:focus,.navbar-default .navbar-nav .open .dropdown-menu>.active>a:hover{color:#555;background-color:#e7e7e7}.navbar-default .navbar-nav .open .dropdown-menu>.disabled>a,.navbar-default .navbar-nav .open .dropdown-menu>.disabled>a:focus,.navbar-default .navbar-nav .open .dropdown-menu>.disabled>a:hover{color:#ccc;background-color:transparent}}.navbar-default .navbar-link{color:#777}.navbar-default .navbar-link:hover{color:#333}.navbar-default .btn-link{color:#777}.navbar-default .btn-link:focus,.navbar-default .btn-link:hover{color:#333}.navbar-default .btn-link[disabled]:focus,.navbar-default .btn-link[disabled]:hover,fieldset[disabled] .navbar-default .btn-link:focus,fieldset[disabled] .navbar-default .btn-link:hover{color:#ccc}.navbar-inverse{background-color:#222;border-color:#080808}.navbar-inverse .navbar-brand{color:#9d9d9d}.navbar-inverse .navbar-brand:focus,.navbar-inverse .navbar-brand:hover{color:#fff;background-color:transparent}.navbar-inverse .navbar-text{color:#9d9d9d}.navbar-inverse .navbar-nav>li>a{color:#9d9d9d}.navbar-inverse .navbar-nav>li>a:focus,.navbar-inverse .navbar-nav>li>a:hover{color:#fff;background-color:transparent}.navbar-inverse .navbar-nav>.active>a,.navbar-inverse .navbar-nav>.active>a:focus,.navbar-inverse .navbar-nav>.active>a:hover{color:#fff;background-color:#080808}.navbar-inverse .navbar-nav>.disabled>a,.navbar-inverse .navbar-nav>.disabled>a:focus,.navbar-inverse .navbar-nav>.disabled>a:hover{color:#444;background-color:transparent}.navbar-inverse .navbar-toggle{border-color:#333}.navbar-inverse .navbar-toggle:focus,.navbar-inverse .navbar-toggle:hover{background-color:#333}.navbar-inverse .navbar-toggle .icon-bar{background-color:#fff}.navbar-inverse .navbar-collapse,.navbar-inverse .navbar-form{border-color:#101010}.navbar-inverse .navbar-nav>.open>a,.navbar-inverse .navbar-nav>.open>a:focus,.navbar-inverse .navbar-nav>.open>a:hover{color:#fff;background-color:#080808}@media (max-width:767px){.navbar-inverse .navbar-nav .open .dropdown-menu>.dropdown-header{border-color:#080808}.navbar-inverse .navbar-nav .open .dropdown-menu .divider{background-color:#080808}.navbar-inverse .navbar-nav .open .dropdown-menu>li>a{color:#9d9d9d}.navbar-inverse .navbar-nav .open .dropdown-menu>li>a:focus,.navbar-inverse .navbar-nav .open .dropdown-menu>li>a:hover{color:#fff;background-color:transparent}.navbar-inverse .navbar-nav .open .dropdown-menu>.active>a,.navbar-inverse .navbar-nav .open .dropdown-menu>.active>a:focus,.navbar-inverse .navbar-nav .open .dropdown-menu>.active>a:hover{color:#fff;background-color:#080808}.navbar-inverse .navbar-nav .open .dropdown-menu>.disabled>a,.navbar-inverse .navbar-nav .open .dropdown-menu>.disabled>a:focus,.navbar-inverse .navbar-nav .open .dropdown-menu>.disabled>a:hover{color:#444;background-color:transparent}}.navbar-inverse .navbar-link{color:#9d9d9d}.navbar-inverse .navbar-link:hover{color:#fff}.navbar-inverse .btn-link{color:#9d9d9d}.navbar-inverse .btn-link:focus,.navbar-inverse .btn-link:hover{color:#fff}.navbar-inverse .btn-link[disabled]:focus,.navbar-inverse .btn-link[disabled]:hover,fieldset[disabled] .navbar-inverse .btn-link:focus,fieldset[disabled] .navbar-inverse .btn-link:hover{color:#444}.breadcrumb{padding:8px 15px;margin-bottom:20px;list-style:none;background-color:#f5f5f5;border-radius:4px}.breadcrumb>li{display:inline-block}.breadcrumb>li+li:before{padding:0 5px;color:#ccc;content:"/\00a0"}.breadcrumb>.active{color:#777}.pagination{display:inline-block;padding-right:0;margin:20px 0;border-radius:4px}.pagination>li{display:inline}.pagination>li>a,.pagination>li>span{position:relative;float:right;padding:6px 12px;margin-right:-1px;line-height:1.42857143;color:#337ab7;text-decoration:none;background-color:#fff;border:1px solid #ddd}.pagination>li:first-child>a,.pagination>li:first-child>span{margin-right:0;border-top-right-radius:4px;border-bottom-right-radius:4px}.pagination>li:last-child>a,.pagination>li:last-child>span{border-top-left-radius:4px;border-bottom-left-radius:4px}.pagination>li>a:focus,.pagination>li>a:hover,.pagination>li>span:focus,.pagination>li>span:hover{z-index:2;color:#23527c;background-color:#eee;border-color:#ddd}.pagination>.active>a,.pagination>.active>a:focus,.pagination>.active>a:hover,.pagination>.active>span,.pagination>.active>span:focus,.pagination>.active>span:hover{z-index:3;color:#fff;cursor:default;background-color:#337ab7;border-color:#337ab7}.pagination>.disabled>a,.pagination>.disabled>a:focus,.pagination>.disabled>a:hover,.pagination>.disabled>span,.pagination>.disabled>span:focus,.pagination>.disabled>span:hover{color:#777;cursor:not-allowed;background-color:#fff;border-color:#ddd}.pagination-lg>li>a,.pagination-lg>li>span{padding:10px 16px;font-size:18px;line-height:1.3333333}.pagination-lg>li:first-child>a,.pagination-lg>li:first-child>span{border-top-right-radius:6px;border-bottom-right-radius:6px}.pagination-lg>li:last-child>a,.pagination-lg>li:last-child>span{border-top-left-radius:6px;border-bottom-left-radius:6px}.pagination-sm>li>a,.pagination-sm>li>span{padding:5px 10px;font-size:12px;line-height:1.5}.pagination-sm>li:first-child>a,.pagination-sm>li:first-child>span{border-top-right-radius:3px;border-bottom-right-radius:3px}.pagination-sm>li:last-child>a,.pagination-sm>li:last-child>span{border-top-left-radius:3px;border-bottom-left-radius:3px}.pager{padding-right:0;margin:20px 0;text-align:center;list-style:none}.pager li{display:inline}.pager li>a,.pager li>span{display:inline-block;padding:5px 14px;background-color:#fff;border:1px solid #ddd;border-radius:15px}.pager li>a:focus,.pager li>a:hover{text-decoration:none;background-color:#eee}.pager .next>a,.pager .next>span{float:left}.pager .previous>a,.pager .previous>span{float:right}.pager .disabled>a,.pager .disabled>a:focus,.pager .disabled>a:hover,.pager .disabled>span{color:#777;cursor:not-allowed;background-color:#fff}.label{display:inline;padding:.2em .6em .3em;font-size:75%;font-weight:700;line-height:1;color:#fff;text-align:center;white-space:nowrap;vertical-align:baseline;border-radius:.25em}a.label:focus,a.label:hover{color:#fff;text-decoration:none;cursor:pointer}.label:empty{display:none}.btn .label{position:relative;top:-1px}.label-default{background-color:#777}.label-default[href]:focus,.label-default[href]:hover{background-color:#5e5e5e}.label-primary{background-color:#337ab7}.label-primary[href]:focus,.label-primary[href]:hover{background-color:#286090}.label-success{background-color:#5cb85c}.label-success[href]:focus,.label-success[href]:hover{background-color:#449d44}.label-info{background-color:#5bc0de}.label-info[href]:focus,.label-info[href]:hover{background-color:#31b0d5}.label-warning{background-color:#f0ad4e}.label-warning[href]:focus,.label-warning[href]:hover{background-color:#ec971f}.label-danger{background-color:#d9534f}.label-danger[href]:focus,.label-danger[href]:hover{background-color:#c9302c}.badge{display:inline-block;min-width:10px;padding:3px 7px;font-size:12px;font-weight:700;line-height:1;color:#fff;text-align:center;white-space:nowrap;vertical-align:middle;background-color:#777;border-radius:10px}.badge:empty{display:none}.btn .badge{position:relative;top:-1px}.btn-group-xs>.btn .badge,.btn-xs .badge{top:0;padding:1px 5px}a.badge:focus,a.badge:hover{color:#fff;text-decoration:none;cursor:pointer}.list-group-item.active>.badge,.nav-pills>.active>a>.badge{color:#337ab7;background-color:#fff}.list-group-item>.badge{float:left}.list-group-item>.badge+.badge{margin-left:5px}.nav-pills>li>a>.badge{margin-right:3px}.jumbotron{padding-top:30px;padding-bottom:30px;margin-bottom:30px;color:inherit;background-color:#eee}.jumbotron .h1,.jumbotron h1{color:inherit}.jumbotron p{margin-bottom:15px;font-size:21px;font-weight:200}.jumbotron>hr{border-top-color:#d5d5d5}.container .jumbotron,.container-fluid .jumbotron{padding-right:15px;padding-left:15px;border-radius:6px}.jumbotron .container{max-width:100%}@media screen and (min-width:768px){.jumbotron{padding-top:48px;padding-bottom:48px}.container .jumbotron,.container-fluid .jumbotron{padding-right:60px;padding-left:60px}.jumbotron .h1,.jumbotron h1{font-size:63px}}.thumbnail{display:block;padding:4px;margin-bottom:20px;line-height:1.42857143;background-color:#fff;border:1px solid #ddd;border-radius:4px;-webkit-transition:border .2s ease-in-out;-o-transition:border .2s ease-in-out;transition:border .2s ease-in-out}.thumbnail a>img,.thumbnail>img{margin-right:auto;margin-left:auto}a.thumbnail.active,a.thumbnail:focus,a.thumbnail:hover{border-color:#337ab7}.thumbnail .caption{padding:9px;color:#333}.alert{padding:15px;margin-bottom:20px;border:1px solid transparent;border-radius:4px}.alert h4{margin-top:0;color:inherit}.alert .alert-link{font-weight:700}.alert>p,.alert>ul{margin-bottom:0}.alert>p+p{margin-top:5px}.alert-dismissable,.alert-dismissible{padding-left:35px}.alert-dismissable .close,.alert-dismissible .close{position:relative;top:-2px;left:-21px;color:inherit}.alert-success{color:#3c763d;background-color:#dff0d8;border-color:#d6e9c6}.alert-success hr{border-top-color:#c9e2b3}.alert-success .alert-link{color:#2b542c}.alert-info{color:#31708f;background-color:#d9edf7;border-color:#bce8f1}.alert-info hr{border-top-color:#a6e1ec}.alert-info .alert-link{color:#245269}.alert-warning{color:#8a6d3b;background-color:#fcf8e3;border-color:#faebcc}.alert-warning hr{border-top-color:#f7e1b5}.alert-warning .alert-link{color:#66512c}.alert-danger{color:#a94442;background-color:#f2dede;border-color:#ebccd1}.alert-danger hr{border-top-color:#e4b9c0}.alert-danger .alert-link{color:#843534}@-webkit-keyframes progress-bar-stripes{from{background-position:40px 0}to{background-position:100% 0}}@-o-keyframes progress-bar-stripes{from{background-position:40px 0}to{background-position:100% 0}}@keyframes progress-bar-stripes{from{background-position:40px 0}to{background-position:100% 0}}.progress{height:20px;margin-bottom:20px;overflow:hidden;background-color:#f5f5f5;border-radius:4px;-webkit-box-shadow:inset 0 1px 2px rgba(0,0,0,.1);box-shadow:inset 0 1px 2px rgba(0,0,0,.1)}.progress-bar{float:right;width:0;height:100%;font-size:12px;line-height:20px;color:#fff;text-align:center;background-color:#337ab7;-webkit-box-shadow:inset 0 -1px 0 rgba(0,0,0,.15);box-shadow:inset 0 -1px 0 rgba(0,0,0,.15);-webkit-transition:width .6s ease;-o-transition:width .6s ease;transition:width .6s ease}.progress-bar-striped,.progress-striped .progress-bar{background-image:-webkit-linear-gradient(-45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:-o-linear-gradient(-45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:-webkit-linear-gradient(135deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:-o-linear-gradient(135deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:linear-gradient(-45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);-webkit-background-size:40px 40px;background-size:40px 40px}.progress-bar.active,.progress.active .progress-bar{-webkit-animation:progress-bar-stripes 2s linear infinite;-o-animation:progress-bar-stripes 2s linear infinite;animation:progress-bar-stripes 2s linear infinite}.progress-bar-success{background-color:#5cb85c}.progress-striped .progress-bar-success{background-image:-webkit-linear-gradient(-45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:-o-linear-gradient(-45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:-webkit-linear-gradient(135deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:-o-linear-gradient(135deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:linear-gradient(-45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent)}.progress-bar-info{background-color:#5bc0de}.progress-striped .progress-bar-info{background-image:-webkit-linear-gradient(-45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:-o-linear-gradient(-45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:-webkit-linear-gradient(135deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:-o-linear-gradient(135deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:linear-gradient(-45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent)}.progress-bar-warning{background-color:#f0ad4e}.progress-striped .progress-bar-warning{background-image:-webkit-linear-gradient(-45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:-o-linear-gradient(-45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:-webkit-linear-gradient(135deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:-o-linear-gradient(135deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:linear-gradient(-45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent)}.progress-bar-danger{background-color:#d9534f}.progress-striped .progress-bar-danger{background-image:-webkit-linear-gradient(-45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:-o-linear-gradient(-45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:-webkit-linear-gradient(135deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:-o-linear-gradient(135deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:linear-gradient(-45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent)}.media{margin-top:15px}.media:first-child{margin-top:0}.media,.media-body{overflow:hidden;zoom:1}.media-body{width:10000px}.media-object{display:block}.media-object.img-thumbnail{max-width:none}.media-right,.media>.pull-right{padding-right:10px}.media-left,.media>.pull-left{padding-left:10px}.media-body,.media-left,.media-right{display:table-cell;vertical-align:top}.media-middle{vertical-align:middle}.media-bottom{vertical-align:bottom}.media-heading{margin-top:0;margin-bottom:5px}.media-list{padding-right:0;list-style:none}.list-group{padding-right:0;margin-bottom:20px}.list-group-item{position:relative;display:block;padding:10px 15px;margin-bottom:-1px;background-color:#fff;border:1px solid #ddd}.list-group-item:first-child{border-top-left-radius:4px;border-top-right-radius:4px}.list-group-item:last-child{margin-bottom:0;border-bottom-right-radius:4px;border-bottom-left-radius:4px}a.list-group-item,button.list-group-item{color:#555}a.list-group-item .list-group-item-heading,button.list-group-item .list-group-item-heading{color:#333}a.list-group-item:focus,a.list-group-item:hover,button.list-group-item:focus,button.list-group-item:hover{color:#555;text-decoration:none;background-color:#f5f5f5}button.list-group-item{width:100%;text-align:right}.list-group-item.disabled,.list-group-item.disabled:focus,.list-group-item.disabled:hover{color:#777;cursor:not-allowed;background-color:#eee}.list-group-item.disabled .list-group-item-heading,.list-group-item.disabled:focus .list-group-item-heading,.list-group-item.disabled:hover .list-group-item-heading{color:inherit}.list-group-item.disabled .list-group-item-text,.list-group-item.disabled:focus .list-group-item-text,.list-group-item.disabled:hover .list-group-item-text{color:#777}.list-group-item.active,.list-group-item.active:focus,.list-group-item.active:hover{z-index:2;color:#fff;background-color:#337ab7;border-color:#337ab7}.list-group-item.active .list-group-item-heading,.list-group-item.active .list-group-item-heading>.small,.list-group-item.active .list-group-item-heading>small,.list-group-item.active:focus .list-group-item-heading,.list-group-item.active:focus .list-group-item-heading>.small,.list-group-item.active:focus .list-group-item-heading>small,.list-group-item.active:hover .list-group-item-heading,.list-group-item.active:hover .list-group-item-heading>.small,.list-group-item.active:hover .list-group-item-heading>small{color:inherit}.list-group-item.active .list-group-item-text,.list-group-item.active:focus .list-group-item-text,.list-group-item.active:hover .list-group-item-text{color:#c7ddef}.list-group-item-success{color:#3c763d;background-color:#dff0d8}a.list-group-item-success,button.list-group-item-success{color:#3c763d}a.list-group-item-success .list-group-item-heading,button.list-group-item-success .list-group-item-heading{color:inherit}a.list-group-item-success:focus,a.list-group-item-success:hover,button.list-group-item-success:focus,button.list-group-item-success:hover{color:#3c763d;background-color:#d0e9c6}a.list-group-item-success.active,a.list-group-item-success.active:focus,a.list-group-item-success.active:hover,button.list-group-item-success.active,button.list-group-item-success.active:focus,button.list-group-item-success.active:hover{color:#fff;background-color:#3c763d;border-color:#3c763d}.list-group-item-info{color:#31708f;background-color:#d9edf7}a.list-group-item-info,button.list-group-item-info{color:#31708f}a.list-group-item-info .list-group-item-heading,button.list-group-item-info .list-group-item-heading{color:inherit}a.list-group-item-info:focus,a.list-group-item-info:hover,button.list-group-item-info:focus,button.list-group-item-info:hover{color:#31708f;background-color:#c4e3f3}a.list-group-item-info.active,a.list-group-item-info.active:focus,a.list-group-item-info.active:hover,button.list-group-item-info.active,button.list-group-item-info.active:focus,button.list-group-item-info.active:hover{color:#fff;background-color:#31708f;border-color:#31708f}.list-group-item-warning{color:#8a6d3b;background-color:#fcf8e3}a.list-group-item-warning,button.list-group-item-warning{color:#8a6d3b}a.list-group-item-warning .list-group-item-heading,button.list-group-item-warning .list-group-item-heading{color:inherit}a.list-group-item-warning:focus,a.list-group-item-warning:hover,button.list-group-item-warning:focus,button.list-group-item-warning:hover{color:#8a6d3b;background-color:#faf2cc}a.list-group-item-warning.active,a.list-group-item-warning.active:focus,a.list-group-item-warning.active:hover,button.list-group-item-warning.active,button.list-group-item-warning.active:focus,button.list-group-item-warning.active:hover{color:#fff;background-color:#8a6d3b;border-color:#8a6d3b}.list-group-item-danger{color:#a94442;background-color:#f2dede}a.list-group-item-danger,button.list-group-item-danger{color:#a94442}a.list-group-item-danger .list-group-item-heading,button.list-group-item-danger .list-group-item-heading{color:inherit}a.list-group-item-danger:focus,a.list-group-item-danger:hover,button.list-group-item-danger:focus,button.list-group-item-danger:hover{color:#a94442;background-color:#ebcccc}a.list-group-item-danger.active,a.list-group-item-danger.active:focus,a.list-group-item-danger.active:hover,button.list-group-item-danger.active,button.list-group-item-danger.active:focus,button.list-group-item-danger.active:hover{color:#fff;background-color:#a94442;border-color:#a94442}.list-group-item-heading{margin-top:0;margin-bottom:5px}.list-group-item-text{margin-bottom:0;line-height:1.3}.panel{margin-bottom:20px;background-color:#fff;border:1px solid transparent;border-radius:4px;-webkit-box-shadow:0 1px 1px rgba(0,0,0,.05);box-shadow:0 1px 1px rgba(0,0,0,.05)}.panel-body{padding:15px}.panel-heading{padding:10px 15px;border-bottom:1px solid transparent;border-top-left-radius:3px;border-top-right-radius:3px}.panel-heading>.dropdown .dropdown-toggle{color:inherit}.panel-title{margin-top:0;margin-bottom:0;font-size:16px;color:inherit}.panel-title>.small,.panel-title>.small>a,.panel-title>a,.panel-title>small,.panel-title>small>a{color:inherit}.panel-footer{padding:10px 15px;background-color:#f5f5f5;border-top:1px solid #ddd;border-bottom-right-radius:3px;border-bottom-left-radius:3px}.panel>.list-group,.panel>.panel-collapse>.list-group{margin-bottom:0}.panel>.list-group .list-group-item,.panel>.panel-collapse>.list-group .list-group-item{border-width:1px 0;border-radius:0}.panel>.list-group:first-child .list-group-item:first-child,.panel>.panel-collapse>.list-group:first-child .list-group-item:first-child{border-top:0;border-top-left-radius:3px;border-top-right-radius:3px}.panel>.list-group:last-child .list-group-item:last-child,.panel>.panel-collapse>.list-group:last-child .list-group-item:last-child{border-bottom:0;border-bottom-right-radius:3px;border-bottom-left-radius:3px}.panel>.panel-heading+.panel-collapse>.list-group .list-group-item:first-child{border-top-left-radius:0;border-top-right-radius:0}.panel-heading+.list-group .list-group-item:first-child{border-top-width:0}.list-group+.panel-footer{border-top-width:0}.panel>.panel-collapse>.table,.panel>.table,.panel>.table-responsive>.table{margin-bottom:0}.panel>.panel-collapse>.table caption,.panel>.table caption,.panel>.table-responsive>.table caption{padding-right:15px;padding-left:15px}.panel>.table-responsive:first-child>.table:first-child,.panel>.table:first-child{border-top-left-radius:3px;border-top-right-radius:3px}.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child,.panel>.table:first-child>tbody:first-child>tr:first-child,.panel>.table:first-child>thead:first-child>tr:first-child{border-top-left-radius:3px;border-top-right-radius:3px}.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child td:first-child,.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child th:first-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child td:first-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child th:first-child,.panel>.table:first-child>tbody:first-child>tr:first-child td:first-child,.panel>.table:first-child>tbody:first-child>tr:first-child th:first-child,.panel>.table:first-child>thead:first-child>tr:first-child td:first-child,.panel>.table:first-child>thead:first-child>tr:first-child th:first-child{border-top-right-radius:3px}.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child td:last-child,.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child th:last-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child td:last-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child th:last-child,.panel>.table:first-child>tbody:first-child>tr:first-child td:last-child,.panel>.table:first-child>tbody:first-child>tr:first-child th:last-child,.panel>.table:first-child>thead:first-child>tr:first-child td:last-child,.panel>.table:first-child>thead:first-child>tr:first-child th:last-child{border-top-left-radius:3px}.panel>.table-responsive:last-child>.table:last-child,.panel>.table:last-child{border-bottom-right-radius:3px;border-bottom-left-radius:3px}.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child,.panel>.table:last-child>tbody:last-child>tr:last-child,.panel>.table:last-child>tfoot:last-child>tr:last-child{border-bottom-right-radius:3px;border-bottom-left-radius:3px}.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child td:first-child,.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child th:first-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child td:first-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child th:first-child,.panel>.table:last-child>tbody:last-child>tr:last-child td:first-child,.panel>.table:last-child>tbody:last-child>tr:last-child th:first-child,.panel>.table:last-child>tfoot:last-child>tr:last-child td:first-child,.panel>.table:last-child>tfoot:last-child>tr:last-child th:first-child{border-bottom-right-radius:3px}.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child td:last-child,.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child th:last-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child td:last-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child th:last-child,.panel>.table:last-child>tbody:last-child>tr:last-child td:last-child,.panel>.table:last-child>tbody:last-child>tr:last-child th:last-child,.panel>.table:last-child>tfoot:last-child>tr:last-child td:last-child,.panel>.table:last-child>tfoot:last-child>tr:last-child th:last-child{border-bottom-left-radius:3px}.panel>.panel-body+.table,.panel>.panel-body+.table-responsive,.panel>.table+.panel-body,.panel>.table-responsive+.panel-body{border-top:1px solid #ddd}.panel>.table>tbody:first-child>tr:first-child td,.panel>.table>tbody:first-child>tr:first-child th{border-top:0}.panel>.table-bordered,.panel>.table-responsive>.table-bordered{border:0}.panel>.table-bordered>tbody>tr>td:first-child,.panel>.table-bordered>tbody>tr>th:first-child,.panel>.table-bordered>tfoot>tr>td:first-child,.panel>.table-bordered>tfoot>tr>th:first-child,.panel>.table-bordered>thead>tr>td:first-child,.panel>.table-bordered>thead>tr>th:first-child,.panel>.table-responsive>.table-bordered>tbody>tr>td:first-child,.panel>.table-responsive>.table-bordered>tbody>tr>th:first-child,.panel>.table-responsive>.table-bordered>tfoot>tr>td:first-child,.panel>.table-responsive>.table-bordered>tfoot>tr>th:first-child,.panel>.table-responsive>.table-bordered>thead>tr>td:first-child,.panel>.table-responsive>.table-bordered>thead>tr>th:first-child{border-right:0}.panel>.table-bordered>tbody>tr>td:last-child,.panel>.table-bordered>tbody>tr>th:last-child,.panel>.table-bordered>tfoot>tr>td:last-child,.panel>.table-bordered>tfoot>tr>th:last-child,.panel>.table-bordered>thead>tr>td:last-child,.panel>.table-bordered>thead>tr>th:last-child,.panel>.table-responsive>.table-bordered>tbody>tr>td:last-child,.panel>.table-responsive>.table-bordered>tbody>tr>th:last-child,.panel>.table-responsive>.table-bordered>tfoot>tr>td:last-child,.panel>.table-responsive>.table-bordered>tfoot>tr>th:last-child,.panel>.table-responsive>.table-bordered>thead>tr>td:last-child,.panel>.table-responsive>.table-bordered>thead>tr>th:last-child{border-left:0}.panel>.table-bordered>tbody>tr:first-child>td,.panel>.table-bordered>tbody>tr:first-child>th,.panel>.table-bordered>thead>tr:first-child>td,.panel>.table-bordered>thead>tr:first-child>th,.panel>.table-responsive>.table-bordered>tbody>tr:first-child>td,.panel>.table-responsive>.table-bordered>tbody>tr:first-child>th,.panel>.table-responsive>.table-bordered>thead>tr:first-child>td,.panel>.table-responsive>.table-bordered>thead>tr:first-child>th{border-bottom:0}.panel>.table-bordered>tbody>tr:last-child>td,.panel>.table-bordered>tbody>tr:last-child>th,.panel>.table-bordered>tfoot>tr:last-child>td,.panel>.table-bordered>tfoot>tr:last-child>th,.panel>.table-responsive>.table-bordered>tbody>tr:last-child>td,.panel>.table-responsive>.table-bordered>tbody>tr:last-child>th,.panel>.table-responsive>.table-bordered>tfoot>tr:last-child>td,.panel>.table-responsive>.table-bordered>tfoot>tr:last-child>th{border-bottom:0}.panel>.table-responsive{margin-bottom:0;border:0}.panel-group{margin-bottom:20px}.panel-group .panel{margin-bottom:0;border-radius:4px}.panel-group .panel+.panel{margin-top:5px}.panel-group .panel-heading{border-bottom:0}.panel-group .panel-heading+.panel-collapse>.list-group,.panel-group .panel-heading+.panel-collapse>.panel-body{border-top:1px solid #ddd}.panel-group .panel-footer{border-top:0}.panel-group .panel-footer+.panel-collapse .panel-body{border-bottom:1px solid #ddd}.panel-default{border-color:#ddd}.panel-default>.panel-heading{color:#333;background-color:#f5f5f5;border-color:#ddd}.panel-default>.panel-heading+.panel-collapse>.panel-body{border-top-color:#ddd}.panel-default>.panel-heading .badge{color:#f5f5f5;background-color:#333}.panel-default>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#ddd}.panel-primary{border-color:#337ab7}.panel-primary>.panel-heading{color:#fff;background-color:#337ab7;border-color:#337ab7}.panel-primary>.panel-heading+.panel-collapse>.panel-body{border-top-color:#337ab7}.panel-primary>.panel-heading .badge{color:#337ab7;background-color:#fff}.panel-primary>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#337ab7}.panel-success{border-color:#d6e9c6}.panel-success>.panel-heading{color:#3c763d;background-color:#dff0d8;border-color:#d6e9c6}.panel-success>.panel-heading+.panel-collapse>.panel-body{border-top-color:#d6e9c6}.panel-success>.panel-heading .badge{color:#dff0d8;background-color:#3c763d}.panel-success>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#d6e9c6}.panel-info{border-color:#bce8f1}.panel-info>.panel-heading{color:#31708f;background-color:#d9edf7;border-color:#bce8f1}.panel-info>.panel-heading+.panel-collapse>.panel-body{border-top-color:#bce8f1}.panel-info>.panel-heading .badge{color:#d9edf7;background-color:#31708f}.panel-info>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#bce8f1}.panel-warning{border-color:#faebcc}.panel-warning>.panel-heading{color:#8a6d3b;background-color:#fcf8e3;border-color:#faebcc}.panel-warning>.panel-heading+.panel-collapse>.panel-body{border-top-color:#faebcc}.panel-warning>.panel-heading .badge{color:#fcf8e3;background-color:#8a6d3b}.panel-warning>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#faebcc}.panel-danger{border-color:#ebccd1}.panel-danger>.panel-heading{color:#a94442;background-color:#f2dede;border-color:#ebccd1}.panel-danger>.panel-heading+.panel-collapse>.panel-body{border-top-color:#ebccd1}.panel-danger>.panel-heading .badge{color:#f2dede;background-color:#a94442}.panel-danger>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#ebccd1}.embed-responsive{position:relative;display:block;height:0;padding:0;overflow:hidden}.embed-responsive .embed-responsive-item,.embed-responsive embed,.embed-responsive iframe,.embed-responsive object,.embed-responsive video{position:absolute;top:0;right:0;bottom:0;width:100%;height:100%;border:0}.embed-responsive-16by9{padding-bottom:56.25%}.embed-responsive-4by3{padding-bottom:75%}.well{min-height:20px;padding:19px;margin-bottom:20px;background-color:#f5f5f5;border:1px solid #e3e3e3;border-radius:4px;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.05);box-shadow:inset 0 1px 1px rgba(0,0,0,.05)}.well blockquote{border-color:#ddd;border-color:rgba(0,0,0,.15)}.well-lg{padding:24px;border-radius:6px}.well-sm{padding:9px;border-radius:3px}.close{float:left;font-size:21px;font-weight:700;line-height:1;color:#000;text-shadow:0 1px 0 #fff;filter:alpha(opacity=20);opacity:.2}.close:focus,.close:hover{color:#000;text-decoration:none;cursor:pointer;filter:alpha(opacity=50);opacity:.5}button.close{-webkit-appearance:none;padding:0;cursor:pointer;background:0 0;border:0}.modal-open{overflow:hidden}.modal{position:fixed;top:0;right:0;bottom:0;left:0;z-index:1050;display:none;overflow:hidden;-webkit-overflow-scrolling:touch;outline:0}.modal.fade .modal-dialog{-webkit-transition:-webkit-transform .3s ease-out;-o-transition:-o-transform .3s ease-out;transition:transform .3s ease-out;-webkit-transform:translate(0,-25%);-ms-transform:translate(0,-25%);-o-transform:translate(0,-25%);transform:translate(0,-25%)}.modal.in .modal-dialog{-webkit-transform:translate(0,0);-ms-transform:translate(0,0);-o-transform:translate(0,0);transform:translate(0,0)}.modal-open .modal{overflow-x:hidden;overflow-y:auto}.modal-dialog{position:relative;width:auto;margin:10px}.modal-content{position:relative;background-color:#fff;-webkit-background-clip:padding-box;background-clip:padding-box;border:1px solid #999;border:1px solid rgba(0,0,0,.2);border-radius:6px;outline:0;-webkit-box-shadow:0 3px 9px rgba(0,0,0,.5);box-shadow:0 3px 9px rgba(0,0,0,.5)}.modal-backdrop{position:fixed;top:0;right:0;bottom:0;left:0;z-index:1040;background-color:#000}.modal-backdrop.fade{filter:alpha(opacity=0);opacity:0}.modal-backdrop.in{filter:alpha(opacity=50);opacity:.5}.modal-header{padding:15px;border-bottom:1px solid #e5e5e5}.modal-header .close{margin-top:-2px}.modal-title{margin:0;line-height:1.42857143}.modal-body{position:relative;padding:15px}.modal-footer{padding:15px;text-align:left;border-top:1px solid #e5e5e5}.modal-footer .btn+.btn{margin-right:5px;margin-bottom:0}.modal-footer .btn-group .btn+.btn{margin-right:-1px}.modal-footer .btn-block+.btn-block{margin-right:0}.modal-scrollbar-measure{position:absolute;top:-9999px;width:50px;height:50px;overflow:scroll}@media (min-width:768px){.modal-dialog{width:600px;margin:30px auto}.modal-content{-webkit-box-shadow:0 5px 15px rgba(0,0,0,.5);box-shadow:0 5px 15px rgba(0,0,0,.5)}.modal-sm{width:300px}}@media (min-width:992px){.modal-lg{width:900px}}.tooltip{position:absolute;z-index:1070;display:block;font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:12px;font-style:normal;font-weight:400;line-height:1.42857143;text-align:right;text-align:start;text-decoration:none;text-shadow:none;text-transform:none;letter-spacing:normal;word-break:normal;word-spacing:normal;word-wrap:normal;white-space:normal;filter:alpha(opacity=0);opacity:0;line-break:auto}.tooltip.in{filter:alpha(opacity=90);opacity:.9}.tooltip.top{padding:5px 0;margin-top:-3px}.tooltip.right{padding:0 5px;margin-right:3px}.tooltip.bottom{padding:5px 0;margin-top:3px}.tooltip.left{padding:0 5px;margin-right:-3px}.tooltip-inner{max-width:200px;padding:3px 8px;color:#fff;text-align:center;background-color:#000;border-radius:4px}.tooltip-arrow{position:absolute;width:0;height:0;border-color:transparent;border-style:solid}.tooltip.top .tooltip-arrow{right:50%;bottom:0;margin-right:-5px;border-width:5px 5px 0;border-top-color:#000}.tooltip.top-left .tooltip-arrow{bottom:0;left:5px;margin-bottom:-5px;border-width:5px 5px 0;border-top-color:#000}.tooltip.top-right .tooltip-arrow{right:5px;bottom:0;margin-bottom:-5px;border-width:5px 5px 0;border-top-color:#000}.tooltip.right .tooltip-arrow{top:50%;right:0;margin-top:-5px;border-width:5px 0 5px 5px;border-left-color:#000}.tooltip.left .tooltip-arrow{top:50%;left:0;margin-top:-5px;border-width:5px 5px 5px 0;border-right-color:#000}.tooltip.bottom .tooltip-arrow{top:0;right:50%;margin-right:-5px;border-width:0 5px 5px;border-bottom-color:#000}.tooltip.bottom-left .tooltip-arrow{top:0;left:5px;margin-top:-5px;border-width:0 5px 5px;border-bottom-color:#000}.tooltip.bottom-right .tooltip-arrow{top:0;right:5px;margin-top:-5px;border-width:0 5px 5px;border-bottom-color:#000}.popover{position:absolute;top:0;right:0;z-index:1060;display:none;max-width:276px;padding:1px;font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:14px;font-style:normal;font-weight:400;line-height:1.42857143;text-align:right;text-align:start;text-decoration:none;text-shadow:none;text-transform:none;letter-spacing:normal;word-break:normal;word-spacing:normal;word-wrap:normal;white-space:normal;background-color:#fff;-webkit-background-clip:padding-box;background-clip:padding-box;border:1px solid #ccc;border:1px solid rgba(0,0,0,.2);border-radius:6px;-webkit-box-shadow:0 5px 10px rgba(0,0,0,.2);box-shadow:0 5px 10px rgba(0,0,0,.2);line-break:auto}.popover.top{margin-top:-10px}.popover.right{margin-right:10px}.popover.bottom{margin-top:10px}.popover.left{margin-right:-10px}.popover-title{padding:8px 14px;margin:0;font-size:14px;background-color:#f7f7f7;border-bottom:1px solid #ebebeb;border-radius:5px 5px 0 0}.popover-content{padding:9px 14px}.popover>.arrow,.popover>.arrow:after{position:absolute;display:block;width:0;height:0;border-color:transparent;border-style:solid}.popover>.arrow{border-width:11px}.popover>.arrow:after{content:"";border-width:10px}.popover.top>.arrow{right:50%;bottom:-11px;margin-right:-11px;border-top-color:#999;border-top-color:rgba(0,0,0,.25);border-bottom-width:0}.popover.top>.arrow:after{bottom:1px;margin-right:-10px;content:" ";border-top-color:#fff;border-bottom-width:0}.popover.right>.arrow{top:50%;right:-11px;margin-top:-11px;border-right-width:0;border-left-color:#999;border-left-color:rgba(0,0,0,.25)}.popover.right>.arrow:after{right:1px;bottom:-10px;content:" ";border-right-width:0;border-left-color:#fff}.popover.bottom>.arrow{top:-11px;right:50%;margin-right:-11px;border-top-width:0;border-bottom-color:#999;border-bottom-color:rgba(0,0,0,.25)}.popover.bottom>.arrow:after{top:1px;margin-right:-10px;content:" ";border-top-width:0;border-bottom-color:#fff}.popover.left>.arrow{top:50%;left:-11px;margin-top:-11px;border-right-color:#999;border-right-color:rgba(0,0,0,.25);border-left-width:0}.popover.left>.arrow:after{bottom:-10px;left:1px;content:" ";border-right-color:#fff;border-left-width:0}.carousel{position:relative}.carousel-inner{position:relative;width:100%;overflow:hidden}.carousel-inner>.item{position:relative;display:none;-webkit-transition:.6s ease-in-out right;-o-transition:.6s ease-in-out right;transition:.6s ease-in-out right}.carousel-inner>.item>a>img,.carousel-inner>.item>img{line-height:1}@media all and (transform-3d),(-webkit-transform-3d){.carousel-inner>.item{-webkit-transition:-webkit-transform .6s ease-in-out;-o-transition:-o-transform .6s ease-in-out;transition:transform .6s ease-in-out;-webkit-backface-visibility:hidden;backface-visibility:hidden;-webkit-perspective:1000px;perspective:1000px}.carousel-inner>.item.active.right,.carousel-inner>.item.next{right:0;-webkit-transform:translate3d(-100%,0,0);transform:translate3d(-100%,0,0)}.carousel-inner>.item.active.left,.carousel-inner>.item.prev{right:0;-webkit-transform:translate3d(100%,0,0);transform:translate3d(100%,0,0)}.carousel-inner>.item.active,.carousel-inner>.item.next.left,.carousel-inner>.item.prev.right{right:0;-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}}.carousel-inner>.active,.carousel-inner>.next,.carousel-inner>.prev{display:block}.carousel-inner>.active{right:0}.carousel-inner>.next,.carousel-inner>.prev{position:absolute;top:0;width:100%}.carousel-inner>.next{right:100%}.carousel-inner>.prev{right:-100%}.carousel-inner>.next.left,.carousel-inner>.prev.right{right:0}.carousel-inner>.active.left{right:-100%}.carousel-inner>.active.right{right:100%}.carousel-control{position:absolute;top:0;right:0;bottom:0;width:15%;font-size:20px;color:#fff;text-align:center;text-shadow:0 1px 2px rgba(0,0,0,.6);background-color:rgba(0,0,0,0);filter:alpha(opacity=50);opacity:.5}.carousel-control.left{background-image:-webkit-linear-gradient(right,rgba(0,0,0,.5) 0,rgba(0,0,0,.0001) 100%);background-image:-o-linear-gradient(right,rgba(0,0,0,.5) 0,rgba(0,0,0,.0001) 100%);background-image:-webkit-gradient(linear,right top,left top,from(rgba(0,0,0,.5)),to(rgba(0,0,0,.0001)));background-image:linear-gradient(to left,rgba(0,0,0,.5) 0,rgba(0,0,0,.0001) 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#80000000', endColorstr='#00000000', GradientType=1);background-repeat:repeat-x}.carousel-control.right{right:auto;left:0;background-image:-webkit-linear-gradient(right,rgba(0,0,0,.0001) 0,rgba(0,0,0,.5) 100%);background-image:-o-linear-gradient(right,rgba(0,0,0,.0001) 0,rgba(0,0,0,.5) 100%);background-image:-webkit-gradient(linear,right top,left top,from(rgba(0,0,0,.0001)),to(rgba(0,0,0,.5)));background-image:linear-gradient(to left,rgba(0,0,0,.0001) 0,rgba(0,0,0,.5) 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#00000000', endColorstr='#80000000', GradientType=1);background-repeat:repeat-x}.carousel-control:focus,.carousel-control:hover{color:#fff;text-decoration:none;filter:alpha(opacity=90);outline:0;opacity:.9}.carousel-control .glyphicon-chevron-left,.carousel-control .glyphicon-chevron-right,.carousel-control .icon-next,.carousel-control .icon-prev{position:absolute;top:50%;z-index:5;display:inline-block;margin-top:-10px}.carousel-control .glyphicon-chevron-left,.carousel-control .icon-prev{right:50%;margin-right:-10px}.carousel-control .glyphicon-chevron-right,.carousel-control .icon-next{left:50%;margin-left:-10px}.carousel-control .icon-next,.carousel-control .icon-prev{width:20px;height:20px;font-family:serif;line-height:1}.carousel-control .icon-prev:before{content:'\2039'}.carousel-control .icon-next:before{content:'\203a'}.carousel-indicators{position:absolute;right:50%;bottom:10px;z-index:15;width:60%;padding-right:0;margin-right:-30%;text-align:center;list-style:none}.carousel-indicators li{display:inline-block;width:10px;height:10px;margin:1px;text-indent:-999px;cursor:pointer;background-color:#000\9;background-color:rgba(0,0,0,0);border:1px solid #fff;border-radius:10px}.carousel-indicators .active{width:12px;height:12px;margin:0;background-color:#fff}.carousel-caption{position:absolute;right:15%;bottom:20px;left:15%;z-index:10;padding-top:20px;padding-bottom:20px;color:#fff;text-align:center;text-shadow:0 1px 2px rgba(0,0,0,.6)}.carousel-caption .btn{text-shadow:none}@media screen and (min-width:768px){.carousel-control .glyphicon-chevron-left,.carousel-control .glyphicon-chevron-right,.carousel-control .icon-next,.carousel-control .icon-prev{width:30px;height:30px;margin-top:-10px;font-size:30px}.carousel-control .glyphicon-chevron-left,.carousel-control .icon-prev{margin-right:-10px}.carousel-control .glyphicon-chevron-right,.carousel-control .icon-next{margin-left:-10px}.carousel-caption{right:20%;left:20%;padding-bottom:30px}.carousel-indicators{bottom:20px}}.btn-group-vertical>.btn-group:after,.btn-group-vertical>.btn-group:before,.btn-toolbar:after,.btn-toolbar:before,.clearfix:after,.clearfix:before,.container-fluid:after,.container-fluid:before,.container:after,.container:before,.dl-horizontal dd:after,.dl-horizontal dd:before,.form-horizontal .form-group:after,.form-horizontal .form-group:before,.modal-footer:after,.modal-footer:before,.modal-header:after,.modal-header:before,.nav:after,.nav:before,.navbar-collapse:after,.navbar-collapse:before,.navbar-header:after,.navbar-header:before,.navbar:after,.navbar:before,.pager:after,.pager:before,.panel-body:after,.panel-body:before,.row:after,.row:before{display:table;content:" "}.btn-group-vertical>.btn-group:after,.btn-toolbar:after,.clearfix:after,.container-fluid:after,.container:after,.dl-horizontal dd:after,.form-horizontal .form-group:after,.modal-footer:after,.modal-header:after,.nav:after,.navbar-collapse:after,.navbar-header:after,.navbar:after,.pager:after,.panel-body:after,.row:after{clear:both}.center-block{display:block;margin-right:auto;margin-left:auto}.pull-right{float:left!important}.pull-left{float:right!important}.hide{display:none!important}.show{display:block!important}.invisible{visibility:hidden}.text-hide{font:0/0 a;color:transparent;text-shadow:none;background-color:transparent;border:0}.hidden{display:none!important}.affix{position:fixed}@-ms-viewport{width:device-width}.visible-lg,.visible-md,.visible-sm,.visible-xs{display:none!important}.visible-lg-block,.visible-lg-inline,.visible-lg-inline-block,.visible-md-block,.visible-md-inline,.visible-md-inline-block,.visible-sm-block,.visible-sm-inline,.visible-sm-inline-block,.visible-xs-block,.visible-xs-inline,.visible-xs-inline-block{display:none!important}@media (max-width:767px){.visible-xs{display:block!important}table.visible-xs{display:table!important}tr.visible-xs{display:table-row!important}td.visible-xs,th.visible-xs{display:table-cell!important}}@media (max-width:767px){.visible-xs-block{display:block!important}}@media (max-width:767px){.visible-xs-inline{display:inline!important}}@media (max-width:767px){.visible-xs-inline-block{display:inline-block!important}}@media (min-width:768px) and (max-width:991px){.visible-sm{display:block!important}table.visible-sm{display:table!important}tr.visible-sm{display:table-row!important}td.visible-sm,th.visible-sm{display:table-cell!important}}@media (min-width:768px) and (max-width:991px){.visible-sm-block{display:block!important}}@media (min-width:768px) and (max-width:991px){.visible-sm-inline{display:inline!important}}@media (min-width:768px) and (max-width:991px){.visible-sm-inline-block{display:inline-block!important}}@media (min-width:992px) and (max-width:1199px){.visible-md{display:block!important}table.visible-md{display:table!important}tr.visible-md{display:table-row!important}td.visible-md,th.visible-md{display:table-cell!important}}@media (min-width:992px) and (max-width:1199px){.visible-md-block{display:block!important}}@media (min-width:992px) and (max-width:1199px){.visible-md-inline{display:inline!important}}@media (min-width:992px) and (max-width:1199px){.visible-md-inline-block{display:inline-block!important}}@media (min-width:1200px){.visible-lg{display:block!important}table.visible-lg{display:table!important}tr.visible-lg{display:table-row!important}td.visible-lg,th.visible-lg{display:table-cell!important}}@media (min-width:1200px){.visible-lg-block{display:block!important}}@media (min-width:1200px){.visible-lg-inline{display:inline!important}}@media (min-width:1200px){.visible-lg-inline-block{display:inline-block!important}}@media (max-width:767px){.hidden-xs{display:none!important}}@media (min-width:768px) and (max-width:991px){.hidden-sm{display:none!important}}@media (min-width:992px) and (max-width:1199px){.hidden-md{display:none!important}}@media (min-width:1200px){.hidden-lg{display:none!important}}.visible-print{display:none!important}@media print{.visible-print{display:block!important}table.visible-print{display:table!important}tr.visible-print{display:table-row!important}td.visible-print,th.visible-print{display:table-cell!important}}.visible-print-block{display:none!important}@media print{.visible-print-block{display:block!important}}.visible-print-inline{display:none!important}@media print{.visible-print-inline{display:inline!important}}.visible-print-inline-block{display:none!important}@media print{.visible-print-inline-block{display:inline-block!important}}@media print{.hidden-print{display:none!important}} +/*# sourceMappingURL=bootstrap.min.css.map */ \ No newline at end of file diff --git a/odex25_takaful/takaful_portal_sponsor/static/libs/bootstrap3/bootstrap.min.js b/odex25_takaful/takaful_portal_sponsor/static/libs/bootstrap3/bootstrap.min.js new file mode 100644 index 000000000..e79c06513 --- /dev/null +++ b/odex25_takaful/takaful_portal_sponsor/static/libs/bootstrap3/bootstrap.min.js @@ -0,0 +1,7 @@ +/*! + * Bootstrap v3.3.6 (http://getbootstrap.com) + * Copyright 2011-2015 Twitter, Inc. + * Licensed under the MIT license + */ +if("undefined"==typeof jQuery)throw new Error("Bootstrap's JavaScript requires jQuery");+function(a){"use strict";var b=a.fn.jquery.split(" ")[0].split(".");if(b[0]<2&&b[1]<9||1==b[0]&&9==b[1]&&b[2]<1||b[0]>2)throw new Error("Bootstrap's JavaScript requires jQuery version 1.9.1 or higher, but lower than version 3")}(jQuery),+function(a){"use strict";function b(){var a=document.createElement("bootstrap"),b={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"};for(var c in b)if(void 0!==a.style[c])return{end:b[c]};return!1}a.fn.emulateTransitionEnd=function(b){var c=!1,d=this;a(this).one("bsTransitionEnd",function(){c=!0});var e=function(){c||a(d).trigger(a.support.transition.end)};return setTimeout(e,b),this},a(function(){a.support.transition=b(),a.support.transition&&(a.event.special.bsTransitionEnd={bindType:a.support.transition.end,delegateType:a.support.transition.end,handle:function(b){return a(b.target).is(this)?b.handleObj.handler.apply(this,arguments):void 0}})})}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var c=a(this),e=c.data("bs.alert");e||c.data("bs.alert",e=new d(this)),"string"==typeof b&&e[b].call(c)})}var c='[data-dismiss="alert"]',d=function(b){a(b).on("click",c,this.close)};d.VERSION="3.3.6",d.TRANSITION_DURATION=150,d.prototype.close=function(b){function c(){g.detach().trigger("closed.bs.alert").remove()}var e=a(this),f=e.attr("data-target");f||(f=e.attr("href"),f=f&&f.replace(/.*(?=#[^\s]*$)/,""));var g=a(f);b&&b.preventDefault(),g.length||(g=e.closest(".alert")),g.trigger(b=a.Event("close.bs.alert")),b.isDefaultPrevented()||(g.removeClass("in"),a.support.transition&&g.hasClass("fade")?g.one("bsTransitionEnd",c).emulateTransitionEnd(d.TRANSITION_DURATION):c())};var e=a.fn.alert;a.fn.alert=b,a.fn.alert.Constructor=d,a.fn.alert.noConflict=function(){return a.fn.alert=e,this},a(document).on("click.bs.alert.data-api",c,d.prototype.close)}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.button"),f="object"==typeof b&&b;e||d.data("bs.button",e=new c(this,f)),"toggle"==b?e.toggle():b&&e.setState(b)})}var c=function(b,d){this.$element=a(b),this.options=a.extend({},c.DEFAULTS,d),this.isLoading=!1};c.VERSION="3.3.6",c.DEFAULTS={loadingText:"loading..."},c.prototype.setState=function(b){var c="disabled",d=this.$element,e=d.is("input")?"val":"html",f=d.data();b+="Text",null==f.resetText&&d.data("resetText",d[e]()),setTimeout(a.proxy(function(){d[e](null==f[b]?this.options[b]:f[b]),"loadingText"==b?(this.isLoading=!0,d.addClass(c).attr(c,c)):this.isLoading&&(this.isLoading=!1,d.removeClass(c).removeAttr(c))},this),0)},c.prototype.toggle=function(){var a=!0,b=this.$element.closest('[data-toggle="buttons"]');if(b.length){var c=this.$element.find("input");"radio"==c.prop("type")?(c.prop("checked")&&(a=!1),b.find(".active").removeClass("active"),this.$element.addClass("active")):"checkbox"==c.prop("type")&&(c.prop("checked")!==this.$element.hasClass("active")&&(a=!1),this.$element.toggleClass("active")),c.prop("checked",this.$element.hasClass("active")),a&&c.trigger("change")}else this.$element.attr("aria-pressed",!this.$element.hasClass("active")),this.$element.toggleClass("active")};var d=a.fn.button;a.fn.button=b,a.fn.button.Constructor=c,a.fn.button.noConflict=function(){return a.fn.button=d,this},a(document).on("click.bs.button.data-api",'[data-toggle^="button"]',function(c){var d=a(c.target);d.hasClass("btn")||(d=d.closest(".btn")),b.call(d,"toggle"),a(c.target).is('input[type="radio"]')||a(c.target).is('input[type="checkbox"]')||c.preventDefault()}).on("focus.bs.button.data-api blur.bs.button.data-api",'[data-toggle^="button"]',function(b){a(b.target).closest(".btn").toggleClass("focus",/^focus(in)?$/.test(b.type))})}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.carousel"),f=a.extend({},c.DEFAULTS,d.data(),"object"==typeof b&&b),g="string"==typeof b?b:f.slide;e||d.data("bs.carousel",e=new c(this,f)),"number"==typeof b?e.to(b):g?e[g]():f.interval&&e.pause().cycle()})}var c=function(b,c){this.$element=a(b),this.$indicators=this.$element.find(".carousel-indicators"),this.options=c,this.paused=null,this.sliding=null,this.interval=null,this.$active=null,this.$items=null,this.options.keyboard&&this.$element.on("keydown.bs.carousel",a.proxy(this.keydown,this)),"hover"==this.options.pause&&!("ontouchstart"in document.documentElement)&&this.$element.on("mouseenter.bs.carousel",a.proxy(this.pause,this)).on("mouseleave.bs.carousel",a.proxy(this.cycle,this))};c.VERSION="3.3.6",c.TRANSITION_DURATION=600,c.DEFAULTS={interval:5e3,pause:"hover",wrap:!0,keyboard:!0},c.prototype.keydown=function(a){if(!/input|textarea/i.test(a.target.tagName)){switch(a.which){case 37:this.prev();break;case 39:this.next();break;default:return}a.preventDefault()}},c.prototype.cycle=function(b){return b||(this.paused=!1),this.interval&&clearInterval(this.interval),this.options.interval&&!this.paused&&(this.interval=setInterval(a.proxy(this.next,this),this.options.interval)),this},c.prototype.getItemIndex=function(a){return this.$items=a.parent().children(".item"),this.$items.index(a||this.$active)},c.prototype.getItemForDirection=function(a,b){var c=this.getItemIndex(b),d="prev"==a&&0===c||"next"==a&&c==this.$items.length-1;if(d&&!this.options.wrap)return b;var e="prev"==a?-1:1,f=(c+e)%this.$items.length;return this.$items.eq(f)},c.prototype.to=function(a){var b=this,c=this.getItemIndex(this.$active=this.$element.find(".item.active"));return a>this.$items.length-1||0>a?void 0:this.sliding?this.$element.one("slid.bs.carousel",function(){b.to(a)}):c==a?this.pause().cycle():this.slide(a>c?"next":"prev",this.$items.eq(a))},c.prototype.pause=function(b){return b||(this.paused=!0),this.$element.find(".next, .prev").length&&a.support.transition&&(this.$element.trigger(a.support.transition.end),this.cycle(!0)),this.interval=clearInterval(this.interval),this},c.prototype.next=function(){return this.sliding?void 0:this.slide("next")},c.prototype.prev=function(){return this.sliding?void 0:this.slide("prev")},c.prototype.slide=function(b,d){var e=this.$element.find(".item.active"),f=d||this.getItemForDirection(b,e),g=this.interval,h="next"==b?"left":"right",i=this;if(f.hasClass("active"))return this.sliding=!1;var j=f[0],k=a.Event("slide.bs.carousel",{relatedTarget:j,direction:h});if(this.$element.trigger(k),!k.isDefaultPrevented()){if(this.sliding=!0,g&&this.pause(),this.$indicators.length){this.$indicators.find(".active").removeClass("active");var l=a(this.$indicators.children()[this.getItemIndex(f)]);l&&l.addClass("active")}var m=a.Event("slid.bs.carousel",{relatedTarget:j,direction:h});return a.support.transition&&this.$element.hasClass("slide")?(f.addClass(b),f[0].offsetWidth,e.addClass(h),f.addClass(h),e.one("bsTransitionEnd",function(){f.removeClass([b,h].join(" ")).addClass("active"),e.removeClass(["active",h].join(" ")),i.sliding=!1,setTimeout(function(){i.$element.trigger(m)},0)}).emulateTransitionEnd(c.TRANSITION_DURATION)):(e.removeClass("active"),f.addClass("active"),this.sliding=!1,this.$element.trigger(m)),g&&this.cycle(),this}};var d=a.fn.carousel;a.fn.carousel=b,a.fn.carousel.Constructor=c,a.fn.carousel.noConflict=function(){return a.fn.carousel=d,this};var e=function(c){var d,e=a(this),f=a(e.attr("data-target")||(d=e.attr("href"))&&d.replace(/.*(?=#[^\s]+$)/,""));if(f.hasClass("carousel")){var g=a.extend({},f.data(),e.data()),h=e.attr("data-slide-to");h&&(g.interval=!1),b.call(f,g),h&&f.data("bs.carousel").to(h),c.preventDefault()}};a(document).on("click.bs.carousel.data-api","[data-slide]",e).on("click.bs.carousel.data-api","[data-slide-to]",e),a(window).on("load",function(){a('[data-ride="carousel"]').each(function(){var c=a(this);b.call(c,c.data())})})}(jQuery),+function(a){"use strict";function b(b){var c,d=b.attr("data-target")||(c=b.attr("href"))&&c.replace(/.*(?=#[^\s]+$)/,"");return a(d)}function c(b){return this.each(function(){var c=a(this),e=c.data("bs.collapse"),f=a.extend({},d.DEFAULTS,c.data(),"object"==typeof b&&b);!e&&f.toggle&&/show|hide/.test(b)&&(f.toggle=!1),e||c.data("bs.collapse",e=new d(this,f)),"string"==typeof b&&e[b]()})}var d=function(b,c){this.$element=a(b),this.options=a.extend({},d.DEFAULTS,c),this.$trigger=a('[data-toggle="collapse"][href="#'+b.id+'"],[data-toggle="collapse"][data-target="#'+b.id+'"]'),this.transitioning=null,this.options.parent?this.$parent=this.getParent():this.addAriaAndCollapsedClass(this.$element,this.$trigger),this.options.toggle&&this.toggle()};d.VERSION="3.3.6",d.TRANSITION_DURATION=350,d.DEFAULTS={toggle:!0},d.prototype.dimension=function(){var a=this.$element.hasClass("width");return a?"width":"height"},d.prototype.show=function(){if(!this.transitioning&&!this.$element.hasClass("in")){var b,e=this.$parent&&this.$parent.children(".panel").children(".in, .collapsing");if(!(e&&e.length&&(b=e.data("bs.collapse"),b&&b.transitioning))){var f=a.Event("show.bs.collapse");if(this.$element.trigger(f),!f.isDefaultPrevented()){e&&e.length&&(c.call(e,"hide"),b||e.data("bs.collapse",null));var g=this.dimension();this.$element.removeClass("collapse").addClass("collapsing")[g](0).attr("aria-expanded",!0),this.$trigger.removeClass("collapsed").attr("aria-expanded",!0),this.transitioning=1;var h=function(){this.$element.removeClass("collapsing").addClass("collapse in")[g](""),this.transitioning=0,this.$element.trigger("shown.bs.collapse")};if(!a.support.transition)return h.call(this);var i=a.camelCase(["scroll",g].join("-"));this.$element.one("bsTransitionEnd",a.proxy(h,this)).emulateTransitionEnd(d.TRANSITION_DURATION)[g](this.$element[0][i])}}}},d.prototype.hide=function(){if(!this.transitioning&&this.$element.hasClass("in")){var b=a.Event("hide.bs.collapse");if(this.$element.trigger(b),!b.isDefaultPrevented()){var c=this.dimension();this.$element[c](this.$element[c]())[0].offsetHeight,this.$element.addClass("collapsing").removeClass("collapse in").attr("aria-expanded",!1),this.$trigger.addClass("collapsed").attr("aria-expanded",!1),this.transitioning=1;var e=function(){this.transitioning=0,this.$element.removeClass("collapsing").addClass("collapse").trigger("hidden.bs.collapse")};return a.support.transition?void this.$element[c](0).one("bsTransitionEnd",a.proxy(e,this)).emulateTransitionEnd(d.TRANSITION_DURATION):e.call(this)}}},d.prototype.toggle=function(){this[this.$element.hasClass("in")?"hide":"show"]()},d.prototype.getParent=function(){return a(this.options.parent).find('[data-toggle="collapse"][data-parent="'+this.options.parent+'"]').each(a.proxy(function(c,d){var e=a(d);this.addAriaAndCollapsedClass(b(e),e)},this)).end()},d.prototype.addAriaAndCollapsedClass=function(a,b){var c=a.hasClass("in");a.attr("aria-expanded",c),b.toggleClass("collapsed",!c).attr("aria-expanded",c)};var e=a.fn.collapse;a.fn.collapse=c,a.fn.collapse.Constructor=d,a.fn.collapse.noConflict=function(){return a.fn.collapse=e,this},a(document).on("click.bs.collapse.data-api",'[data-toggle="collapse"]',function(d){var e=a(this);e.attr("data-target")||d.preventDefault();var f=b(e),g=f.data("bs.collapse"),h=g?"toggle":e.data();c.call(f,h)})}(jQuery),+function(a){"use strict";function b(b){var c=b.attr("data-target");c||(c=b.attr("href"),c=c&&/#[A-Za-z]/.test(c)&&c.replace(/.*(?=#[^\s]*$)/,""));var d=c&&a(c);return d&&d.length?d:b.parent()}function c(c){c&&3===c.which||(a(e).remove(),a(f).each(function(){var d=a(this),e=b(d),f={relatedTarget:this};e.hasClass("open")&&(c&&"click"==c.type&&/input|textarea/i.test(c.target.tagName)&&a.contains(e[0],c.target)||(e.trigger(c=a.Event("hide.bs.dropdown",f)),c.isDefaultPrevented()||(d.attr("aria-expanded","false"),e.removeClass("open").trigger(a.Event("hidden.bs.dropdown",f)))))}))}function d(b){return this.each(function(){var c=a(this),d=c.data("bs.dropdown");d||c.data("bs.dropdown",d=new g(this)),"string"==typeof b&&d[b].call(c)})}var e=".dropdown-backdrop",f='[data-toggle="dropdown"]',g=function(b){a(b).on("click.bs.dropdown",this.toggle)};g.VERSION="3.3.6",g.prototype.toggle=function(d){var e=a(this);if(!e.is(".disabled, :disabled")){var f=b(e),g=f.hasClass("open");if(c(),!g){"ontouchstart"in document.documentElement&&!f.closest(".navbar-nav").length&&a(document.createElement("div")).addClass("dropdown-backdrop").insertAfter(a(this)).on("click",c);var h={relatedTarget:this};if(f.trigger(d=a.Event("show.bs.dropdown",h)),d.isDefaultPrevented())return;e.trigger("focus").attr("aria-expanded","true"),f.toggleClass("open").trigger(a.Event("shown.bs.dropdown",h))}return!1}},g.prototype.keydown=function(c){if(/(38|40|27|32)/.test(c.which)&&!/input|textarea/i.test(c.target.tagName)){var d=a(this);if(c.preventDefault(),c.stopPropagation(),!d.is(".disabled, :disabled")){var e=b(d),g=e.hasClass("open");if(!g&&27!=c.which||g&&27==c.which)return 27==c.which&&e.find(f).trigger("focus"),d.trigger("click");var h=" li:not(.disabled):visible a",i=e.find(".dropdown-menu"+h);if(i.length){var j=i.index(c.target);38==c.which&&j>0&&j--,40==c.which&&jdocument.documentElement.clientHeight;this.$element.css({paddingLeft:!this.bodyIsOverflowing&&a?this.scrollbarWidth:"",paddingRight:this.bodyIsOverflowing&&!a?this.scrollbarWidth:""})},c.prototype.resetAdjustments=function(){this.$element.css({paddingLeft:"",paddingRight:""})},c.prototype.checkScrollbar=function(){var a=window.innerWidth;if(!a){var b=document.documentElement.getBoundingClientRect();a=b.right-Math.abs(b.left)}this.bodyIsOverflowing=document.body.clientWidth',trigger:"hover focus",title:"",delay:0,html:!1,container:!1,viewport:{selector:"body",padding:0}},c.prototype.init=function(b,c,d){if(this.enabled=!0,this.type=b,this.$element=a(c),this.options=this.getOptions(d),this.$viewport=this.options.viewport&&a(a.isFunction(this.options.viewport)?this.options.viewport.call(this,this.$element):this.options.viewport.selector||this.options.viewport),this.inState={click:!1,hover:!1,focus:!1},this.$element[0]instanceof document.constructor&&!this.options.selector)throw new Error("`selector` option must be specified when initializing "+this.type+" on the window.document object!");for(var e=this.options.trigger.split(" "),f=e.length;f--;){var g=e[f];if("click"==g)this.$element.on("click."+this.type,this.options.selector,a.proxy(this.toggle,this));else if("manual"!=g){var h="hover"==g?"mouseenter":"focusin",i="hover"==g?"mouseleave":"focusout";this.$element.on(h+"."+this.type,this.options.selector,a.proxy(this.enter,this)),this.$element.on(i+"."+this.type,this.options.selector,a.proxy(this.leave,this))}}this.options.selector?this._options=a.extend({},this.options,{trigger:"manual",selector:""}):this.fixTitle()},c.prototype.getDefaults=function(){return c.DEFAULTS},c.prototype.getOptions=function(b){return b=a.extend({},this.getDefaults(),this.$element.data(),b),b.delay&&"number"==typeof b.delay&&(b.delay={show:b.delay,hide:b.delay}),b},c.prototype.getDelegateOptions=function(){var b={},c=this.getDefaults();return this._options&&a.each(this._options,function(a,d){c[a]!=d&&(b[a]=d)}),b},c.prototype.enter=function(b){var c=b instanceof this.constructor?b:a(b.currentTarget).data("bs."+this.type);return c||(c=new this.constructor(b.currentTarget,this.getDelegateOptions()),a(b.currentTarget).data("bs."+this.type,c)),b instanceof a.Event&&(c.inState["focusin"==b.type?"focus":"hover"]=!0),c.tip().hasClass("in")||"in"==c.hoverState?void(c.hoverState="in"):(clearTimeout(c.timeout),c.hoverState="in",c.options.delay&&c.options.delay.show?void(c.timeout=setTimeout(function(){"in"==c.hoverState&&c.show()},c.options.delay.show)):c.show())},c.prototype.isInStateTrue=function(){for(var a in this.inState)if(this.inState[a])return!0;return!1},c.prototype.leave=function(b){var c=b instanceof this.constructor?b:a(b.currentTarget).data("bs."+this.type);return c||(c=new this.constructor(b.currentTarget,this.getDelegateOptions()),a(b.currentTarget).data("bs."+this.type,c)),b instanceof a.Event&&(c.inState["focusout"==b.type?"focus":"hover"]=!1),c.isInStateTrue()?void 0:(clearTimeout(c.timeout),c.hoverState="out",c.options.delay&&c.options.delay.hide?void(c.timeout=setTimeout(function(){"out"==c.hoverState&&c.hide()},c.options.delay.hide)):c.hide())},c.prototype.show=function(){var b=a.Event("show.bs."+this.type);if(this.hasContent()&&this.enabled){this.$element.trigger(b);var d=a.contains(this.$element[0].ownerDocument.documentElement,this.$element[0]);if(b.isDefaultPrevented()||!d)return;var e=this,f=this.tip(),g=this.getUID(this.type);this.setContent(),f.attr("id",g),this.$element.attr("aria-describedby",g),this.options.animation&&f.addClass("fade");var h="function"==typeof this.options.placement?this.options.placement.call(this,f[0],this.$element[0]):this.options.placement,i=/\s?auto?\s?/i,j=i.test(h);j&&(h=h.replace(i,"")||"top"),f.detach().css({top:0,left:0,display:"block"}).addClass(h).data("bs."+this.type,this),this.options.container?f.appendTo(this.options.container):f.insertAfter(this.$element),this.$element.trigger("inserted.bs."+this.type);var k=this.getPosition(),l=f[0].offsetWidth,m=f[0].offsetHeight;if(j){var n=h,o=this.getPosition(this.$viewport);h="bottom"==h&&k.bottom+m>o.bottom?"top":"top"==h&&k.top-m o.width?"left":"left"==h&&k.left-l g.top+g.height&&(e.top=g.top+g.height-i)}else{var j=b.left-f,k=b.left+f+c;j g.right&&(e.left=g.left+g.width-k)}return e},c.prototype.getTitle=function(){var a,b=this.$element,c=this.options;return a=b.attr("data-original-title")||("function"==typeof c.title?c.title.call(b[0]):c.title)},c.prototype.getUID=function(a){do a+=~~(1e6*Math.random());while(document.getElementById(a));return a},c.prototype.tip=function(){if(!this.$tip&&(this.$tip=a(this.options.template),1!=this.$tip.length))throw new Error(this.type+" `template` option must consist of exactly 1 top-level element!");return this.$tip},c.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".tooltip-arrow")},c.prototype.enable=function(){this.enabled=!0},c.prototype.disable=function(){this.enabled=!1},c.prototype.toggleEnabled=function(){this.enabled=!this.enabled},c.prototype.toggle=function(b){var c=this;b&&(c=a(b.currentTarget).data("bs."+this.type),c||(c=new this.constructor(b.currentTarget,this.getDelegateOptions()),a(b.currentTarget).data("bs."+this.type,c))),b?(c.inState.click=!c.inState.click,c.isInStateTrue()?c.enter(c):c.leave(c)):c.tip().hasClass("in")?c.leave(c):c.enter(c)},c.prototype.destroy=function(){var a=this;clearTimeout(this.timeout),this.hide(function(){a.$element.off("."+a.type).removeData("bs."+a.type),a.$tip&&a.$tip.detach(),a.$tip=null,a.$arrow=null,a.$viewport=null})};var d=a.fn.tooltip;a.fn.tooltip=b,a.fn.tooltip.Constructor=c,a.fn.tooltip.noConflict=function(){return a.fn.tooltip=d,this}}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.popover"),f="object"==typeof b&&b;(e||!/destroy|hide/.test(b))&&(e||d.data("bs.popover",e=new c(this,f)),"string"==typeof b&&e[b]())})}var c=function(a,b){this.init("popover",a,b)};if(!a.fn.tooltip)throw new Error("Popover requires tooltip.js");c.VERSION="3.3.6",c.DEFAULTS=a.extend({},a.fn.tooltip.Constructor.DEFAULTS,{placement:"right",trigger:"click",content:"",template:' '}),c.prototype=a.extend({},a.fn.tooltip.Constructor.prototype),c.prototype.constructor=c,c.prototype.getDefaults=function(){return c.DEFAULTS},c.prototype.setContent=function(){var a=this.tip(),b=this.getTitle(),c=this.getContent();a.find(".popover-title")[this.options.html?"html":"text"](b),a.find(".popover-content").children().detach().end()[this.options.html?"string"==typeof c?"html":"append":"text"](c),a.removeClass("fade top bottom left right in"),a.find(".popover-title").html()||a.find(".popover-title").hide()},c.prototype.hasContent=function(){return this.getTitle()||this.getContent()},c.prototype.getContent=function(){var a=this.$element,b=this.options;return a.attr("data-content")||("function"==typeof b.content?b.content.call(a[0]):b.content)},c.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".arrow")};var d=a.fn.popover;a.fn.popover=b,a.fn.popover.Constructor=c,a.fn.popover.noConflict=function(){return a.fn.popover=d,this}}(jQuery),+function(a){"use strict";function b(c,d){this.$body=a(document.body),this.$scrollElement=a(a(c).is(document.body)?window:c),this.options=a.extend({},b.DEFAULTS,d),this.selector=(this.options.target||"")+" .nav li > a",this.offsets=[],this.targets=[],this.activeTarget=null,this.scrollHeight=0,this.$scrollElement.on("scroll.bs.scrollspy",a.proxy(this.process,this)),this.refresh(),this.process()}function c(c){return this.each(function(){var d=a(this),e=d.data("bs.scrollspy"),f="object"==typeof c&&c;e||d.data("bs.scrollspy",e=new b(this,f)),"string"==typeof c&&e[c]()})}b.VERSION="3.3.6",b.DEFAULTS={offset:10},b.prototype.getScrollHeight=function(){return this.$scrollElement[0].scrollHeight||Math.max(this.$body[0].scrollHeight,document.documentElement.scrollHeight)},b.prototype.refresh=function(){var b=this,c="offset",d=0;this.offsets=[],this.targets=[],this.scrollHeight=this.getScrollHeight(),a.isWindow(this.$scrollElement[0])||(c="position",d=this.$scrollElement.scrollTop()),this.$body.find(this.selector).map(function(){var b=a(this),e=b.data("target")||b.attr("href"),f=/^#./.test(e)&&a(e);return f&&f.length&&f.is(":visible")&&[[f[c]().top+d,e]]||null}).sort(function(a,b){return a[0]-b[0]}).each(function(){b.offsets.push(this[0]),b.targets.push(this[1])})},b.prototype.process=function(){var a,b=this.$scrollElement.scrollTop()+this.options.offset,c=this.getScrollHeight(),d=this.options.offset+c-this.$scrollElement.height(),e=this.offsets,f=this.targets,g=this.activeTarget;if(this.scrollHeight!=c&&this.refresh(),b>=d)return g!=(a=f[f.length-1])&&this.activate(a);if(g&&b=e[a]&&(void 0===e[a+1]||b .dropdown-menu > .active").removeClass("active").end().find('[data-toggle="tab"]').attr("aria-expanded",!1),b.addClass("active").find('[data-toggle="tab"]').attr("aria-expanded",!0),h?(b[0].offsetWidth,b.addClass("in")):b.removeClass("fade"),b.parent(".dropdown-menu").length&&b.closest("li.dropdown").addClass("active").end().find('[data-toggle="tab"]').attr("aria-expanded",!0),e&&e()}var g=d.find("> .active"),h=e&&a.support.transition&&(g.length&&g.hasClass("fade")||!!d.find("> .fade").length);g.length&&h?g.one("bsTransitionEnd",f).emulateTransitionEnd(c.TRANSITION_DURATION):f(),g.removeClass("in")};var d=a.fn.tab;a.fn.tab=b,a.fn.tab.Constructor=c,a.fn.tab.noConflict=function(){return a.fn.tab=d,this};var e=function(c){c.preventDefault(),b.call(a(this),"show")};a(document).on("click.bs.tab.data-api",'[data-toggle="tab"]',e).on("click.bs.tab.data-api",'[data-toggle="pill"]',e)}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.affix"),f="object"==typeof b&&b;e||d.data("bs.affix",e=new c(this,f)),"string"==typeof b&&e[b]()})}var c=function(b,d){this.options=a.extend({},c.DEFAULTS,d),this.$target=a(this.options.target).on("scroll.bs.affix.data-api",a.proxy(this.checkPosition,this)).on("click.bs.affix.data-api",a.proxy(this.checkPositionWithEventLoop,this)),this.$element=a(b),this.affixed=null,this.unpin=null,this.pinnedOffset=null,this.checkPosition()};c.VERSION="3.3.6",c.RESET="affix affix-top affix-bottom",c.DEFAULTS={offset:0,target:window},c.prototype.getState=function(a,b,c,d){var e=this.$target.scrollTop(),f=this.$element.offset(),g=this.$target.height();if(null!=c&&"top"==this.affixed)return c>e?"top":!1;if("bottom"==this.affixed)return null!=c?e+this.unpin<=f.top?!1:"bottom":a-d>=e+g?!1:"bottom";var h=null==this.affixed,i=h?e:f.top,j=h?g:b;return null!=c&&c>=e?"top":null!=d&&i+j>=a-d?"bottom":!1},c.prototype.getPinnedOffset=function(){if(this.pinnedOffset)return this.pinnedOffset;this.$element.removeClass(c.RESET).addClass("affix");var a=this.$target.scrollTop(),b=this.$element.offset();return this.pinnedOffset=b.top-a},c.prototype.checkPositionWithEventLoop=function(){setTimeout(a.proxy(this.checkPosition,this),1)},c.prototype.checkPosition=function(){if(this.$element.is(":visible")){var b=this.$element.height(),d=this.options.offset,e=d.top,f=d.bottom,g=Math.max(a(document).height(),a(document.body).height());"object"!=typeof d&&(f=e=d),"function"==typeof e&&(e=d.top(this.$element)),"function"==typeof f&&(f=d.bottom(this.$element));var h=this.getState(g,b,e,f);if(this.affixed!=h){null!=this.unpin&&this.$element.css("top","");var i="affix"+(h?"-"+h:""),j=a.Event(i+".bs.affix");if(this.$element.trigger(j),j.isDefaultPrevented())return;this.affixed=h,this.unpin="bottom"==h?this.getPinnedOffset():null,this.$element.removeClass(c.RESET).addClass(i).trigger(i.replace("affix","affixed")+".bs.affix")}"bottom"==h&&this.$element.offset({top:g-b-f})}};var d=a.fn.affix;a.fn.affix=b,a.fn.affix.Constructor=c,a.fn.affix.noConflict=function(){return a.fn.affix=d,this},a(window).on("load",function(){a('[data-spy="affix"]').each(function(){var c=a(this),d=c.data();d.offset=d.offset||{},null!=d.offsetBottom&&(d.offset.bottom=d.offsetBottom),null!=d.offsetTop&&(d.offset.top=d.offsetTop),b.call(c,d)})})}(jQuery); \ No newline at end of file diff --git a/odex25_takaful/takaful_portal_sponsor/static/libs/bootstrap3/jquery.min.js b/odex25_takaful/takaful_portal_sponsor/static/libs/bootstrap3/jquery.min.js new file mode 100644 index 000000000..b0ecaddee --- /dev/null +++ b/odex25_takaful/takaful_portal_sponsor/static/libs/bootstrap3/jquery.min.js @@ -0,0 +1,5 @@ +/*! jQuery v1.12.4 | (c) jQuery Foundation | jquery.org/license */ +!function(a,b){"object"==typeof module&&"object"==typeof module.exports?module.exports=a.document?b(a,!0):function(a){if(!a.document)throw new Error("jQuery requires a window with a document");return b(a)}:b(a)}("undefined"!=typeof window?window:this,function(a,b){var c=[],d=a.document,e=c.slice,f=c.concat,g=c.push,h=c.indexOf,i={},j=i.toString,k=i.hasOwnProperty,l={},m="1.12.4",n=function(a,b){return new n.fn.init(a,b)},o=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,p=/^-ms-/,q=/-([\da-z])/gi,r=function(a,b){return b.toUpperCase()};n.fn=n.prototype={jquery:m,constructor:n,selector:"",length:0,toArray:function(){return e.call(this)},get:function(a){return null!=a?0>a?this[a+this.length]:this[a]:e.call(this)},pushStack:function(a){var b=n.merge(this.constructor(),a);return b.prevObject=this,b.context=this.context,b},each:function(a){return n.each(this,a)},map:function(a){return this.pushStack(n.map(this,function(b,c){return a.call(b,c,b)}))},slice:function(){return this.pushStack(e.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(a){var b=this.length,c=+a+(0>a?b:0);return this.pushStack(c>=0&&b>c?[this[c]]:[])},end:function(){return this.prevObject||this.constructor()},push:g,sort:c.sort,splice:c.splice},n.extend=n.fn.extend=function(){var a,b,c,d,e,f,g=arguments[0]||{},h=1,i=arguments.length,j=!1;for("boolean"==typeof g&&(j=g,g=arguments[h]||{},h++),"object"==typeof g||n.isFunction(g)||(g={}),h===i&&(g=this,h--);i>h;h++)if(null!=(e=arguments[h]))for(d in e)a=g[d],c=e[d],g!==c&&(j&&c&&(n.isPlainObject(c)||(b=n.isArray(c)))?(b?(b=!1,f=a&&n.isArray(a)?a:[]):f=a&&n.isPlainObject(a)?a:{},g[d]=n.extend(j,f,c)):void 0!==c&&(g[d]=c));return g},n.extend({expando:"jQuery"+(m+Math.random()).replace(/\D/g,""),isReady:!0,error:function(a){throw new Error(a)},noop:function(){},isFunction:function(a){return"function"===n.type(a)},isArray:Array.isArray||function(a){return"array"===n.type(a)},isWindow:function(a){return null!=a&&a==a.window},isNumeric:function(a){var b=a&&a.toString();return!n.isArray(a)&&b-parseFloat(b)+1>=0},isEmptyObject:function(a){var b;for(b in a)return!1;return!0},isPlainObject:function(a){var b;if(!a||"object"!==n.type(a)||a.nodeType||n.isWindow(a))return!1;try{if(a.constructor&&!k.call(a,"constructor")&&!k.call(a.constructor.prototype,"isPrototypeOf"))return!1}catch(c){return!1}if(!l.ownFirst)for(b in a)return k.call(a,b);for(b in a);return void 0===b||k.call(a,b)},type:function(a){return null==a?a+"":"object"==typeof a||"function"==typeof a?i[j.call(a)]||"object":typeof a},globalEval:function(b){b&&n.trim(b)&&(a.execScript||function(b){a.eval.call(a,b)})(b)},camelCase:function(a){return a.replace(p,"ms-").replace(q,r)},nodeName:function(a,b){return a.nodeName&&a.nodeName.toLowerCase()===b.toLowerCase()},each:function(a,b){var c,d=0;if(s(a)){for(c=a.length;c>d;d++)if(b.call(a[d],d,a[d])===!1)break}else for(d in a)if(b.call(a[d],d,a[d])===!1)break;return a},trim:function(a){return null==a?"":(a+"").replace(o,"")},makeArray:function(a,b){var c=b||[];return null!=a&&(s(Object(a))?n.merge(c,"string"==typeof a?[a]:a):g.call(c,a)),c},inArray:function(a,b,c){var d;if(b){if(h)return h.call(b,a,c);for(d=b.length,c=c?0>c?Math.max(0,d+c):c:0;d>c;c++)if(c in b&&b[c]===a)return c}return-1},merge:function(a,b){var c=+b.length,d=0,e=a.length;while(c>d)a[e++]=b[d++];if(c!==c)while(void 0!==b[d])a[e++]=b[d++];return a.length=e,a},grep:function(a,b,c){for(var d,e=[],f=0,g=a.length,h=!c;g>f;f++)d=!b(a[f],f),d!==h&&e.push(a[f]);return e},map:function(a,b,c){var d,e,g=0,h=[];if(s(a))for(d=a.length;d>g;g++)e=b(a[g],g,c),null!=e&&h.push(e);else for(g in a)e=b(a[g],g,c),null!=e&&h.push(e);return f.apply([],h)},guid:1,proxy:function(a,b){var c,d,f;return"string"==typeof b&&(f=a[b],b=a,a=f),n.isFunction(a)?(c=e.call(arguments,2),d=function(){return a.apply(b||this,c.concat(e.call(arguments)))},d.guid=a.guid=a.guid||n.guid++,d):void 0},now:function(){return+new Date},support:l}),"function"==typeof Symbol&&(n.fn[Symbol.iterator]=c[Symbol.iterator]),n.each("Boolean Number String Function Array Date RegExp Object Error Symbol".split(" "),function(a,b){i["[object "+b+"]"]=b.toLowerCase()});function s(a){var b=!!a&&"length"in a&&a.length,c=n.type(a);return"function"===c||n.isWindow(a)?!1:"array"===c||0===b||"number"==typeof b&&b>0&&b-1 in a}var t=function(a){var b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u="sizzle"+1*new Date,v=a.document,w=0,x=0,y=ga(),z=ga(),A=ga(),B=function(a,b){return a===b&&(l=!0),0},C=1<<31,D={}.hasOwnProperty,E=[],F=E.pop,G=E.push,H=E.push,I=E.slice,J=function(a,b){for(var c=0,d=a.length;d>c;c++)if(a[c]===b)return c;return-1},K="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",L="[\\x20\\t\\r\\n\\f]",M="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",N="\\["+L+"*("+M+")(?:"+L+"*([*^$|!~]?=)"+L+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+M+"))|)"+L+"*\\]",O=":("+M+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+N+")*)|.*)\\)|)",P=new RegExp(L+"+","g"),Q=new RegExp("^"+L+"+|((?:^|[^\\\\])(?:\\\\.)*)"+L+"+$","g"),R=new RegExp("^"+L+"*,"+L+"*"),S=new RegExp("^"+L+"*([>+~]|"+L+")"+L+"*"),T=new RegExp("="+L+"*([^\\]'\"]*?)"+L+"*\\]","g"),U=new RegExp(O),V=new RegExp("^"+M+"$"),W={ID:new RegExp("^#("+M+")"),CLASS:new RegExp("^\\.("+M+")"),TAG:new RegExp("^("+M+"|[*])"),ATTR:new RegExp("^"+N),PSEUDO:new RegExp("^"+O),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+L+"*(even|odd|(([+-]|)(\\d*)n|)"+L+"*(?:([+-]|)"+L+"*(\\d+)|))"+L+"*\\)|)","i"),bool:new RegExp("^(?:"+K+")$","i"),needsContext:new RegExp("^"+L+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+L+"*((?:-\\d)?\\d*)"+L+"*\\)|)(?=[^-]|$)","i")},X=/^(?:input|select|textarea|button)$/i,Y=/^h\d$/i,Z=/^[^{]+\{\s*\[native \w/,$=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,_=/[+~]/,aa=/'|\\/g,ba=new RegExp("\\\\([\\da-f]{1,6}"+L+"?|("+L+")|.)","ig"),ca=function(a,b,c){var d="0x"+b-65536;return d!==d||c?b:0>d?String.fromCharCode(d+65536):String.fromCharCode(d>>10|55296,1023&d|56320)},da=function(){m()};try{H.apply(E=I.call(v.childNodes),v.childNodes),E[v.childNodes.length].nodeType}catch(ea){H={apply:E.length?function(a,b){G.apply(a,I.call(b))}:function(a,b){var c=a.length,d=0;while(a[c++]=b[d++]);a.length=c-1}}}function fa(a,b,d,e){var f,h,j,k,l,o,r,s,w=b&&b.ownerDocument,x=b?b.nodeType:9;if(d=d||[],"string"!=typeof a||!a||1!==x&&9!==x&&11!==x)return d;if(!e&&((b?b.ownerDocument||b:v)!==n&&m(b),b=b||n,p)){if(11!==x&&(o=$.exec(a)))if(f=o[1]){if(9===x){if(!(j=b.getElementById(f)))return d;if(j.id===f)return d.push(j),d}else if(w&&(j=w.getElementById(f))&&t(b,j)&&j.id===f)return d.push(j),d}else{if(o[2])return H.apply(d,b.getElementsByTagName(a)),d;if((f=o[3])&&c.getElementsByClassName&&b.getElementsByClassName)return H.apply(d,b.getElementsByClassName(f)),d}if(c.qsa&&!A[a+" "]&&(!q||!q.test(a))){if(1!==x)w=b,s=a;else if("object"!==b.nodeName.toLowerCase()){(k=b.getAttribute("id"))?k=k.replace(aa,"\\$&"):b.setAttribute("id",k=u),r=g(a),h=r.length,l=V.test(k)?"#"+k:"[id='"+k+"']";while(h--)r[h]=l+" "+qa(r[h]);s=r.join(","),w=_.test(a)&&oa(b.parentNode)||b}if(s)try{return H.apply(d,w.querySelectorAll(s)),d}catch(y){}finally{k===u&&b.removeAttribute("id")}}}return i(a.replace(Q,"$1"),b,d,e)}function ga(){var a=[];function b(c,e){return a.push(c+" ")>d.cacheLength&&delete b[a.shift()],b[c+" "]=e}return b}function ha(a){return a[u]=!0,a}function ia(a){var b=n.createElement("div");try{return!!a(b)}catch(c){return!1}finally{b.parentNode&&b.parentNode.removeChild(b),b=null}}function ja(a,b){var c=a.split("|"),e=c.length;while(e--)d.attrHandle[c[e]]=b}function ka(a,b){var c=b&&a,d=c&&1===a.nodeType&&1===b.nodeType&&(~b.sourceIndex||C)-(~a.sourceIndex||C);if(d)return d;if(c)while(c=c.nextSibling)if(c===b)return-1;return a?1:-1}function la(a){return function(b){var c=b.nodeName.toLowerCase();return"input"===c&&b.type===a}}function ma(a){return function(b){var c=b.nodeName.toLowerCase();return("input"===c||"button"===c)&&b.type===a}}function na(a){return ha(function(b){return b=+b,ha(function(c,d){var e,f=a([],c.length,b),g=f.length;while(g--)c[e=f[g]]&&(c[e]=!(d[e]=c[e]))})})}function oa(a){return a&&"undefined"!=typeof a.getElementsByTagName&&a}c=fa.support={},f=fa.isXML=function(a){var b=a&&(a.ownerDocument||a).documentElement;return b?"HTML"!==b.nodeName:!1},m=fa.setDocument=function(a){var b,e,g=a?a.ownerDocument||a:v;return g!==n&&9===g.nodeType&&g.documentElement?(n=g,o=n.documentElement,p=!f(n),(e=n.defaultView)&&e.top!==e&&(e.addEventListener?e.addEventListener("unload",da,!1):e.attachEvent&&e.attachEvent("onunload",da)),c.attributes=ia(function(a){return a.className="i",!a.getAttribute("className")}),c.getElementsByTagName=ia(function(a){return a.appendChild(n.createComment("")),!a.getElementsByTagName("*").length}),c.getElementsByClassName=Z.test(n.getElementsByClassName),c.getById=ia(function(a){return o.appendChild(a).id=u,!n.getElementsByName||!n.getElementsByName(u).length}),c.getById?(d.find.ID=function(a,b){if("undefined"!=typeof b.getElementById&&p){var c=b.getElementById(a);return c?[c]:[]}},d.filter.ID=function(a){var b=a.replace(ba,ca);return function(a){return a.getAttribute("id")===b}}):(delete d.find.ID,d.filter.ID=function(a){var b=a.replace(ba,ca);return function(a){var c="undefined"!=typeof a.getAttributeNode&&a.getAttributeNode("id");return c&&c.value===b}}),d.find.TAG=c.getElementsByTagName?function(a,b){return"undefined"!=typeof b.getElementsByTagName?b.getElementsByTagName(a):c.qsa?b.querySelectorAll(a):void 0}:function(a,b){var c,d=[],e=0,f=b.getElementsByTagName(a);if("*"===a){while(c=f[e++])1===c.nodeType&&d.push(c);return d}return f},d.find.CLASS=c.getElementsByClassName&&function(a,b){return"undefined"!=typeof b.getElementsByClassName&&p?b.getElementsByClassName(a):void 0},r=[],q=[],(c.qsa=Z.test(n.querySelectorAll))&&(ia(function(a){o.appendChild(a).innerHTML="",a.querySelectorAll("[msallowcapture^='']").length&&q.push("[*^$]="+L+"*(?:''|\"\")"),a.querySelectorAll("[selected]").length||q.push("\\["+L+"*(?:value|"+K+")"),a.querySelectorAll("[id~="+u+"-]").length||q.push("~="),a.querySelectorAll(":checked").length||q.push(":checked"),a.querySelectorAll("a#"+u+"+*").length||q.push(".#.+[+~]")}),ia(function(a){var b=n.createElement("input");b.setAttribute("type","hidden"),a.appendChild(b).setAttribute("name","D"),a.querySelectorAll("[name=d]").length&&q.push("name"+L+"*[*^$|!~]?="),a.querySelectorAll(":enabled").length||q.push(":enabled",":disabled"),a.querySelectorAll("*,:x"),q.push(",.*:")})),(c.matchesSelector=Z.test(s=o.matches||o.webkitMatchesSelector||o.mozMatchesSelector||o.oMatchesSelector||o.msMatchesSelector))&&ia(function(a){c.disconnectedMatch=s.call(a,"div"),s.call(a,"[s!='']:x"),r.push("!=",O)}),q=q.length&&new RegExp(q.join("|")),r=r.length&&new RegExp(r.join("|")),b=Z.test(o.compareDocumentPosition),t=b||Z.test(o.contains)?function(a,b){var c=9===a.nodeType?a.documentElement:a,d=b&&b.parentNode;return a===d||!(!d||1!==d.nodeType||!(c.contains?c.contains(d):a.compareDocumentPosition&&16&a.compareDocumentPosition(d)))}:function(a,b){if(b)while(b=b.parentNode)if(b===a)return!0;return!1},B=b?function(a,b){if(a===b)return l=!0,0;var d=!a.compareDocumentPosition-!b.compareDocumentPosition;return d?d:(d=(a.ownerDocument||a)===(b.ownerDocument||b)?a.compareDocumentPosition(b):1,1&d||!c.sortDetached&&b.compareDocumentPosition(a)===d?a===n||a.ownerDocument===v&&t(v,a)?-1:b===n||b.ownerDocument===v&&t(v,b)?1:k?J(k,a)-J(k,b):0:4&d?-1:1)}:function(a,b){if(a===b)return l=!0,0;var c,d=0,e=a.parentNode,f=b.parentNode,g=[a],h=[b];if(!e||!f)return a===n?-1:b===n?1:e?-1:f?1:k?J(k,a)-J(k,b):0;if(e===f)return ka(a,b);c=a;while(c=c.parentNode)g.unshift(c);c=b;while(c=c.parentNode)h.unshift(c);while(g[d]===h[d])d++;return d?ka(g[d],h[d]):g[d]===v?-1:h[d]===v?1:0},n):n},fa.matches=function(a,b){return fa(a,null,null,b)},fa.matchesSelector=function(a,b){if((a.ownerDocument||a)!==n&&m(a),b=b.replace(T,"='$1']"),c.matchesSelector&&p&&!A[b+" "]&&(!r||!r.test(b))&&(!q||!q.test(b)))try{var d=s.call(a,b);if(d||c.disconnectedMatch||a.document&&11!==a.document.nodeType)return d}catch(e){}return fa(b,n,null,[a]).length>0},fa.contains=function(a,b){return(a.ownerDocument||a)!==n&&m(a),t(a,b)},fa.attr=function(a,b){(a.ownerDocument||a)!==n&&m(a);var e=d.attrHandle[b.toLowerCase()],f=e&&D.call(d.attrHandle,b.toLowerCase())?e(a,b,!p):void 0;return void 0!==f?f:c.attributes||!p?a.getAttribute(b):(f=a.getAttributeNode(b))&&f.specified?f.value:null},fa.error=function(a){throw new Error("Syntax error, unrecognized expression: "+a)},fa.uniqueSort=function(a){var b,d=[],e=0,f=0;if(l=!c.detectDuplicates,k=!c.sortStable&&a.slice(0),a.sort(B),l){while(b=a[f++])b===a[f]&&(e=d.push(f));while(e--)a.splice(d[e],1)}return k=null,a},e=fa.getText=function(a){var b,c="",d=0,f=a.nodeType;if(f){if(1===f||9===f||11===f){if("string"==typeof a.textContent)return a.textContent;for(a=a.firstChild;a;a=a.nextSibling)c+=e(a)}else if(3===f||4===f)return a.nodeValue}else while(b=a[d++])c+=e(b);return c},d=fa.selectors={cacheLength:50,createPseudo:ha,match:W,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(a){return a[1]=a[1].replace(ba,ca),a[3]=(a[3]||a[4]||a[5]||"").replace(ba,ca),"~="===a[2]&&(a[3]=" "+a[3]+" "),a.slice(0,4)},CHILD:function(a){return a[1]=a[1].toLowerCase(),"nth"===a[1].slice(0,3)?(a[3]||fa.error(a[0]),a[4]=+(a[4]?a[5]+(a[6]||1):2*("even"===a[3]||"odd"===a[3])),a[5]=+(a[7]+a[8]||"odd"===a[3])):a[3]&&fa.error(a[0]),a},PSEUDO:function(a){var b,c=!a[6]&&a[2];return W.CHILD.test(a[0])?null:(a[3]?a[2]=a[4]||a[5]||"":c&&U.test(c)&&(b=g(c,!0))&&(b=c.indexOf(")",c.length-b)-c.length)&&(a[0]=a[0].slice(0,b),a[2]=c.slice(0,b)),a.slice(0,3))}},filter:{TAG:function(a){var b=a.replace(ba,ca).toLowerCase();return"*"===a?function(){return!0}:function(a){return a.nodeName&&a.nodeName.toLowerCase()===b}},CLASS:function(a){var b=y[a+" "];return b||(b=new RegExp("(^|"+L+")"+a+"("+L+"|$)"))&&y(a,function(a){return b.test("string"==typeof a.className&&a.className||"undefined"!=typeof a.getAttribute&&a.getAttribute("class")||"")})},ATTR:function(a,b,c){return function(d){var e=fa.attr(d,a);return null==e?"!="===b:b?(e+="","="===b?e===c:"!="===b?e!==c:"^="===b?c&&0===e.indexOf(c):"*="===b?c&&e.indexOf(c)>-1:"$="===b?c&&e.slice(-c.length)===c:"~="===b?(" "+e.replace(P," ")+" ").indexOf(c)>-1:"|="===b?e===c||e.slice(0,c.length+1)===c+"-":!1):!0}},CHILD:function(a,b,c,d,e){var f="nth"!==a.slice(0,3),g="last"!==a.slice(-4),h="of-type"===b;return 1===d&&0===e?function(a){return!!a.parentNode}:function(b,c,i){var j,k,l,m,n,o,p=f!==g?"nextSibling":"previousSibling",q=b.parentNode,r=h&&b.nodeName.toLowerCase(),s=!i&&!h,t=!1;if(q){if(f){while(p){m=b;while(m=m[p])if(h?m.nodeName.toLowerCase()===r:1===m.nodeType)return!1;o=p="only"===a&&!o&&"nextSibling"}return!0}if(o=[g?q.firstChild:q.lastChild],g&&s){m=q,l=m[u]||(m[u]={}),k=l[m.uniqueID]||(l[m.uniqueID]={}),j=k[a]||[],n=j[0]===w&&j[1],t=n&&j[2],m=n&&q.childNodes[n];while(m=++n&&m&&m[p]||(t=n=0)||o.pop())if(1===m.nodeType&&++t&&m===b){k[a]=[w,n,t];break}}else if(s&&(m=b,l=m[u]||(m[u]={}),k=l[m.uniqueID]||(l[m.uniqueID]={}),j=k[a]||[],n=j[0]===w&&j[1],t=n),t===!1)while(m=++n&&m&&m[p]||(t=n=0)||o.pop())if((h?m.nodeName.toLowerCase()===r:1===m.nodeType)&&++t&&(s&&(l=m[u]||(m[u]={}),k=l[m.uniqueID]||(l[m.uniqueID]={}),k[a]=[w,t]),m===b))break;return t-=e,t===d||t%d===0&&t/d>=0}}},PSEUDO:function(a,b){var c,e=d.pseudos[a]||d.setFilters[a.toLowerCase()]||fa.error("unsupported pseudo: "+a);return e[u]?e(b):e.length>1?(c=[a,a,"",b],d.setFilters.hasOwnProperty(a.toLowerCase())?ha(function(a,c){var d,f=e(a,b),g=f.length;while(g--)d=J(a,f[g]),a[d]=!(c[d]=f[g])}):function(a){return e(a,0,c)}):e}},pseudos:{not:ha(function(a){var b=[],c=[],d=h(a.replace(Q,"$1"));return d[u]?ha(function(a,b,c,e){var f,g=d(a,null,e,[]),h=a.length;while(h--)(f=g[h])&&(a[h]=!(b[h]=f))}):function(a,e,f){return b[0]=a,d(b,null,f,c),b[0]=null,!c.pop()}}),has:ha(function(a){return function(b){return fa(a,b).length>0}}),contains:ha(function(a){return a=a.replace(ba,ca),function(b){return(b.textContent||b.innerText||e(b)).indexOf(a)>-1}}),lang:ha(function(a){return V.test(a||"")||fa.error("unsupported lang: "+a),a=a.replace(ba,ca).toLowerCase(),function(b){var c;do if(c=p?b.lang:b.getAttribute("xml:lang")||b.getAttribute("lang"))return c=c.toLowerCase(),c===a||0===c.indexOf(a+"-");while((b=b.parentNode)&&1===b.nodeType);return!1}}),target:function(b){var c=a.location&&a.location.hash;return c&&c.slice(1)===b.id},root:function(a){return a===o},focus:function(a){return a===n.activeElement&&(!n.hasFocus||n.hasFocus())&&!!(a.type||a.href||~a.tabIndex)},enabled:function(a){return a.disabled===!1},disabled:function(a){return a.disabled===!0},checked:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&!!a.checked||"option"===b&&!!a.selected},selected:function(a){return a.parentNode&&a.parentNode.selectedIndex,a.selected===!0},empty:function(a){for(a=a.firstChild;a;a=a.nextSibling)if(a.nodeType<6)return!1;return!0},parent:function(a){return!d.pseudos.empty(a)},header:function(a){return Y.test(a.nodeName)},input:function(a){return X.test(a.nodeName)},button:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&"button"===a.type||"button"===b},text:function(a){var b;return"input"===a.nodeName.toLowerCase()&&"text"===a.type&&(null==(b=a.getAttribute("type"))||"text"===b.toLowerCase())},first:na(function(){return[0]}),last:na(function(a,b){return[b-1]}),eq:na(function(a,b,c){return[0>c?c+b:c]}),even:na(function(a,b){for(var c=0;b>c;c+=2)a.push(c);return a}),odd:na(function(a,b){for(var c=1;b>c;c+=2)a.push(c);return a}),lt:na(function(a,b,c){for(var d=0>c?c+b:c;--d>=0;)a.push(d);return a}),gt:na(function(a,b,c){for(var d=0>c?c+b:c;++db;b++)d+=a[b].value;return d}function ra(a,b,c){var d=b.dir,e=c&&"parentNode"===d,f=x++;return b.first?function(b,c,f){while(b=b[d])if(1===b.nodeType||e)return a(b,c,f)}:function(b,c,g){var h,i,j,k=[w,f];if(g){while(b=b[d])if((1===b.nodeType||e)&&a(b,c,g))return!0}else while(b=b[d])if(1===b.nodeType||e){if(j=b[u]||(b[u]={}),i=j[b.uniqueID]||(j[b.uniqueID]={}),(h=i[d])&&h[0]===w&&h[1]===f)return k[2]=h[2];if(i[d]=k,k[2]=a(b,c,g))return!0}}}function sa(a){return a.length>1?function(b,c,d){var e=a.length;while(e--)if(!a[e](b,c,d))return!1;return!0}:a[0]}function ta(a,b,c){for(var d=0,e=b.length;e>d;d++)fa(a,b[d],c);return c}function ua(a,b,c,d,e){for(var f,g=[],h=0,i=a.length,j=null!=b;i>h;h++)(f=a[h])&&(c&&!c(f,d,e)||(g.push(f),j&&b.push(h)));return g}function va(a,b,c,d,e,f){return d&&!d[u]&&(d=va(d)),e&&!e[u]&&(e=va(e,f)),ha(function(f,g,h,i){var j,k,l,m=[],n=[],o=g.length,p=f||ta(b||"*",h.nodeType?[h]:h,[]),q=!a||!f&&b?p:ua(p,m,a,h,i),r=c?e||(f?a:o||d)?[]:g:q;if(c&&c(q,r,h,i),d){j=ua(r,n),d(j,[],h,i),k=j.length;while(k--)(l=j[k])&&(r[n[k]]=!(q[n[k]]=l))}if(f){if(e||a){if(e){j=[],k=r.length;while(k--)(l=r[k])&&j.push(q[k]=l);e(null,r=[],j,i)}k=r.length;while(k--)(l=r[k])&&(j=e?J(f,l):m[k])>-1&&(f[j]=!(g[j]=l))}}else r=ua(r===g?r.splice(o,r.length):r),e?e(null,g,r,i):H.apply(g,r)})}function wa(a){for(var b,c,e,f=a.length,g=d.relative[a[0].type],h=g||d.relative[" "],i=g?1:0,k=ra(function(a){return a===b},h,!0),l=ra(function(a){return J(b,a)>-1},h,!0),m=[function(a,c,d){var e=!g&&(d||c!==j)||((b=c).nodeType?k(a,c,d):l(a,c,d));return b=null,e}];f>i;i++)if(c=d.relative[a[i].type])m=[ra(sa(m),c)];else{if(c=d.filter[a[i].type].apply(null,a[i].matches),c[u]){for(e=++i;f>e;e++)if(d.relative[a[e].type])break;return va(i>1&&sa(m),i>1&&qa(a.slice(0,i-1).concat({value:" "===a[i-2].type?"*":""})).replace(Q,"$1"),c,e>i&&wa(a.slice(i,e)),f>e&&wa(a=a.slice(e)),f>e&&qa(a))}m.push(c)}return sa(m)}function xa(a,b){var c=b.length>0,e=a.length>0,f=function(f,g,h,i,k){var l,o,q,r=0,s="0",t=f&&[],u=[],v=j,x=f||e&&d.find.TAG("*",k),y=w+=null==v?1:Math.random()||.1,z=x.length;for(k&&(j=g===n||g||k);s!==z&&null!=(l=x[s]);s++){if(e&&l){o=0,g||l.ownerDocument===n||(m(l),h=!p);while(q=a[o++])if(q(l,g||n,h)){i.push(l);break}k&&(w=y)}c&&((l=!q&&l)&&r--,f&&t.push(l))}if(r+=s,c&&s!==r){o=0;while(q=b[o++])q(t,u,g,h);if(f){if(r>0)while(s--)t[s]||u[s]||(u[s]=F.call(i));u=ua(u)}H.apply(i,u),k&&!f&&u.length>0&&r+b.length>1&&fa.uniqueSort(i)}return k&&(w=y,j=v),t};return c?ha(f):f}return h=fa.compile=function(a,b){var c,d=[],e=[],f=A[a+" "];if(!f){b||(b=g(a)),c=b.length;while(c--)f=wa(b[c]),f[u]?d.push(f):e.push(f);f=A(a,xa(e,d)),f.selector=a}return f},i=fa.select=function(a,b,e,f){var i,j,k,l,m,n="function"==typeof a&&a,o=!f&&g(a=n.selector||a);if(e=e||[],1===o.length){if(j=o[0]=o[0].slice(0),j.length>2&&"ID"===(k=j[0]).type&&c.getById&&9===b.nodeType&&p&&d.relative[j[1].type]){if(b=(d.find.ID(k.matches[0].replace(ba,ca),b)||[])[0],!b)return e;n&&(b=b.parentNode),a=a.slice(j.shift().value.length)}i=W.needsContext.test(a)?0:j.length;while(i--){if(k=j[i],d.relative[l=k.type])break;if((m=d.find[l])&&(f=m(k.matches[0].replace(ba,ca),_.test(j[0].type)&&oa(b.parentNode)||b))){if(j.splice(i,1),a=f.length&&qa(j),!a)return H.apply(e,f),e;break}}}return(n||h(a,o))(f,b,!p,e,!b||_.test(a)&&oa(b.parentNode)||b),e},c.sortStable=u.split("").sort(B).join("")===u,c.detectDuplicates=!!l,m(),c.sortDetached=ia(function(a){return 1&a.compareDocumentPosition(n.createElement("div"))}),ia(function(a){return a.innerHTML="","#"===a.firstChild.getAttribute("href")})||ja("type|href|height|width",function(a,b,c){return c?void 0:a.getAttribute(b,"type"===b.toLowerCase()?1:2)}),c.attributes&&ia(function(a){return a.innerHTML="",a.firstChild.setAttribute("value",""),""===a.firstChild.getAttribute("value")})||ja("value",function(a,b,c){return c||"input"!==a.nodeName.toLowerCase()?void 0:a.defaultValue}),ia(function(a){return null==a.getAttribute("disabled")})||ja(K,function(a,b,c){var d;return c?void 0:a[b]===!0?b.toLowerCase():(d=a.getAttributeNode(b))&&d.specified?d.value:null}),fa}(a);n.find=t,n.expr=t.selectors,n.expr[":"]=n.expr.pseudos,n.uniqueSort=n.unique=t.uniqueSort,n.text=t.getText,n.isXMLDoc=t.isXML,n.contains=t.contains;var u=function(a,b,c){var d=[],e=void 0!==c;while((a=a[b])&&9!==a.nodeType)if(1===a.nodeType){if(e&&n(a).is(c))break;d.push(a)}return d},v=function(a,b){for(var c=[];a;a=a.nextSibling)1===a.nodeType&&a!==b&&c.push(a);return c},w=n.expr.match.needsContext,x=/^<([\w-]+)\s*\/?>(?:<\/\1>|)$/,y=/^.[^:#\[\.,]*$/;function z(a,b,c){if(n.isFunction(b))return n.grep(a,function(a,d){return!!b.call(a,d,a)!==c});if(b.nodeType)return n.grep(a,function(a){return a===b!==c});if("string"==typeof b){if(y.test(b))return n.filter(b,a,c);b=n.filter(b,a)}return n.grep(a,function(a){return n.inArray(a,b)>-1!==c})}n.filter=function(a,b,c){var d=b[0];return c&&(a=":not("+a+")"),1===b.length&&1===d.nodeType?n.find.matchesSelector(d,a)?[d]:[]:n.find.matches(a,n.grep(b,function(a){return 1===a.nodeType}))},n.fn.extend({find:function(a){var b,c=[],d=this,e=d.length;if("string"!=typeof a)return this.pushStack(n(a).filter(function(){for(b=0;e>b;b++)if(n.contains(d[b],this))return!0}));for(b=0;e>b;b++)n.find(a,d[b],c);return c=this.pushStack(e>1?n.unique(c):c),c.selector=this.selector?this.selector+" "+a:a,c},filter:function(a){return this.pushStack(z(this,a||[],!1))},not:function(a){return this.pushStack(z(this,a||[],!0))},is:function(a){return!!z(this,"string"==typeof a&&w.test(a)?n(a):a||[],!1).length}});var A,B=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/,C=n.fn.init=function(a,b,c){var e,f;if(!a)return this;if(c=c||A,"string"==typeof a){if(e="<"===a.charAt(0)&&">"===a.charAt(a.length-1)&&a.length>=3?[null,a,null]:B.exec(a),!e||!e[1]&&b)return!b||b.jquery?(b||c).find(a):this.constructor(b).find(a);if(e[1]){if(b=b instanceof n?b[0]:b,n.merge(this,n.parseHTML(e[1],b&&b.nodeType?b.ownerDocument||b:d,!0)),x.test(e[1])&&n.isPlainObject(b))for(e in b)n.isFunction(this[e])?this[e](b[e]):this.attr(e,b[e]);return this}if(f=d.getElementById(e[2]),f&&f.parentNode){if(f.id!==e[2])return A.find(a);this.length=1,this[0]=f}return this.context=d,this.selector=a,this}return a.nodeType?(this.context=this[0]=a,this.length=1,this):n.isFunction(a)?"undefined"!=typeof c.ready?c.ready(a):a(n):(void 0!==a.selector&&(this.selector=a.selector,this.context=a.context),n.makeArray(a,this))};C.prototype=n.fn,A=n(d);var D=/^(?:parents|prev(?:Until|All))/,E={children:!0,contents:!0,next:!0,prev:!0};n.fn.extend({has:function(a){var b,c=n(a,this),d=c.length;return this.filter(function(){for(b=0;d>b;b++)if(n.contains(this,c[b]))return!0})},closest:function(a,b){for(var c,d=0,e=this.length,f=[],g=w.test(a)||"string"!=typeof a?n(a,b||this.context):0;e>d;d++)for(c=this[d];c&&c!==b;c=c.parentNode)if(c.nodeType<11&&(g?g.index(c)>-1:1===c.nodeType&&n.find.matchesSelector(c,a))){f.push(c);break}return this.pushStack(f.length>1?n.uniqueSort(f):f)},index:function(a){return a?"string"==typeof a?n.inArray(this[0],n(a)):n.inArray(a.jquery?a[0]:a,this):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(a,b){return this.pushStack(n.uniqueSort(n.merge(this.get(),n(a,b))))},addBack:function(a){return this.add(null==a?this.prevObject:this.prevObject.filter(a))}});function F(a,b){do a=a[b];while(a&&1!==a.nodeType);return a}n.each({parent:function(a){var b=a.parentNode;return b&&11!==b.nodeType?b:null},parents:function(a){return u(a,"parentNode")},parentsUntil:function(a,b,c){return u(a,"parentNode",c)},next:function(a){return F(a,"nextSibling")},prev:function(a){return F(a,"previousSibling")},nextAll:function(a){return u(a,"nextSibling")},prevAll:function(a){return u(a,"previousSibling")},nextUntil:function(a,b,c){return u(a,"nextSibling",c)},prevUntil:function(a,b,c){return u(a,"previousSibling",c)},siblings:function(a){return v((a.parentNode||{}).firstChild,a)},children:function(a){return v(a.firstChild)},contents:function(a){return n.nodeName(a,"iframe")?a.contentDocument||a.contentWindow.document:n.merge([],a.childNodes)}},function(a,b){n.fn[a]=function(c,d){var e=n.map(this,b,c);return"Until"!==a.slice(-5)&&(d=c),d&&"string"==typeof d&&(e=n.filter(d,e)),this.length>1&&(E[a]||(e=n.uniqueSort(e)),D.test(a)&&(e=e.reverse())),this.pushStack(e)}});var G=/\S+/g;function H(a){var b={};return n.each(a.match(G)||[],function(a,c){b[c]=!0}),b}n.Callbacks=function(a){a="string"==typeof a?H(a):n.extend({},a);var b,c,d,e,f=[],g=[],h=-1,i=function(){for(e=a.once,d=b=!0;g.length;h=-1){c=g.shift();while(++h -1)f.splice(c,1),h>=c&&h--}),this},has:function(a){return a?n.inArray(a,f)>-1:f.length>0},empty:function(){return f&&(f=[]),this},disable:function(){return e=g=[],f=c="",this},disabled:function(){return!f},lock:function(){return e=!0,c||j.disable(),this},locked:function(){return!!e},fireWith:function(a,c){return e||(c=c||[],c=[a,c.slice?c.slice():c],g.push(c),b||i()),this},fire:function(){return j.fireWith(this,arguments),this},fired:function(){return!!d}};return j},n.extend({Deferred:function(a){var b=[["resolve","done",n.Callbacks("once memory"),"resolved"],["reject","fail",n.Callbacks("once memory"),"rejected"],["notify","progress",n.Callbacks("memory")]],c="pending",d={state:function(){return c},always:function(){return e.done(arguments).fail(arguments),this},then:function(){var a=arguments;return n.Deferred(function(c){n.each(b,function(b,f){var g=n.isFunction(a[b])&&a[b];e[f[1]](function(){var a=g&&g.apply(this,arguments);a&&n.isFunction(a.promise)?a.promise().progress(c.notify).done(c.resolve).fail(c.reject):c[f[0]+"With"](this===d?c.promise():this,g?[a]:arguments)})}),a=null}).promise()},promise:function(a){return null!=a?n.extend(a,d):d}},e={};return d.pipe=d.then,n.each(b,function(a,f){var g=f[2],h=f[3];d[f[1]]=g.add,h&&g.add(function(){c=h},b[1^a][2].disable,b[2][2].lock),e[f[0]]=function(){return e[f[0]+"With"](this===e?d:this,arguments),this},e[f[0]+"With"]=g.fireWith}),d.promise(e),a&&a.call(e,e),e},when:function(a){var b=0,c=e.call(arguments),d=c.length,f=1!==d||a&&n.isFunction(a.promise)?d:0,g=1===f?a:n.Deferred(),h=function(a,b,c){return function(d){b[a]=this,c[a]=arguments.length>1?e.call(arguments):d,c===i?g.notifyWith(b,c):--f||g.resolveWith(b,c)}},i,j,k;if(d>1)for(i=new Array(d),j=new Array(d),k=new Array(d);d>b;b++)c[b]&&n.isFunction(c[b].promise)?c[b].promise().progress(h(b,j,i)).done(h(b,k,c)).fail(g.reject):--f;return f||g.resolveWith(k,c),g.promise()}});var I;n.fn.ready=function(a){return n.ready.promise().done(a),this},n.extend({isReady:!1,readyWait:1,holdReady:function(a){a?n.readyWait++:n.ready(!0)},ready:function(a){(a===!0?--n.readyWait:n.isReady)||(n.isReady=!0,a!==!0&&--n.readyWait>0||(I.resolveWith(d,[n]),n.fn.triggerHandler&&(n(d).triggerHandler("ready"),n(d).off("ready"))))}});function J(){d.addEventListener?(d.removeEventListener("DOMContentLoaded",K),a.removeEventListener("load",K)):(d.detachEvent("onreadystatechange",K),a.detachEvent("onload",K))}function K(){(d.addEventListener||"load"===a.event.type||"complete"===d.readyState)&&(J(),n.ready())}n.ready.promise=function(b){if(!I)if(I=n.Deferred(),"complete"===d.readyState||"loading"!==d.readyState&&!d.documentElement.doScroll)a.setTimeout(n.ready);else if(d.addEventListener)d.addEventListener("DOMContentLoaded",K),a.addEventListener("load",K);else{d.attachEvent("onreadystatechange",K),a.attachEvent("onload",K);var c=!1;try{c=null==a.frameElement&&d.documentElement}catch(e){}c&&c.doScroll&&!function f(){if(!n.isReady){try{c.doScroll("left")}catch(b){return a.setTimeout(f,50)}J(),n.ready()}}()}return I.promise(b)},n.ready.promise();var L;for(L in n(l))break;l.ownFirst="0"===L,l.inlineBlockNeedsLayout=!1,n(function(){var a,b,c,e;c=d.getElementsByTagName("body")[0],c&&c.style&&(b=d.createElement("div"),e=d.createElement("div"),e.style.cssText="position:absolute;border:0;width:0;height:0;top:0;left:-9999px",c.appendChild(e).appendChild(b),"undefined"!=typeof b.style.zoom&&(b.style.cssText="display:inline;margin:0;border:0;padding:1px;width:1px;zoom:1",l.inlineBlockNeedsLayout=a=3===b.offsetWidth,a&&(c.style.zoom=1)),c.removeChild(e))}),function(){var a=d.createElement("div");l.deleteExpando=!0;try{delete a.test}catch(b){l.deleteExpando=!1}a=null}();var M=function(a){var b=n.noData[(a.nodeName+" ").toLowerCase()],c=+a.nodeType||1;return 1!==c&&9!==c?!1:!b||b!==!0&&a.getAttribute("classid")===b},N=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,O=/([A-Z])/g;function P(a,b,c){if(void 0===c&&1===a.nodeType){var d="data-"+b.replace(O,"-$1").toLowerCase();if(c=a.getAttribute(d),"string"==typeof c){try{c="true"===c?!0:"false"===c?!1:"null"===c?null:+c+""===c?+c:N.test(c)?n.parseJSON(c):c}catch(e){}n.data(a,b,c)}else c=void 0; +}return c}function Q(a){var b;for(b in a)if(("data"!==b||!n.isEmptyObject(a[b]))&&"toJSON"!==b)return!1;return!0}function R(a,b,d,e){if(M(a)){var f,g,h=n.expando,i=a.nodeType,j=i?n.cache:a,k=i?a[h]:a[h]&&h;if(k&&j[k]&&(e||j[k].data)||void 0!==d||"string"!=typeof b)return k||(k=i?a[h]=c.pop()||n.guid++:h),j[k]||(j[k]=i?{}:{toJSON:n.noop}),"object"!=typeof b&&"function"!=typeof b||(e?j[k]=n.extend(j[k],b):j[k].data=n.extend(j[k].data,b)),g=j[k],e||(g.data||(g.data={}),g=g.data),void 0!==d&&(g[n.camelCase(b)]=d),"string"==typeof b?(f=g[b],null==f&&(f=g[n.camelCase(b)])):f=g,f}}function S(a,b,c){if(M(a)){var d,e,f=a.nodeType,g=f?n.cache:a,h=f?a[n.expando]:n.expando;if(g[h]){if(b&&(d=c?g[h]:g[h].data)){n.isArray(b)?b=b.concat(n.map(b,n.camelCase)):b in d?b=[b]:(b=n.camelCase(b),b=b in d?[b]:b.split(" ")),e=b.length;while(e--)delete d[b[e]];if(c?!Q(d):!n.isEmptyObject(d))return}(c||(delete g[h].data,Q(g[h])))&&(f?n.cleanData([a],!0):l.deleteExpando||g!=g.window?delete g[h]:g[h]=void 0)}}}n.extend({cache:{},noData:{"applet ":!0,"embed ":!0,"object ":"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"},hasData:function(a){return a=a.nodeType?n.cache[a[n.expando]]:a[n.expando],!!a&&!Q(a)},data:function(a,b,c){return R(a,b,c)},removeData:function(a,b){return S(a,b)},_data:function(a,b,c){return R(a,b,c,!0)},_removeData:function(a,b){return S(a,b,!0)}}),n.fn.extend({data:function(a,b){var c,d,e,f=this[0],g=f&&f.attributes;if(void 0===a){if(this.length&&(e=n.data(f),1===f.nodeType&&!n._data(f,"parsedAttrs"))){c=g.length;while(c--)g[c]&&(d=g[c].name,0===d.indexOf("data-")&&(d=n.camelCase(d.slice(5)),P(f,d,e[d])));n._data(f,"parsedAttrs",!0)}return e}return"object"==typeof a?this.each(function(){n.data(this,a)}):arguments.length>1?this.each(function(){n.data(this,a,b)}):f?P(f,a,n.data(f,a)):void 0},removeData:function(a){return this.each(function(){n.removeData(this,a)})}}),n.extend({queue:function(a,b,c){var d;return a?(b=(b||"fx")+"queue",d=n._data(a,b),c&&(!d||n.isArray(c)?d=n._data(a,b,n.makeArray(c)):d.push(c)),d||[]):void 0},dequeue:function(a,b){b=b||"fx";var c=n.queue(a,b),d=c.length,e=c.shift(),f=n._queueHooks(a,b),g=function(){n.dequeue(a,b)};"inprogress"===e&&(e=c.shift(),d--),e&&("fx"===b&&c.unshift("inprogress"),delete f.stop,e.call(a,g,f)),!d&&f&&f.empty.fire()},_queueHooks:function(a,b){var c=b+"queueHooks";return n._data(a,c)||n._data(a,c,{empty:n.Callbacks("once memory").add(function(){n._removeData(a,b+"queue"),n._removeData(a,c)})})}}),n.fn.extend({queue:function(a,b){var c=2;return"string"!=typeof a&&(b=a,a="fx",c--),arguments.length h;h++)b(a[h],c,g?d:d.call(a[h],h,b(a[h],c)));return e?a:j?b.call(a):i?b(a[0],c):f},Z=/^(?:checkbox|radio)$/i,$=/<([\w:-]+)/,_=/^$|\/(?:java|ecma)script/i,aa=/^\s+/,ba="abbr|article|aside|audio|bdi|canvas|data|datalist|details|dialog|figcaption|figure|footer|header|hgroup|main|mark|meter|nav|output|picture|progress|section|summary|template|time|video";function ca(a){var b=ba.split("|"),c=a.createDocumentFragment();if(c.createElement)while(b.length)c.createElement(b.pop());return c}!function(){var a=d.createElement("div"),b=d.createDocumentFragment(),c=d.createElement("input");a.innerHTML=" a",l.leadingWhitespace=3===a.firstChild.nodeType,l.tbody=!a.getElementsByTagName("tbody").length,l.htmlSerialize=!!a.getElementsByTagName("link").length,l.html5Clone="<:nav>"!==d.createElement("nav").cloneNode(!0).outerHTML,c.type="checkbox",c.checked=!0,b.appendChild(c),l.appendChecked=c.checked,a.innerHTML="",l.noCloneChecked=!!a.cloneNode(!0).lastChild.defaultValue,b.appendChild(a),c=d.createElement("input"),c.setAttribute("type","radio"),c.setAttribute("checked","checked"),c.setAttribute("name","t"),a.appendChild(c),l.checkClone=a.cloneNode(!0).cloneNode(!0).lastChild.checked,l.noCloneEvent=!!a.addEventListener,a[n.expando]=1,l.attributes=!a.getAttribute(n.expando)}();var da={option:[1,""],legend:[1,""],area:[1,""],param:[1,""],thead:[1,"
","
"],tr:[2,"","
"],col:[2,""],td:[3,"
"," "],_default:l.htmlSerialize?[0,"",""]:[1,"X
"," ",""]};da.optgroup=da.option,da.tbody=da.tfoot=da.colgroup=da.caption=da.thead,da.th=da.td;function ea(a,b){var c,d,e=0,f="undefined"!=typeof a.getElementsByTagName?a.getElementsByTagName(b||"*"):"undefined"!=typeof a.querySelectorAll?a.querySelectorAll(b||"*"):void 0;if(!f)for(f=[],c=a.childNodes||a;null!=(d=c[e]);e++)!b||n.nodeName(d,b)?f.push(d):n.merge(f,ea(d,b));return void 0===b||b&&n.nodeName(a,b)?n.merge([a],f):f}function fa(a,b){for(var c,d=0;null!=(c=a[d]);d++)n._data(c,"globalEval",!b||n._data(b[d],"globalEval"))}var ga=/<|?\w+;/,ha=/r;r++)if(g=a[r],g||0===g)if("object"===n.type(g))n.merge(q,g.nodeType?[g]:g);else if(ga.test(g)){i=i||p.appendChild(b.createElement("div")),j=($.exec(g)||["",""])[1].toLowerCase(),m=da[j]||da._default,i.innerHTML=m[1]+n.htmlPrefilter(g)+m[2],f=m[0];while(f--)i=i.lastChild;if(!l.leadingWhitespace&&aa.test(g)&&q.push(b.createTextNode(aa.exec(g)[0])),!l.tbody){g="table"!==j||ha.test(g)?"